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
Milo Yip
74f0673dad
Merge branch 'master' into schema
2015-09-01 09:32:29 +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
Milo Yip
d4d03cab1c
Use internal regex as default in schema validator
2015-05-29 19:04:17 +08:00
Milo Yip
b8d2f7e660
Merge regex into schema
2015-05-29 18:39:16 +08:00
Milo Yip
a8feeb4c3e
Add invalid regex tests and fix a bug
2015-05-29 17:42:08 +08:00
Milo Yip
c0e7c8304b
Fix a bug and add document in regex
2015-05-29 16:02:14 +08:00
Milo Yip
3eb19ceaf9
Add Search(), ^ and $ assertions to regex
2015-05-29 15:23:28 +08:00
miloyip
a5ac3b5dbc
Remove an unused line of code
2015-05-28 10:44:52 +08:00
miloyip
960bc0eabd
Fix gcc warning
2015-05-28 10:10:38 +08:00
miloyip
56b205264c
Refactor to store minIndex in Frag of regex
2015-05-28 00:05:05 +08:00
miloyip
fa7dc1c439
Add numbered quantifier
2015-05-27 23:39:22 +08:00
miloyip
51bb7631f4
Refactor regex with DecodedStream with one look-ahead character
2015-05-27 14:25:00 +08:00
miloyip
0dffe87551
Add character class escapes
2015-05-27 09:56:06 +08:00
miloyip
92285bed44
Add escape characters and control characters
2015-05-27 09:37:55 +08:00
miloyip
1784afe5f7
Add character class to regex
2015-05-26 00:40:23 +08:00
miloyip
06853b89b0
Add any character (.) to regex
2015-05-25 22:51:03 +08:00
miloyip
3c9ceb32a5
Add doxygen notes for regex
2015-05-25 22:09:32 +08:00
miloyip
328b0d8afc
Minor refactor regex
2015-05-25 19:49:07 +08:00
miloyip
994b0dfea2
Clean up regex
2015-05-25 19:42:23 +08:00
miloyip
a386934288
Add ?*+ to regex
2015-05-25 19:34:47 +08:00
miloyip
05c79891d1
Add parenthesis support in regex
2015-05-25 09:14:51 +08:00