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

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

Issue 1422453005: Get VS 2015 to use const int definitions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update README.chromium Created 5 years, 2 months 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.cc
diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc
index 67c12d7abf9fd657995a6bbcdbd1cd46df690ebb..fda011a92ed40740812b532920ec8f8c40f8fe0c 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc
@@ -232,9 +232,9 @@ void EnumGenerator::GenerateMethods(io::Printer* printer) {
if (descriptor_->containing_type() != NULL) {
// We need to "define" the static constants which were declared in the
// header, to give the linker a place to put them. Or at least the C++
- // standard says we have to. MSVC actually insists tha we do _not_ define
- // them again in the .cc file.
- printer->Print("#ifndef _MSC_VER\n");
+ // standard says we have to. MSVC actually insists that we do _not_ define
+ // them again in the .cc file, prior to VC++ 2015.
+ printer->Print("#if !defined(_MSC_VER) || _MSC_VER >= 1900\n");
vars["parent"] = ClassName(descriptor_->containing_type(), false);
vars["nested_name"] = descriptor_->name();
« no previous file with comments | « third_party/protobuf/README.chromium ('k') | third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698