aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/util/internal/datapiece.cc
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2015-08-22 18:25:48 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2015-08-22 18:25:48 -0700
commiteee38b0c018b3279f77d03dff796f440f40d3516 (patch)
tree7ff0978e30238d493fc7899b75abeb6d66939f07 /src/google/protobuf/util/internal/datapiece.cc
parentc3bc155aceda36ecb01cde2367a3b427f2d7ce40 (diff)
downloadprotobuf-eee38b0c018b3279f77d03dff796f440f40d3516.tar.gz
protobuf-eee38b0c018b3279f77d03dff796f440f40d3516.tar.bz2
protobuf-eee38b0c018b3279f77d03dff796f440f40d3516.zip
Down-integrate from google3.
Diffstat (limited to 'src/google/protobuf/util/internal/datapiece.cc')
-rw-r--r--src/google/protobuf/util/internal/datapiece.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/google/protobuf/util/internal/datapiece.cc b/src/google/protobuf/util/internal/datapiece.cc
index 944fb2e3..ea360798 100644
--- a/src/google/protobuf/util/internal/datapiece.cc
+++ b/src/google/protobuf/util/internal/datapiece.cc
@@ -79,7 +79,9 @@ StatusOr<To> NumberConvertAndCheck(From before) {
// For conversion between double and float only.
template <typename To, typename From>
StatusOr<To> FloatingPointConvertAndCheck(From before) {
- if (MathLimits<From>::IsNaN(before)) return std::numeric_limits<To>::quiet_NaN();
+ if (MathLimits<From>::IsNaN(before)) {
+ return std::numeric_limits<To>::quiet_NaN();
+ }
To after = static_cast<To>(before);
if (MathUtil::AlmostEquals<To>(after, before)) {
@@ -167,7 +169,7 @@ StatusOr<string> DataPiece::ToString() const {
return str_.ToString();
case TYPE_BYTES: {
string base64;
- WebSafeBase64Escape(str_, &base64);
+ Base64Escape(str_, &base64);
return base64;
}
default: