diff options
author | Jon Skeet <jonskeet@google.com> | 2015-06-25 16:42:09 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-06-26 20:13:06 +0100 |
commit | aa5104143cca3bf3e9f44a79f96e394960f45662 (patch) | |
tree | 3d7eaffeaac656277657a1410542ab3a2812e68c /csharp/src/ProtocolBuffers/Collections/RepeatedField.cs | |
parent | e75a10d8ff85901021a7c133534b6b87c3c7f072 (diff) | |
download | protobuf-aa5104143cca3bf3e9f44a79f96e394960f45662.tar.gz protobuf-aa5104143cca3bf3e9f44a79f96e394960f45662.tar.bz2 protobuf-aa5104143cca3bf3e9f44a79f96e394960f45662.zip |
Remove a lot of code which wasn't needed any more.
Diffstat (limited to 'csharp/src/ProtocolBuffers/Collections/RepeatedField.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers/Collections/RepeatedField.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/csharp/src/ProtocolBuffers/Collections/RepeatedField.cs b/csharp/src/ProtocolBuffers/Collections/RepeatedField.cs index 4d4212cb..39d4f351 100644 --- a/csharp/src/ProtocolBuffers/Collections/RepeatedField.cs +++ b/csharp/src/ProtocolBuffers/Collections/RepeatedField.cs @@ -298,6 +298,16 @@ namespace Google.Protobuf.Collections } } + internal uint CalculateSize(Func<T, int> sizeComputer) + { + int size = 0; + for (int i = 0; i < count; i++) + { + size += sizeComputer(array[i]); + } + return (uint)size; + } + public struct Enumerator : IEnumerator<T> { private int index; |