972 Commits

Author SHA1 Message Date
Yolan Romailler
93331cb0cd Removing always true if condition 2018-07-12 15:13:19 +02:00
Erik Froseth
3e255af03a Detect C++11 features for Developer Studio
This patch enables various C++11 features if the code is compiled with
Developer Studio compiler version 5.14 or higher.
2018-07-03 13:02:45 +02:00
Romain Moret
4595cc488e Rename a few internal preprocessor macros to avoid potential naming conflicts 2018-07-02 13:24:18 +02:00
Milo Yip
c511ce303f
Merge pull request #1250 from StilesCrisis/issue-1249-test
Unit Test: Parsing "0e100" in full precision mode causes UB
2018-06-18 23:54:53 +08:00
abolz
879ae853fe Fix offset computation in BigInteger::operator<< 2018-06-16 09:41:04 +02:00
abolz
a2813b6739 Limit exponents 2018-06-15 17:10:36 +02:00
abolz
6cd5cd7b94 [Debug - Initialize variable] 2018-06-15 16:01:52 +02:00
abolz
695c9cb976 Use C macros with the correct header instead of std::numeric_limits and static_cast
=D
2018-06-15 14:06:14 +02:00
abolz
1d636de81e Fix another signed/unsigned warning 2018-06-15 13:53:48 +02:00
abolz
a2a7d97b3b Use std::numeric_limits instead of macros 2018-06-15 13:50:19 +02:00
abolz
fc85fbeef0 Fix implicit signed/unsigned conversion and a small glitch in the error computation - part 2 2018-06-15 13:44:43 +02:00
abolz
16c97cd7c5 Fix implicit signed/unsigned conversion and a small glitch in the error computation 2018-06-15 13:44:15 +02:00
abolz
2ea43433e2 Fix bogus gcc warning 2018-06-15 13:41:44 +02:00
abolz
cb009f3050 Return infinity if binary exponent is too large 2018-06-15 12:59:05 +02:00
abolz
4e9b4f6d6a Return 0 if binary exponent is too small 2018-06-15 11:32:32 +02:00
abolz
f5e5d47fac Properly test for overflow
Do not use an approximation to do this. Instead check if the result is Inf.
2018-06-15 11:29:48 +02:00
abolz
d83d2ba260 Trim all zeros from input
If the buffer only contains zeros, return 0.
2018-06-15 10:46:45 +02:00
abolz
c59ecc857d Replace unsigned with signed integer arithmetic in strtod 2018-06-15 10:44:10 +02:00
abolz
29b6c9b7dc Add assertions to check preconditions of functions and unsigned integer arithmetic 2018-06-15 10:35:31 +02:00
Marian Klymov
2b0843037e Autodetect RAPIDJSON_HAS_CXX11_NOEXCEPT and RAPIDJSON_HAS_CXX11_TYPETRAITS for Visual Studio 2018-06-13 20:43:16 +03:00
bogaotory
6f7dcb30d9 again, in relation to solving issue #784, use SizeType-typed variable to indicate a none-zero length string has been given in the schema as default value for the json property; added an unittest Object_Required_PassWithDefault 2018-06-01 21:16:26 +01:00
bogaotory
fa98b5b4b6 in relation to solving issue #784, this commit enables the schema to recognise the "default" property, and avoids a missing property error when a default is given in the schema 2018-06-01 11:07:53 +01:00
Florin Malita
8269bc2bc2 Prevent int underflow when parsing exponents
When parsing negative exponents, the current implementation takes
precautions for |exp| to not underflow int.

But that is not sufficient: later on [1], |exp + expFrac| is also
stored to an int - so we must ensure that the sum stays within int
representable values.

Update the exp clamping logic to take expFrac into account.

