diff options
author | Tres Seaver <tseaver@palladion.com> | 2014-11-17 19:35:04 -0500 |
---|---|---|
committer | Tres Seaver <tseaver@palladion.com> | 2014-11-17 19:35:04 -0500 |
commit | 8b2aafe7d3f59463fb8693421c09bfefb3bd0104 (patch) | |
tree | 803aec712c672d78cf930889977df651269d33d7 /src/google/protobuf/compiler/cpp/cpp_enum.cc | |
parent | 83671c0514741a64433dd86a958e3df6bf9508c6 (diff) | |
download | protobuf-8b2aafe7d3f59463fb8693421c09bfefb3bd0104.tar.gz protobuf-8b2aafe7d3f59463fb8693421c09bfefb3bd0104.tar.bz2 protobuf-8b2aafe7d3f59463fb8693421c09bfefb3bd0104.zip |
Use 'kint32min'/'kint32max' constants, rather than defining locally.
Incorporates feedback from @xfxyjwf:
https://github.com/google/protobuf/pull/84#discussion_r20474781.
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_enum.cc')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_enum.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_enum.cc b/src/google/protobuf/compiler/cpp/cpp_enum.cc index 769ea678..3ce1f120 100644 --- a/src/google/protobuf/compiler/cpp/cpp_enum.cc +++ b/src/google/protobuf/compiler/cpp/cpp_enum.cc @@ -106,8 +106,8 @@ void EnumGenerator::GenerateDefinition(io::Printer* printer) { // INT32_MIN and INT32_MAX if (descriptor_->value_count() > 0) printer->Print(",\n"); printer->Print(vars, - "$classname$_$prefix$INT_MIN_SENTINEL_DO_NOT_USE_ = PROTOBUF_ENUM_MIN,\n" - "$classname$_$prefix$INT_MAX_SENTINEL_DO_NOT_USE_ = PROTOBUF_ENUM_MAX"); + "$classname$_$prefix$INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,\n" + "$classname$_$prefix$INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max"); } printer->Outdent(); |