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

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.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_message.cc
diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc
index a7a81b0724e478a09f13429285084bf0dfdd5855..f8d060a791cc5c2ffceb5c8564c3d095fc5023a2 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc
@@ -898,7 +898,7 @@ GenerateClassMethods(io::Printer* printer) {
}
// Generate field number constants.
- printer->Print("#ifndef _MSC_VER\n");
+ printer->Print("#if !defined(_MSC_VER) || _MSC_VER >= 1900\n");
for (int i = 0; i < descriptor_->field_count(); i++) {
const FieldDescriptor *field = descriptor_->field(i);
printer->Print(

Powered by Google App Engine
This is Rietveld 408576698