abolz
8b98f4a782
Workaround incorrect rounding in MSVC
2018-06-16 09:40:40 +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
292f787c04
[Debug]
2018-06-15 15:10:50 +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
a78c8e3a4f
Add more tests (which need to be fixed)
2018-06-15 12:59:39 +02:00
abolz
cb009f3050
Return infinity if binary exponent is too large
2018-06-15 12:59:05 +02:00
abolz
7acbb87c2b
Some more tests
2018-06-15 11:39:45 +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
abolz
80dba56aca
Add tests for issues with string-to-double conversions ( #849 , #1249 , #1251 , #1253 , #1256 , #1259 )
2018-06-15 10:15:45 +02:00
Milo Yip
01c71740cd
Merge pull request #1287 from Nekto89/msvc_config
...
MSVC: Autodetect RAPIDJSON_HAS_CXX11_NOEXCEPT, RAPIDJSON_HAS_CXX11_TYPETRAITS
2018-06-14 11:04:15 +08: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
Benjamin Lee
5b0610a74f
Handle non-throwing exception specifications that can still throw #1280
2018-06-06 23:34:51 -07:00
Milo Yip
c0daf75475
Merge pull request #1279 from bogaotory/master
...
Avoid `MissingProperty` Error from `SchemaValidator` when a none-zero length value is given as `default` for the property
2018-06-02 15:20:05 +08: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
Milo Yip
af223d44f4
Merge pull request #1261 from fmalita/exponent-underflow
...
Prevent int underflow when parsing exponents
2018-05-20 13:42:13 +08: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
1329cdecce
Added test for issue #1251
2018-05-11 15:57:11 -07:00
John Stiles
cad3805737
Update readertest.cpp
2018-05-11 15:19:11 -07:00
John Stiles
f7d2cd2228
added test for parsing 0e100
2018-05-11 15:16:46 -07:00
John Stiles
532cba1422
Merge pull request #4 from Tencent/master
...
Merge
2018-05-11 14:26:21 -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
Milo Yip
ed72564e31
Merge pull request #1231 from steveire/patch-1
...
Use rvalue refs with clang-cl
2018-04-25 10:13:19 +08:00
Stephen Kelly
73b8774ab1
Use rvalue refs with clang-cl
2018-04-24 22:55:47 +01:00
Milo Yip
5fd779d91f
Merge pull request #1222 from DynonAvionics/adjustable_default_chunk_capacity
...
Allow user configuration of default chunk capacity.
2018-04-18 11:35:00 +08: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
Milo Yip
8022a5f79c
Merge pull request #1210 from foxtacles/fix-missing-remote-ref-p
...
add remote ref pointer to schemaMap_
2018-03-27 10:37:09 +08:00
Christian Semmler
9640209f78
remove superfluous typename
2018-03-26 13:29:52 +02:00
Christian Semmler
f8c8c32b42
fix C++03 compatibility
2018-03-26 13:16:31 +02:00
Christian Semmler
c8530d022f
add test case for remote ref issue
2018-03-26 13:04:35 +02:00
Christian Semmler
8a6c345bcc
add remote ref to schemaMap_
2018-03-23 23:33:20 +01:00
Milo Yip
67a17cfdbc
Merge pull request #1207 from vim2meta/master
...
Ensure a preprocessor directive is only applied to MSVC.
2018-03-20 14:46:33 +08:00
John
de6681e295
ensure the pragma is only applied to MSVC
2018-03-19 15:18:08 -04:00
Milo Yip
f0177eb936
Merge pull request #1203 from KuangLei/doc_AddingWriter
...
Adding a few missing includes in the doc
2018-03-17 00:01:42 +08:00
KLsz
f9c9339761
Adding a few missing includes
2018-03-16 23:50:17 +08:00
Milo Yip
0f96b5605a
Merge pull request #1202 from Sumoren/msc_long_part2
...
Change long/ulong as int/uint on MSC unit tests to be more inline wit…
2018-03-15 10:10:58 +08:00
MaximeBF
27424d5c09
Change long/ulong as int/uint on MSC unit tests to be more inline with other templated functions unit tests
2018-03-14 08:44:00 -04:00