487 Commits

Author SHA1 Message Date
miloyip
2ee15de4a9 Add no allocator overloads for Swap 2015-05-02 22:58:41 +08:00
miloyip
fd9386589f Add overloads for document as root, with no allocator parameter. 2015-05-02 22:46:30 +08:00
miloyip
d0d18847c5 Add GetValueByPointerWithDefault() overloads 2015-05-02 22:08:03 +08:00
miloyip
32b45f6e6d Add GetWithDefault() overloads 2015-05-02 21:52:49 +08:00
miloyip
2ddbd09031 Add '-' support for Create() and Set() 2015-05-02 21:30:40 +08:00
miloyip
2ece55abc7 Implement pointer parse error 2015-05-02 20:44:30 +08:00
miloyip
1ef380586d Fix a bug in Pointer::Create() and Add different overloads for Set() related implementations 2015-05-02 20:07:50 +08:00
miloyip
dba6d6f1b5 Include rapidjson.h in error/error.h and internal/*.h
Fixes #321
2015-04-28 10:09:37 +08:00
Milo Yip
316292d518 Change version to 1.0.1 2015-04-25 09:52:59 +08:00
Milo Yip
d38558ffd7 Merge pull request #314 from miloyip/issue313_exponentoverflow
Fix #313 Assertion In `Pow10.h` is triggered in Document::Parse
2015-04-25 08:54:45 +08:00
Adam Mitz
a9250d170d Fixed to build on older versions of 32-bit MSVC 2015-04-24 13:32:00 -05:00
Milo Yip
7708215b60 Try to fix #313 again 2015-04-25 00:13:09 +08:00
Milo Yip
735354efd3 Separate handling for pos/neg exp and improve pos exp overflow 2015-04-24 22:50:42 +08:00
Milo Yip
93d13ad2ac Fix #313 Assertion In Pow10.h is triggered in Document::Parse 2015-04-24 21:44:42 +08:00
miloyip
5ab3f69910 Simplify RAPIDJSON_VERSION_STRING 2015-04-22 09:19:18 +08:00
miloyip
5ab1e9361d Add version macros for RapidJSON 2015-04-21 16:38:49 +08:00
miloyip
8d39282af5 Update license headers for tests 2015-04-18 21:41:38 +08:00
Milo Yip
0e8bbe5e3e Standardize behavior of CrtAllocator::Malloc() 2015-04-17 13:01:14 +08:00
Milo Yip
4cd14b7c0e Merge pull request #305 from pah/fix/strict-memcpy
Avoid calling memcpy with NULL pointers
2015-04-17 12:28:37 +08:00
Philipp A. Hartmann
0c5c1538dc Avoid calling memcpy with NULL pointers
According to the C/C++ standards, calling `memcpy(NULL, NULL, 0)` is
undefined behaviour. Recent GCC versions may rely on this by optimizing
NULL pointer checks more aggressively, see [1].

This patch tries to avoid calling std::memcpy with zero elements.
As a side effect, explicitly return NULL when requesting an empty block
from MemoryPoolAllocator::Malloc.

This may be related to #301.

[1] https://gcc.gnu.org/gcc-4.9/porting_to.html
2015-04-16 21:05:08 +02:00
miloyip
22021d6622 Converts tabs to spaces 2015-04-16 10:15:23 +08:00
Milo Yip
8f2add7527 Not enforce force inline for debug configuration 2015-04-15 22:23:00 +08:00
thebusytypist
6ef29ff431 Fix warning about unused argument. 2015-04-15 16:09:29 +08:00
thebusytypist
5ae48a0380 Assert on impossible state transition in Transit(); Put the last case and all non-enumerated cases(also supply assertion for them) in for code coverage. 2015-04-15 15:21:42 +08:00
thebusytypist
399333226b Use assertion for impossible case(The Predict() can ensure the token is ColonToken, otherwise it would be marked as Error state. So there is no need to check ColonToken again). 2015-04-15 14:54:44 +08:00
miloyip
76d67b7eae Improves coverage of Value::Accept() 2015-04-15 12:16:16 +08:00
miloyip
2689cc4974 Remove more unused code paths in double conversions 2015-04-15 11:52:24 +08:00
miloyip
402d75a801 Fix gcc warning 2015-04-15 11:07:13 +08:00
miloyip
37d820a13e Remove unused code paths in double conversions 2015-04-15 10:58:49 +08:00
Milo Yip
afe2fbdc3f Fix the warnings again 2015-04-14 21:30:57 +08:00
Milo Yip
84e5741204 Fix gcc warning 2015-04-14 21:23:44 +08:00
Milo Yip
872aba660c Improve coverage of encoded streams 2015-04-14 21:08:33 +08:00
miloyip
4be4857a19 Remove ununused BigInteger::FullAdd() 2015-04-14 14:58:48 +08:00
miloyip
4824f12efb Fixed a bug in trimming long number sequence 2015-04-14 13:59:05 +08:00
miloyip
81c539e739 Merge remote-tracking branch 'origin/master' into issue298_coverage 2015-04-14 11:29:58 +08:00
miloyip
67be9ed2cb Remove depreciated FileStream 2015-04-14 11:08:47 +08:00
miloyip
04011cdae2 Adjust spaces 2015-04-13 22:46:27 +08:00
miloyip
65bffef4b1 Merge remote-tracking branch 'origin/master' into issue298_coverage 2015-04-13 18:39:06 +08:00
miloyip
2d07198863 Fix compilation 2015-04-13 18:24:10 +08:00
miloyip
e7f1c6dd08 Remove an invalid Document::ParseInsitu() API 2015-04-13 18:21:15 +08:00
miloyip
e9b92256a2 Add itoatest 2015-04-13 15:11:32 +08:00
miloyip
18a8891f0d Improve coverage for Writer and PrettyWriter 2015-04-13 14:50:08 +08:00
miloyip
3c028685df Add tests for Writer API for RAPIDJSON_HAS_STDSTRING 2015-04-13 14:25:05 +08:00
miloyip
127ce7175a Add a missing error handling for Writer, and add tests for invalid encoding. 2015-04-13 14:05:43 +08:00
miloyip
6ee691550f Move GenericPointer::kInvalidIndex to rapidjson::kPointerInvalidIndex
It is needed to prevent linking error for gcc/clang
2015-04-11 14:48:33 +08:00
miloyip
e346b93325 Try to fix a potential set fault on some compiler
Merge the fix from https://github.com/miloyip/itoa-benchmark/issues/8
2015-04-11 12:10:44 +08:00
miloyip
cb59a5a9a2 Correct the Value::operator==() for double. 2015-04-11 11:34:44 +08:00
Milo Yip
5ae85e67f6 Yet two more warnings 2015-04-11 00:41:09 +08:00
Milo Yip
2452afbf3c Fix -Wfloat-equal warnings in Value::operator== and valuetest 2015-04-11 00:02:17 +08:00
Milo Yip
bd435f76ab Another trial to fix the kInvalidIndex problem 2015-04-10 23:32:28 +08:00