Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
99253172
Commit
99253172
authored
Aug 01, 2015
by
Nobuaki Sukegawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gcc C++11 build
parent
bfbf35da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
field_comparator_test.cc
src/google/protobuf/util/field_comparator_test.cc
+1
-1
utility.cc
src/google/protobuf/util/internal/utility.cc
+3
-8
No files found.
src/google/protobuf/util/field_comparator_test.cc
View file @
99253172
...
...
@@ -34,8 +34,8 @@
#include <google/protobuf/unittest.pb.h>
#include <google/protobuf/descriptor.h>
#include <gtest/gtest.h>
#include <google/protobuf/stubs/mathutil.h>
#include <gtest/gtest.h>
namespace
google
{
namespace
protobuf
{
...
...
src/google/protobuf/util/internal/utility.cc
View file @
99253172
...
...
@@ -30,10 +30,6 @@
#include <google/protobuf/util/internal/utility.h>
#include <cmath>
#include <algorithm>
#include <utility>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/wrappers.pb.h>
#include <google/protobuf/descriptor.pb.h>
...
...
@@ -301,8 +297,8 @@ bool IsMap(const google::protobuf::Field& field,
}
string
DoubleAsString
(
double
value
)
{
if
(
value
==
std
::
numeric_limits
<
double
>::
infinity
(
))
return
"Infinity"
;
if
(
value
==
-
std
::
numeric_limits
<
double
>::
infinity
(
))
return
"-Infinity"
;
if
(
google
::
protobuf
::
MathLimits
<
double
>::
IsPosInf
(
value
))
return
"Infinity"
;
if
(
google
::
protobuf
::
MathLimits
<
double
>::
IsNegInf
(
value
))
return
"-Infinity"
;
if
(
google
::
protobuf
::
MathLimits
<
double
>::
IsNaN
(
value
))
return
"NaN"
;
return
SimpleDtoa
(
value
);
...
...
@@ -320,8 +316,7 @@ bool SafeStrToFloat(StringPiece str, float *value) {
}
*
value
=
static_cast
<
float
>
(
double_value
);
if
((
*
value
==
numeric_limits
<
float
>::
infinity
())
||
(
*
value
==
-
numeric_limits
<
float
>::
infinity
()))
{
if
(
google
::
protobuf
::
MathLimits
<
float
>::
IsInf
(
*
value
))
{
return
false
;
}
return
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment