fix(core): Fixes type caching & cleanup (#422)
- [X] Fixes some issues with the type caching - [X] Changes type check default to ignore case - [X] Splits out type caching of insensitive and sensitive lists. This means less stuff to iterate through when checking a type against the string. - [X] Adds an ArrayEnumerator, mostly for reference purposes (copy/paste as needed)
This commit is contained in:
parent
b921c38879
commit
e869c105d0
35 changed files with 253 additions and 96 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Server.Buffers;
|
||||
|
||||
namespace Server
|
||||
|
|
@ -163,7 +164,8 @@ namespace Server
|
|||
|
||||
public static bool operator <(ClientVersion l, ClientVersion r) => Compare(l, r) < 0;
|
||||
|
||||
public override int GetHashCode() => Major ^ Minor ^ Revision ^ Patch ^ (int)Type;
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public override int GetHashCode() => HashCode.Combine(Major, Minor, Revision, Patch, Type);
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue