fix(core): Removes some uses of Linq (#421)
- [X] Removes some uses of linq - [X] Creates struct based enumerator for Skills - [X] Creates a struct based enumerator for TypeCache - [X] Changes HarvestDefinition to an init array instead of List - [X] Changes HeritageTokenGump Response from List to Array
This commit is contained in:
parent
52356866ed
commit
b921c38879
50 changed files with 1006 additions and 507 deletions
|
|
@ -3,7 +3,6 @@ using System.Buffers.Binary;
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
|
@ -742,7 +741,12 @@ namespace Server
|
|||
|
||||
var byteIndex = 0;
|
||||
|
||||
var length = mems.Sum(mem => mem.Length);
|
||||
var length = 0;
|
||||
for (var i = 0; i < mems.Length; i++)
|
||||
{
|
||||
length += mems[i].Length;
|
||||
}
|
||||
|
||||
var position = 0;
|
||||
var memIndex = 0;
|
||||
var span = mems[memIndex].Span;
|
||||
|
|
@ -1386,5 +1390,7 @@ namespace Server
|
|||
i = (i & 0x3333333333333333UL) + ((i >> 2) & 0x3333333333333333UL);
|
||||
return (int)(unchecked(((i + (i >> 4)) & 0xF0F0F0F0F0F0F0FUL) * 0x101010101010101UL) >> 56);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue