aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/mathutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/stubs/mathutil.h')
-rw-r--r--src/google/protobuf/stubs/mathutil.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/mathutil.h b/src/google/protobuf/stubs/mathutil.h
index 3a1ef8a8..27956a8e 100644
--- a/src/google/protobuf/stubs/mathutil.h
+++ b/src/google/protobuf/stubs/mathutil.h
@@ -83,7 +83,7 @@ class MathUtil {
if (value == T(0) || ::google::protobuf::internal::IsNan<T>(value)) {
return value;
}
- return value > T(0) ? value : -value;
+ return value > T(0) ? 1 : -1;
}
template<typename T>