Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1051)

Unified Diff: src/google/protobuf/compiler/cpp/cpp_helpers.cc

Issue 4077052: Implement generated visitor classes in C++. Base URL: http://protobuf.googlecode.com/svn/trunk/
Patch Set: Created 13 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/google/protobuf/compiler/cpp/cpp_helpers.cc
===================================================================
--- src/google/protobuf/compiler/cpp/cpp_helpers.cc (revision 374)
+++ src/google/protobuf/compiler/cpp/cpp_helpers.cc (working copy)
@@ -175,6 +175,14 @@
return result;
}
+string FieldCamelcaseName(const FieldDescriptor* field) {
+ string result = field->camelcase_name();
+ if ('a' <= result[0] && result[0] <= 'z') {
+ result[0] += 'A' - 'a';
+ }
+ return result;
+}
+
string FieldMessageTypeName(const FieldDescriptor* field) {
// Note: The Google-internal version of Protocol Buffers uses this function
// as a hook point for hacks to support legacy code.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b