aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers/ByteArray.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/ProtocolBuffers/ByteArray.cs')
-rw-r--r--csharp/src/ProtocolBuffers/ByteArray.cs9
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;
}