aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google
diff options
context:
space:
mode:
authorGravatar Tres Seaver <tseaver@palladion.com>2014-11-17 19:35:04 -0500
committerGravatar Tres Seaver <tseaver@palladion.com>2014-11-17 19:35:04 -0500
commit8b2aafe7d3f59463fb8693421c09bfefb3bd0104 (patch)
tree803aec712c672d78cf930889977df651269d33d7 /src/google
parent83671c0514741a64433dd86a958e3df6bf9508c6 (diff)
Use 'kint32min'/'kint32max' constants, rather than defining locally.
Diffstat (limited to 'src/google')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_enum.cc4
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_file.cc6
-rw-r--r--src/google/protobuf/compiler/plugin.pb.h6
-rw-r--r--src/google/protobuf/descriptor.pb.h6
4 files changed, 2 insertions, 20 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();
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc
index 6b265dc6..6dc88e88 100644
--- a/src/google/protobuf/compiler/cpp/cpp_file.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_file.cc
@@ -105,12 +105,6 @@ void FileGenerator::GenerateHeader(io::Printer* printer) {
"#define PROTOBUF_$filename_identifier$__INCLUDED\n"
"\n"
"#include <string>\n"
- "#ifndef PROTOBUF_ENUM_MIN\n"
- "#define PROTOBUF_ENUM_MIN (int32_t)0x80000000\n"
- "#endif\n"
- "#ifndef PROTOBUF_ENUM_MAX\n"
- "#define PROTOBUF_ENUM_MAX (int32_t)0x7fffffff\n"
- "#endif\n"
"\n",
"filename", file_->name(),
"filename_identifier", filename_identifier);
diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h
index b752d6a1..ed1d3faf 100644
--- a/src/google/protobuf/compiler/plugin.pb.h
+++ b/src/google/protobuf/compiler/plugin.pb.h
@@ -5,12 +5,6 @@
#define PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED
#include <string>
-#ifndef PROTOBUF_ENUM_MIN
-#define PROTOBUF_ENUM_MIN (int32_t)0x80000000
-#endif
-#ifndef PROTOBUF_ENUM_MAX
-#define PROTOBUF_ENUM_MAX (int32_t)0x7fffffff
-#endif
#include <google/protobuf/stubs/common.h>
diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h
index 767517a3..98e0d502 100644
--- a/src/google/protobuf/descriptor.pb.h
+++ b/src/google/protobuf/descriptor.pb.h
@@ -5,12 +5,6 @@
#define PROTOBUF_google_2fprotobuf_2fdescriptor_2eproto__INCLUDED
#include <string>
-#ifndef PROTOBUF_ENUM_MIN
-#define PROTOBUF_ENUM_MIN (int32_t)0x80000000
-#endif
-#ifndef PROTOBUF_ENUM_MAX
-#define PROTOBUF_ENUM_MAX (int32_t)0x7fffffff
-#endif
#include <google/protobuf/stubs/common.h>