Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array.Copy instead of for #15

Closed
GoogleCodeExporter opened this issue May 20, 2015 · 1 comment
Closed

Array.Copy instead of for #15

GoogleCodeExporter opened this issue May 20, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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 NN1436401@gmail.com on 21 Jul 2010 at 3:28

@GoogleCodeExporter
Copy link
Author

Fixed in revision 84

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

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant