aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/protobuf/3.2.0/src/google/protobuf/compiler/csharp/csharp_field_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/protobuf/3.2.0/src/google/protobuf/compiler/csharp/csharp_field_base.cc')
-rw-r--r--third_party/protobuf/3.2.0/src/google/protobuf/compiler/csharp/csharp_field_base.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/third_party/protobuf/3.2.0/src/google/protobuf/compiler/csharp/csharp_field_base.cc b/third_party/protobuf/3.2.0/src/google/protobuf/compiler/csharp/csharp_field_base.cc
index 139cc75366..ebb8fbc26c 100644
--- a/third_party/protobuf/3.2.0/src/google/protobuf/compiler/csharp/csharp_field_base.cc
+++ b/third_party/protobuf/3.2.0/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";