Skip to content

Commit e900f5b

Browse files
committed
fix README; ws
1 parent 033677c commit e900f5b

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Alternatively, from the command-line on Unix in the source directory:
6464

6565
mkdir -p ../build/debug
6666
cd ../build/debug
67-
cmake -DCMAKE_BUILD_TYPE=debug -DJSONCPP_LIB_BUILD_SHARED=OFF -G "Unix Makefiles" ../../jsoncpp/src
67+
cmake -DCMAKE_BUILD_TYPE=debug -DJSONCPP_LIB_BUILD_SHARED=OFF -G "Unix Makefiles" ../../jsoncpp
6868
make
6969

7070
Running `cmake -`" will display the list of available generators (passed using

src/lib_json/json_writer.cpp

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,15 @@ std::string valueToString(double value) {
8181
len = sprintf_s(buffer, sizeof(buffer), "%.16g", value);
8282
#endif
8383
#else
84-
if ( isfinite( value ))
85-
{
84+
if (isfinite( value )) {
8685
len = snprintf(buffer, sizeof(buffer), "%.16g", value);
87-
}
88-
else
89-
{
86+
} else {
9087
// IEEE standard states that NaN values will not compare to themselves
91-
if ( value != value)
92-
{
88+
if ( value != value) {
9389
len = snprintf(buffer, sizeof(buffer), "null");
94-
}
95-
else if ( value < 0)
96-
{
90+
} else if ( value < 0) {
9791
len = snprintf(buffer, sizeof(buffer), "-1e+9999");
98-
}
99-
else
100-
{
92+
} else {
10193
len = snprintf(buffer, sizeof(buffer), "1e+9999");
10294
}
10395
// For those, we do not need to call fixNumLoc, but it is fast.

0 commit comments

Comments
 (0)