Avatarchik / lidgren-network-gen3

Automatically exported from code.google.com/p/lidgren-network-gen3
0 stars 0 forks source link

Array.Copy instead of for #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
http://code.google.com/p/lidgren-network-gen3/source/browse/trunk/Lidgren.Networ
k/NetBitWriter.cs#75
http://code.google.com/p/lidgren-network-gen3/source/browse/trunk/Lidgren.Networ
k/NetBitWriter.cs#149

Here goes
for (int i = 0; i < numberOfBytes; i++)
  destination[destinationByteOffset++] = fromBuffer[readPtr++];

You can use Array.Copy instead:

Array.Copy(fromBuffer, readPtr, destination, destinationByteOffset, 
numberOfBytes);

Original issue reported on code.google.com by NN1436...@gmail.com on 21 Jul 2010 at 3:28

GoogleCodeExporter commented 8 years ago
Fixed in revision 84

Original comment by lidg...@gmail.com on 26 Jul 2010 at 7:39