diff options
author | Jisi Liu <liujisi@google.com> | 2015-02-26 12:46:53 -0800 |
---|---|---|
committer | Jisi Liu <liujisi@google.com> | 2015-02-26 12:46:53 -0800 |
commit | 7e9020fb0ec4ab9b49262d73533be29ed642ef9c (patch) | |
tree | 34834df45a20216a1b1c4b5311eff6340f5b8d25 /src | |
parent | a779ae609c9ca6fa37ee4acec2d48eaa9c3afb91 (diff) | |
parent | d1ef42a8e7986b5b812262dca721ae854758f8ad (diff) | |
download | protobuf-7e9020fb0ec4ab9b49262d73533be29ed642ef9c.tar.gz protobuf-7e9020fb0ec4ab9b49262d73533be29ed642ef9c.tar.bz2 protobuf-7e9020fb0ec4ab9b49262d73533be29ed642ef9c.zip |
Merge pull request #185 from mzhaom/remove-unused
Remove unused methods:
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_message.cc | 4 | ||||
-rw-r--r-- | src/google/protobuf/compiler/javanano/javanano_primitive_field.cc | 23 |
2 files changed, 1 insertions, 26 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc index e71d35fa..d0fd6c6d 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -280,10 +280,6 @@ void OptimizePadding(vector<const FieldDescriptor*>* fields) { } } -string MessageTypeProtoName(const FieldDescriptor* field) { - return field->message_type()->full_name(); -} - // Emits an if-statement with a condition that evaluates to true if |field| is // considered non-default (will be sent over the wire), for message types // without true field presence. Should only be called if diff --git a/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc b/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc index 106a7506..41bad0a6 100644 --- a/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc +++ b/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc @@ -155,28 +155,6 @@ int FixedSize(FieldDescriptor::Type type) { return -1; } -// Return true if the type is a that has variable length -// for instance String's. -bool IsVariableLenType(JavaType type) { - switch (type) { - case JAVATYPE_INT : return false; - case JAVATYPE_LONG : return false; - case JAVATYPE_FLOAT : return false; - case JAVATYPE_DOUBLE : return false; - case JAVATYPE_BOOLEAN: return false; - case JAVATYPE_STRING : return true; - case JAVATYPE_BYTES : return true; - case JAVATYPE_ENUM : return false; - case JAVATYPE_MESSAGE: return true; - - // No default because we want the compiler to complain if any new - // JavaTypes are added. - } - - GOOGLE_LOG(FATAL) << "Can't get here."; - return false; -} - bool AllAscii(const string& text) { for (int i = 0; i < text.size(); i++) { if ((text[i] & 0x80) != 0) { @@ -186,6 +164,7 @@ bool AllAscii(const string& text) { return true; } + void SetPrimitiveVariables(const FieldDescriptor* descriptor, const Params params, map<string, string>* variables) { (*variables)["name"] = |