Milo Yip
d6478991d0
Try to fix clang and gcc warnings problems again x4
2015-12-18 19:54:10 +08:00
Milo Yip
a6a73b51b5
Try to fix clang and gcc warnings problems againx2
2015-12-18 19:36:51 +08:00
Milo Yip
9ce381b801
Try to fix clang and gcc warnings problems again
2015-12-18 19:15:51 +08:00
Milo Yip
17f2ca6913
Try to fix clang and gcc warnings problems
2015-12-18 19:04:09 +08:00
Milo Yip
74c8dcfd57
Fix clang -Weverything
2015-12-18 18:34:04 +08:00
Philipp A. Hartmann
7899a3c125
encodings.h: fix typo in preprocessor condition ( closes #494 )
2015-12-16 09:40:39 +01:00
Michael Haubenwallner
e706397861
detect little endian for Microsoft ARM targets
...
When _MSC_VER and _M_ARM is defined, this is some Windows ARM target
using little-endian byte order.
2015-12-04 17:54:45 +01:00
Michael Haubenwallner
5b268e6508
use <wchar.h> with C++ linkage on Windows ARM
...
Instead of commenting that we should, just do include <wchar.h>
with C++ linkage when compiling for Windows on ARM.
Actually, omitting the C linkage really should be enough here.
2015-11-30 17:34:29 +01:00
Milo Yip
28f2ed00d9
Merge pull request #484 from miloyip/Issue483_PointerValue
...
Fix #483 by using the correct value type
2015-11-30 17:37:58 +08:00
Milo Yip
db0a03a43c
Fix #483 by using the correct value type
2015-11-30 17:22:06 +08:00
Philipp A. Hartmann
98959e2820
GenericDocument: add implicit conversion to ParseResult
...
To simplify the error handling, this commit adds an implicit conversion
of GenericDocument to ParseResult, allowing code like (already in the
documentation):
ParseResult ok = doc.Parse(json);
if (!ok) // ...
2015-11-26 22:30:59 +01:00
Michael Haubenwallner
07672da098
fix Document::Parse(const Ch*) for transcoding
...
To allow for an UTF16-Document to Parse(UTF8),
the Parse() argument has to be UTF8-compatible.
2015-11-25 19:45:47 +01:00
Milo Yip
aeb5f5671d
Merge pull request #442 from FrankHB/patch-1
...
Fixed typo
2015-10-26 12:23:57 +08:00
etiennebatise
edd077f4bf
Add missing return statement, fix #448
2015-10-15 10:29:56 +02:00
etiennebatise
74a021346d
Add break at default switch case statements
...
fix issue #444
2015-10-14 15:46:26 +02:00
Andrey
f7960ac0e8
Comments parsing fixes.
...
* Comments parsing function correctly handles EOF.
* Since SkipWhitespaceAndComments can generate errors, its calls should be followed by RAPIDJSON_PARSE_ERROR_EARLY_RETURN macro.
* Some tests to make the bug never appear again.
2015-10-14 00:04:29 +03:00
Andrey
5ce78b135d
Introduce support of comments.
2015-10-11 15:09:58 +03:00
FrankHB
1640ce613c
Fixed typo
...
<algorith> should be <algorithm>.
2015-10-10 11:33:48 +08:00
Philipp A. Hartmann
fa123699d3
Keep Document value unchanged on parse error, fixes #437
...
Keeping the DOM unchanged in case of an error is the intended
behaviour according to the [documentation] [1].
Instead of forcing the value to `kNullType` before starting the
parsing, store the parsed value upon success via regular move.
[1]: https://miloyip.github.io/rapidjson/md_doc_dom.html#ParseError
2015-10-07 21:48:39 +02:00
Rodion Malinovsky
2e11498943
Fix the usage of the stack::GetAllocator
2015-09-16 14:54:38 +03:00
Rodion Malinovsky
c7433dfc5e
Add stack::HasAllocator
...
To check is it possible to expose allocator.
2015-09-16 14:53:51 +03:00
Rodion Malinovsky
8604ba0f1c
Add asserts to prevent UB
2015-09-16 14:53:12 +03:00
Kurt Johnson
2a267ff15a
check return of fwrite to avoid warn_unused_result build failures
2015-09-02 09:29:15 -05:00
Milo Yip
311b48224f
Try to fix incorrect 64-bit alignment
...
Added unit tests for alignment macros.
Fixes #418
2015-09-01 10:05:33 +08:00
Philipp A. Hartmann
afbc0406f0
BigInteger: guard against self-assignment
...
Related-to: #404 .
Suggested-by: @cosinekitty
2015-08-13 23:07:30 +02:00
blackball
c0854473e9
Implement = operator for BigInteger
...
There's a copy constructor, but no '=' operator implemented. This is dangerous.
2015-08-07 10:04:45 +02:00
blackball
fc50f103a6
Fix the error when compiled using vs2013
...
The error message for the original codes is: unary minus operator applied to unsigned type, result still unsigned. Added static casting to eliminate this message.
2015-07-24 16:19:08 +02:00
Milo Yip
1eaf180cda
Merge pull request #394 from nightmouse/master
...
Warning cleanup on osx10.10/clang, enable -Werror
2015-07-22 09:19:51 +08:00
scheiber
d26d50092d
fixing sign conversion warnings and loss of precision warnings
2015-07-21 15:15:42 -06:00
Philipp A. Hartmann
fec9e8a4f2
prohibit C++11 move from Document to Value
...
As reported in #387 , silently moving a `GenericDocument` to a
`GenericValue` can lead to object slicing and premature deletion of
the owning allocator of the (surviving) `GenericValue`.
To reduce this risk, prohibit move construction of a `GenericValue`
from a `GenericDocument`.
2015-07-17 08:24:43 +02:00
Milo Yip
823b731896
Merge pull request #376 from pah/feature/document-swap
...
add GenericDocument<>::Swap with std::swap() support
2015-07-13 21:14:02 +08:00
Philipp A. Hartmann
c2b5864927
add documentation for 'swap' friend functions
2015-07-13 14:38:24 +02:00
Philipp A. Hartmann
46e1696316
add free inline swap
functions
2015-07-13 09:35:15 +02:00
Philipp A. Hartmann
0ebe16e169
add and use simplified "internal::Swap"
...
This avoids the dependency on the <algorithm> header, as suggested by
@miloyip in #376 .
2015-07-10 17:06:52 +02:00
yuzhaol
7567752710
Declare intrinsic function to avoid LNK2019 in x64 debug mode
...
Add #pragma intrinsic(_umul128) for MSVS 2005
2015-07-09 22:42:24 +01:00
yuzhaol
8e61b72678
Declare intrinsic function to avoid LNK2019 in x64 debug mode
...
Add #pragma intrinsic(_umul128) for MSVS 2005
2015-07-09 22:39:38 +01:00
Philipp A. Hartmann
dd901f498b
add GenericDocument<>::Swap
...
See #368 .
2015-07-04 01:57:24 +02:00
Mateusz Łoskot
8197805208
Add explicit specifier to GenericDocument ctor.
...
@pah recommended to mark this constructor as explicit to avoid accidentally creating a temporary GenericDocument from a Type enum value (because all arguments but the first one are optional).
2015-07-01 22:36:26 +02:00
Mateusz Loskot
a0177ca210
Add documentation for new GenericDocument ctor taking object type.
...
Update also documentation of the existing GenericDocument constructor.
2015-06-30 10:28:07 +02:00
Mateusz Loskot
413144a8b2
Add GenericDocument ctor overload to specify JSON type.
...
It unifies the interfaces with Value where kXXXType can be passed
into constructor.
It enables shortcut that helps to avoid extra SetXXX() call following
construction of a document.
2015-06-26 16:00:49 +02:00
Milo Yip
a326314a61
Fix #538
2015-06-18 15:40:39 +08:00
Milo Yip
81678272a2
Fix #349 emscripten alignment issue
2015-06-04 16:07:43 +08:00
miloyip
ce0184e73b
Add and fix -Wimplicit-fallthrough for clang, revert #350
2015-06-03 23:53:14 +08:00
Kal Conley
013b71b92f
Fix warnings when compiling with clang and -Wimplicit-fallthrough
2015-05-31 20:35:55 +02:00
miloyip
a2d09f0a03
Refactor GenericPointer::Erase()
2015-05-21 16:13:02 +08:00
miloyip
6e1d10ec6b
Add GenericValue::EraseMember(string types) APIs
2015-05-21 16:12:33 +08:00
miloyip
1a570c342d
Fix the undefined behaviour when negating the minimum value integers in Reader
2015-05-21 16:00:32 +08:00
Milo Yip
0e9fe888b7
v1.0.2 release
2015-05-14 15:49:26 +08:00
Milo Yip
424abf1edc
Merge pull request #335 from miloyip/member_stdstring
...
Add Value::XXXMember(...) overloads for std::string
2015-05-14 14:56:35 +08:00
Milo Yip
add5a50581
Fix some numbers parsed incorrectly
...
Fix #340
2015-05-14 12:03:21 +08:00