diff options
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_helpers.cc')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_helpers.cc | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/src/google/protobuf/compiler/cpp/cpp_helpers.cc index cd8364f5..f8ed7b1c 100644 --- a/src/google/protobuf/compiler/cpp/cpp_helpers.cc +++ b/src/google/protobuf/compiler/cpp/cpp_helpers.cc @@ -360,31 +360,21 @@ string FilenameIdentifier(const string& filename) { return result; } - -string GlobalSymbolName(const string& filename, string prefix) -{ - return prefix + FilenameIdentifier(filename); -} - // Return the name of the AddDescriptors() function for a given file. -string GlobalAddDescriptorsName(const string& filename) -{ - return GlobalSymbolName(filename,"protobuf_AddDesc_"); +string GlobalAddDescriptorsName(const string& filename) { + return "protobuf_AddDesc_" + FilenameIdentifier(filename); } // Return the name of the AssignDescriptors() function for a given file. -string GlobalAssignDescriptorsName(const string& filename) -{ - return GlobalSymbolName(filename,"protobuf_AssignDesc_"); +string GlobalAssignDescriptorsName(const string& filename) { + return "protobuf_AssignDesc_" + FilenameIdentifier(filename); } // Return the name of the ShutdownFile() function for a given file. -string GlobalShutdownFileName(const string& filename) -{ - return GlobalSymbolName(filename,"protobuf_ShutdownFile_"); +string GlobalShutdownFileName(const string& filename) { + return "protobuf_ShutdownFile_" + FilenameIdentifier(filename); } - // Return the qualified C++ name for a file level symbol. string QualifiedFileLevelSymbol(const string& package, const string& name) { if (package.empty()) { @@ -521,4 +511,4 @@ bool IsStringOrMessage(const FieldDescriptor* field) { } // namespace cpp } // namespace compiler } // namespace protobuf -} // namespace google +} // namespace google
\ No newline at end of file |