[1] https://github.com/Tencent/rapidjson/blob/master/include/rapidjson/reader.h#L1690
2018-05-15 22:48:07 -04:00
John Stiles
f7d2cd2228 added test for parsing 0e100 2018-05-11 15:16:46 -07:00
Milo Yip
a091035846
Merge pull request #1240 from ksergey/FIX_Reader
Added const for Reader methods
2018-05-04 10:11:59 +08:00
Sergey Kovalevich
d0a78bf56e Added const for Reader methods 2018-05-03 15:11:16 +03:00
Milo Yip
b32cd9421c
Merge pull request #1217 from tresorit/win-clang-fix
Fix compilation on windows with clang
2018-04-25 10:13:55 +08:00
Stephen Kelly
73b8774ab1
Use rvalue refs with clang-cl 2018-04-24 22:55:47 +01:00
Ryan Morris
6f587466a1 Added macro RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY to allow default chunk capacity to be lowered for embedded devices with < 64k stack sizes 2018-04-17 12:53:23 -07:00
Zoltan Kovago
0fdd8040ce fix compilation on windows with clang 2018-04-09 15:47:17 +02:00
Christian Semmler
8a6c345bcc add remote ref to schemaMap_ 2018-03-23 23:33:20 +01:00
John
de6681e295 ensure the pragma is only applied to MSVC 2018-03-19 15:18:08 -04:00
sergey kachanovskiy
2e5dcceda0 Fixes #1198 2018-03-12 16:11:09 +01:00
MaximeBF
294a5aca8f Support long and unsined long as int and unsigned on Microsft platforms 2018-03-06 11:17:04 -05:00
maficccc@gmail.com
72481d5a04 Fix warnings Dereference of null pointer 2018-03-03 00:08:11 +01:00
Milo Yip
9dfc437477
Merge pull request #1182 from Romain-Geissler-1A/ignore-gcc-8-warnings
Ignore GCC 8 warnings.
2018-02-22 09:24:02 +08:00
Romain Geissler
54dab1eebb Ignore GCC 8 warnings. 2018-02-19 12:52:16 +01:00
luz.paz
915218878a Misc. typos
Found via `codespell -q 3` in  downstream https://github.com/BlueBrain/Brayns
2018-02-19 06:42:52 -05:00
Milo Yip
59181a052f Revert "Fix API constness"
This reverts commit 0d2580f1f0a24d24c0e015d01fc9567a7365ce7e.
2018-02-13 12:27:25 +08:00
Milo Yip
0d2580f1f0 Fix API constness
Fix #1014
2018-02-13 12:20:08 +08:00
Milo Yip
966987625c Add transcoding/validation to Writer::RawValue()
Fix #1152
2018-02-13 10:58:41 +08:00
Milo Yip
e2d0437a9c Fix false alarm from clang-tidy
Fix #1174
2018-02-12 17:38:46 +08:00
Milo Yip
672e7dd373 Fix invalid type in Pointer
Fixed https://github.com/miloyip/rapidjson-gitbook/issues/1
2018-02-12 10:16:27 +08:00
Milo Yip
daabb88e00
Merge pull request #1068 from yurikhan/violationDetails
Schema violation details
2018-01-26 11:26:27 +08:00
Milo Yip
7641af690e
Merge pull request #1122 from svart-riddare/issue-1108
Suggestion for issue #1108
2018-01-26 10:59:11 +08:00
Milo Yip
b1e556d713
Merge branch 'master' into violationDetails 2018-01-13 22:34:58 +08:00
Milo Yip
03f5de9d7e
Merge pull request #1065 from yurikhan/invalidSchemaPointer
Fix reported violated schema pointer when that schema is remote
2018-01-13 21:17:56 +08:00
xiaoPierre
b8c12c9ccd Bug when switching to std regex
I could not switch to std regex after defining the two variables as in documents. Then I try to fix it in schema.h.
2018-01-11 17:45:35 +01:00
Lele Gaifax
20d44d9c44 Fix FileWriteStream doc 2017-12-22 19:24:15 +01:00
sjaques
9bfa0bb567 Fix uninitilized member Reader::state_ 2017-12-21 13:40:28 +01:00