diff options
author | Adam Cozzette <acozzette@google.com> | 2017-04-25 17:01:28 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-04-26 08:25:01 -0700 |
commit | 7c76ac1735a3b8f4523856bbd67588b6ccc7f850 (patch) | |
tree | b5198d8b815cfc08fdede21cd4a0969837b92930 /src/google/protobuf/compiler/csharp/csharp_field_base.cc | |
parent | 4920e27a488976c9993cef686d868a846868eb56 (diff) |
Remove "using namespace std" from stubs/common.h
This prevents the contents of the std namespace from being effectively
pulled into the top-level namespace in all translation units that
include common.h. I left in individual using statements for a few common
things like std::set and std::map, because it did not seem worth going
through the churn of updating the whole codebase to fix those right now.
Diffstat (limited to 'src/google/protobuf/compiler/csharp/csharp_field_base.cc')
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_field_base.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_field_base.cc b/src/google/protobuf/compiler/csharp/csharp_field_base.cc index 139cc753..ebb8fbc2 100644 --- a/src/google/protobuf/compiler/csharp/csharp_field_base.cc +++ b/src/google/protobuf/compiler/csharp/csharp_field_base.cc @@ -322,9 +322,9 @@ std::string FieldGeneratorBase::default_value(const FieldDescriptor* descriptor) } case FieldDescriptor::TYPE_DOUBLE: { double value = descriptor->default_value_double(); - if (value == numeric_limits<double>::infinity()) { + if (value == std::numeric_limits<double>::infinity()) { return "double.PositiveInfinity"; - } else if (value == -numeric_limits<double>::infinity()) { + } else if (value == -std::numeric_limits<double>::infinity()) { return "double.NegativeInfinity"; } else if (MathLimits<double>::IsNaN(value)) { return "double.NaN"; @@ -333,9 +333,9 @@ std::string FieldGeneratorBase::default_value(const FieldDescriptor* descriptor) } case FieldDescriptor::TYPE_FLOAT: { float value = descriptor->default_value_float(); - if (value == numeric_limits<float>::infinity()) { + if (value == std::numeric_limits<float>::infinity()) { return "float.PositiveInfinity"; - } else if (value == -numeric_limits<float>::infinity()) { + } else if (value == -std::numeric_limits<float>::infinity()) { return "float.NegativeInfinity"; } else if (MathLimits<float>::IsNaN(value)) { return "float.NaN"; |