aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-08-01 11:58:18 -0500
committerrogerk <devnull@localhost>2011-08-01 11:58:18 -0500
commit3aa06356acd7495b210917dbf72bdb73fc67a588 (patch)
tree532c437e94ce46de8b30ac7cb515ad6eb493a127 /src
parentc11bf71cc9b09f90ef06e79bd164ac84191281f7 (diff)
downloadprotobuf-3aa06356acd7495b210917dbf72bdb73fc67a588.tar.gz
protobuf-3aa06356acd7495b210917dbf72bdb73fc67a588.tar.bz2
protobuf-3aa06356acd7495b210917dbf72bdb73fc67a588.zip
Removal of #condition commented source
Diffstat (limited to 'src')
-rw-r--r--src/ProtocolBuffers/CodedOutputStream.cs57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/ProtocolBuffers/CodedOutputStream.cs b/src/ProtocolBuffers/CodedOutputStream.cs
index 088db8ae..5b1d2ce9 100644
--- a/src/ProtocolBuffers/CodedOutputStream.cs
+++ b/src/ProtocolBuffers/CodedOutputStream.cs
@@ -1078,25 +1078,6 @@ namespace Google.ProtocolBuffers
WriteRawVarint32(WireFormat.MakeTag(fieldNumber, type));
}
-#if false
- private void SlowWriteRawVarint32(uint value)
- {
- while (true)
- {
- if ((value & ~0x7F) == 0)
- {
- WriteRawByte(value);
- return;
- }
- else
- {
- WriteRawByte((value & 0x7F) | 0x80);
- value >>= 7;
- }
- }
- }
-#endif
-
/// <summary>
/// Writes a 32 bit value as a varint. The fast route is taken when
/// there's enough buffer space left to whizz through without checking
@@ -1105,7 +1086,6 @@ namespace Google.ProtocolBuffers
[CLSCompliant(false)]
public void WriteRawVarint32(uint value)
{
-#if true
while (value > 127 && position < limit)
{
buffer[position++] = (byte) ((value & 0x7F) | 0x80);
@@ -1124,33 +1104,11 @@ namespace Google.ProtocolBuffers
{
WriteRawByte((byte) value);
}
-#else
- if (position + 5 > limit)
- {
- SlowWriteRawVarint32(value);
- return;
- }
-
- while (true)
- {
- if ((value & ~0x7F) == 0)
- {
- buffer[position++] = (byte) value;
- return;
- }
- else
- {
- buffer[position++] = (byte) ((value & 0x7F) | 0x80);
- value >>= 7;
- }
- }
-#endif
}
[CLSCompliant(false)]
public void WriteRawVarint64(ulong value)
{
-#if true
while (value > 127 && position < limit)
{
buffer[position++] = (byte) ((value & 0x7F) | 0x80);
@@ -1169,21 +1127,6 @@ namespace Google.ProtocolBuffers
{
WriteRawByte((byte) value);
}
-#else
- while (true)
- {
- if ((value & ~0x7FUL) == 0)
- {
- WriteRawByte((uint) value);
- return;
- }
- else
- {
- WriteRawByte(((uint) value & 0x7F) | 0x80);
- value >>= 7;
- }
- }
-#endif
}
[CLSCompliant(false)]