Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h
diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h
index 90edf0017d55eb2637b7f3566c58e8cc3b9cbe15..0b568c57b926fe800176e30f7f0d6513c7bdc862 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h
+++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h
@@ -66,7 +66,8 @@ class EnumGenerator {
// enums. A given key in enum_names will map from an enum class name to the
// EnumDescriptor that was responsible for its inclusion in the map. This can
// be used to associate the descriptor with the code generated for it.
- void FillForwardDeclaration(map<string, const EnumDescriptor*>* enum_names);
+ void FillForwardDeclaration(
+ std::map<string, const EnumDescriptor*>* enum_names);
// Generate header code defining the enum. This code should be placed
// within the enum's package namespace, but NOT within any class, even for
@@ -87,7 +88,7 @@ class EnumGenerator {
// Generate code that initializes the global variable storing the enum's
// descriptor.
- void GenerateDescriptorInitializer(io::Printer* printer, int index);
+ void GenerateDescriptorInitializer(io::Printer* printer);
// Generate non-inline methods related to the enum, such as IsValidValue().
// Goes in the .cc file.
@@ -100,6 +101,9 @@ class EnumGenerator {
// whether to generate the *_ARRAYSIZE constant.
const bool generate_array_size_;
+ int index_in_metadata_;
+
+ friend class FileGenerator;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator);
};

Powered by Google App Engine
This is Rietveld 408576698