Index: src/google/protobuf/compiler/cpp/cpp_field.cc |
=================================================================== |
--- src/google/protobuf/compiler/cpp/cpp_field.cc (revision 374) |
+++ src/google/protobuf/compiler/cpp/cpp_field.cc (working copy) |
@@ -54,6 +54,7 @@ |
void SetCommonFieldVariables(const FieldDescriptor* descriptor, |
map<string, string>* variables) { |
(*variables)["name"] = FieldName(descriptor); |
+ (*variables)["camelcase"] = FieldCamelcaseName(descriptor); |
(*variables)["index"] = SimpleItoa(descriptor->index()); |
(*variables)["number"] = SimpleItoa(descriptor->number()); |
(*variables)["classname"] = ClassName(FieldScope(descriptor), false); |
@@ -80,6 +81,18 @@ |
} |
+void FieldGenerator:: |
+GenerateReaderCodeWithPacking(io::Printer* printer) const { |
+ // Reaching here indicates a bug. Cases are: |
+ // - This FieldGenerator should support packing, but this method should be |
+ // overridden. |
+ // - This FieldGenerator doesn't support packing, and this method should |
+ // never have been called. |
+ GOOGLE_LOG(FATAL) << "GenerateReaderCodeWithPacking() " |
+ << "called on field generator that does not support packing."; |
+ |
+} |
+ |
FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor) |
: descriptor_(descriptor), |
field_generators_( |