Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
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
rapidjson
Commits
f44961ff
Commit
f44961ff
authored
Feb 24, 2016
by
Milo Yip
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into example_parsebyparts
parents
f1387ef8
e09765dd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
11 deletions
+36
-11
appveyor.yml
appveyor.yml
+17
-4
document.h
include/rapidjson/document.h
+3
-3
istreamwrapper.h
include/rapidjson/istreamwrapper.h
+6
-1
rapidjson.h
include/rapidjson/rapidjson.h
+1
-1
documenttest.cpp
test/unittest/documenttest.cpp
+5
-0
valuetest.cpp
test/unittest/valuetest.cpp
+4
-2
No files found.
appveyor.yml
View file @
f44961ff
os
:
Visual Studio 2015 CTP
version
:
1.0.2.{build}
configuration
:
...
...
@@ -6,13 +7,25 @@ configuration:
environment
:
matrix
:
-
VS_VERSION
:
11
# - VS_VERSION: 9 2008
# VS_PLATFORM: win32
# - VS_VERSION: 9 2008
# VS_PLATFORM: x64
-
VS_VERSION
:
10 2010
VS_PLATFORM
:
win32
-
VS_VERSION
:
1
1
-
VS_VERSION
:
1
0 2010
VS_PLATFORM
:
x64
-
VS_VERSION
:
12
-
VS_VERSION
:
1
1 201
2
VS_PLATFORM
:
win32
-
VS_VERSION
:
12
-
VS_VERSION
:
11 2012
VS_PLATFORM
:
x64
-
VS_VERSION
:
12 2013
VS_PLATFORM
:
win32
-
VS_VERSION
:
12 2013
VS_PLATFORM
:
x64
-
VS_VERSION
:
14 2015
VS_PLATFORM
:
win32
-
VS_VERSION
:
14 2015
VS_PLATFORM
:
x64
before_build
:
...
...
include/rapidjson/document.h
View file @
f44961ff
...
...
@@ -2254,7 +2254,7 @@ public:
template
<
unsigned
parseFlags
>
GenericDocument
&
Parse
(
const
std
::
basic_string
<
Ch
>&
str
)
{
return
Parse
<
parseFlags
,
Encoding
>
(
str
);
return
Parse
<
parseFlags
,
Encoding
>
(
str
.
c_str
()
);
}
GenericDocument
&
Parse
(
const
std
::
basic_string
<
Ch
>&
str
)
{
...
...
@@ -2462,9 +2462,9 @@ private:
ValueType
&
value_
;
};
//! Helper class for accessing Value of
array
type.
//! Helper class for accessing Value of
object
type.
/*!
Instance of this helper class is obtained by \c GenericValue::Get
Array
().
Instance of this helper class is obtained by \c GenericValue::Get
Object
().
In addition to all APIs for array type, it provides range-based for loop if \c RAPIDJSON_HAS_CXX11_RANGE_FOR=1.
*/
template
<
bool
Const
,
typename
ValueT
>
...
...
include/rapidjson/istreamwrapper.h
View file @
f44961ff
...
...
@@ -20,6 +20,11 @@ RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
padded
)
#endif
#ifdef _MSC_VER
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
4351
)
// new behavior: elements of array 'array' will be default initialized
#endif
RAPIDJSON_NAMESPACE_BEGIN
//! Wrapper of \c std::basic_istream into RapidJSON's Stream concept.
...
...
@@ -98,7 +103,7 @@ private:
typedef
BasicIStreamWrapper
<
std
::
istream
>
IStreamWrapper
;
typedef
BasicIStreamWrapper
<
std
::
wistream
>
WIStreamWrapper
;
#if
def __clang__
#if
defined(__clang__) || defined(_MSC_VER)
RAPIDJSON_DIAG_POP
#endif
...
...
include/rapidjson/rapidjson.h
View file @
f44961ff
...
...
@@ -565,7 +565,7 @@ RAPIDJSON_NAMESPACE_END
#if defined(__clang__)
#define RAPIDJSON_HAS_CXX11_RANGE_FOR __has_feature(cxx_range_for)
#elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,3,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \
(
defined
(
_MSC_VER
)
&&
_MSC_VER
>=
1
6
00
)
(
defined
(
_MSC_VER
)
&&
_MSC_VER
>=
1
7
00
)
#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1
#else
#define RAPIDJSON_HAS_CXX11_RANGE_FOR 0
...
...
test/unittest/documenttest.cpp
View file @
f44961ff
...
...
@@ -192,7 +192,12 @@ TEST(Document, Parse_Encoding) {
#if RAPIDJSON_HAS_STDSTRING
// Parse<unsigned, SourceEncoding>(std::string)
doc
.
SetNull
();
#if defined(_MSC_VER) && _MSC_VER < 1800
doc
.
Parse
<
kParseDefaultFlags
,
UTF8
<>
>
(
s2
.
c_str
());
// VS2010 or below cannot handle templated function overloading. Use const char* instead.
#else
doc
.
Parse
<
kParseDefaultFlags
,
UTF8
<>
>
(
s2
);
#endif
EXPECT_FALSE
(
doc
.
HasParseError
());
EXPECT_EQ
(
0
,
StrCmp
(
doc
[
L"hello"
].
GetString
(),
L"world"
));
#endif
...
...
test/unittest/valuetest.cpp
View file @
f44961ff
...
...
@@ -666,10 +666,12 @@ TEST(Value, IsLosslessDouble) {
EXPECT_TRUE
(
Value
(
12.34
).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
-
123
).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
2147483648u
).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
static_cast
<
int64_t
>
(
-
RAPIDJSON_UINT64_C2
(
0x40000000
,
0x00000000
))).
IsLosslessDouble
());
EXPECT_TRUE
(
Value
(
-
static_cast
<
int64_t
>
(
RAPIDJSON_UINT64_C2
(
0x40000000
,
0x00000000
))).
IsLosslessDouble
());
#if !(defined(_MSC_VER) && _MSC_VER < 1800) // VC2010 has problem
EXPECT_TRUE
(
Value
(
RAPIDJSON_UINT64_C2
(
0xA0000000
,
0x00000000
)).
IsLosslessDouble
());
#endif
EXPECT_FALSE
(
Value
(
static_cast
<
int64_t
>
(
-
RAPIDJSON_UINT64_C2
(
0x7FFFFFFF
,
0xFFFFFFFF
))).
IsLosslessDouble
());
EXPECT_FALSE
(
Value
(
-
static_cast
<
int64_t
>
(
RAPIDJSON_UINT64_C2
(
0x7FFFFFFF
,
0xFFFFFFFF
))).
IsLosslessDouble
());
EXPECT_FALSE
(
Value
(
RAPIDJSON_UINT64_C2
(
0xFFFFFFFF
,
0xFFFFFFFF
)).
IsLosslessDouble
());
}
...
...
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