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_extension.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_extension.cc
diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc
index ef56b5e54925c1c0801c2ce5547db2fdbf2b9569..752f63f8c1f63a6777ba97a73b7fdaf3aa96541d 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc
@@ -155,7 +155,7 @@ void ExtensionGenerator::GenerateDefinition(io::Printer* printer) {
// Likewise, class members need to declare the field constant variable.
if (descriptor_->extension_scope() != NULL) {
printer->Print(vars,
- "#ifndef _MSC_VER\n"
+ "#if !defined(_MSC_VER) || _MSC_VER >= 1900\n"
"const int $scope$$constant_name$;\n"
"#endif\n");
}

Powered by Google App Engine
This is Rietveld 408576698