aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/generated_message_reflection.cc
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xiaofeng@google.com>2015-08-28 14:09:00 -0700
committerGravatar Feng Xiao <xiaofeng@google.com>2015-08-28 14:09:00 -0700
commitf0640b5a046522d7ffbab02b87a8ce9a654f79d1 (patch)
tree0e42a47ac764537c1be76c29f5d9b04ad392113a /src/google/protobuf/generated_message_reflection.cc
parent69ac02a216591d437dfa1dbca2931cffe9790df9 (diff)
parentb913cbd3073826ea113efe917d4d3ce71b92ab2d (diff)
Merge pull request #770 from pkasting/string_space
Move StringSpaceUsedIncludingSelf to lite library.
Diffstat (limited to 'src/google/protobuf/generated_message_reflection.cc')
-rw-r--r--src/google/protobuf/generated_message_reflection.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/google/protobuf/generated_message_reflection.cc b/src/google/protobuf/generated_message_reflection.cc
index 412c48a1..0b01e73a 100644
--- a/src/google/protobuf/generated_message_reflection.cc
+++ b/src/google/protobuf/generated_message_reflection.cc
@@ -57,18 +57,6 @@ bool IsMapFieldInApi(const FieldDescriptor* field) {
}
} // anonymous namespace
-int StringSpaceUsedExcludingSelf(const string& str) {
- const void* start = &str;
- const void* end = &str + 1;
-
- if (start <= str.data() && str.data() < end) {
- // The string's data is stored inside the string object itself.
- return 0;
- } else {
- return str.capacity();
- }
-}
-
bool ParseNamedEnum(const EnumDescriptor* descriptor,
const string& name,
int* value) {