diff options
author | Jon Skeet <skeet@pobox.com> | 2015-06-19 17:30:13 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2015-06-19 17:30:13 +0100 |
commit | cdeda4b87625084f5687115bb1fd7772b7c34ad6 (patch) | |
tree | 373f4c38dbfb318626037ff204c30466574ab876 /csharp/src/ProtocolBuffers/ByteArray.cs | |
parent | d7dda2fed8c37a83e2d4cd7ecc4201b628588c4c (diff) | |
download | protobuf-cdeda4b87625084f5687115bb1fd7772b7c34ad6.tar.gz protobuf-cdeda4b87625084f5687115bb1fd7772b7c34ad6.tar.bz2 protobuf-cdeda4b87625084f5687115bb1fd7772b7c34ad6.zip |
Minor cleanup.
- Make some members internal
- Remove a lot of FrameworkPortability that isn't required
- Start adding documentation comments
- Remove some more group-based members
- Not passing in "the last tag read" into Read*Array, g
Diffstat (limited to 'csharp/src/ProtocolBuffers/ByteArray.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers/ByteArray.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/csharp/src/ProtocolBuffers/ByteArray.cs b/csharp/src/ProtocolBuffers/ByteArray.cs index d367fc39..211a0e11 100644 --- a/csharp/src/ProtocolBuffers/ByteArray.cs +++ b/csharp/src/ProtocolBuffers/ByteArray.cs @@ -51,7 +51,7 @@ namespace Google.Protobuf /// <summary>
/// Determines which copy routine to use based on the number of bytes to be copied.
/// </summary>
- public static void Copy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count)
+ internal static void Copy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count)
{
if (count > CopyThreshold)
{
@@ -66,7 +66,7 @@ namespace Google.Protobuf /// <summary>
/// Copy the bytes provided with a for loop, faster when there are only a few bytes to copy
/// </summary>
- public static void ByteCopy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count)
+ internal static void ByteCopy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count)
{
int stop = srcOffset + count;
for (int i = srcOffset; i < stop; i++)
@@ -78,12 +78,11 @@ namespace Google.Protobuf /// <summary>
/// Reverses the order of bytes in the array
/// </summary>
- public static void Reverse(byte[] bytes)
+ internal static void Reverse(byte[] bytes)
{
- byte temp;
for (int first = 0, last = bytes.Length - 1; first < last; first++, last--)
{
- temp = bytes[first];
+ byte temp = bytes[first];
bytes[first] = bytes[last];
bytes[last] = temp;
}
|