Commit Graph

2470 Commits

Author SHA1 Message Date
Milo Yip 8f4c021fa2
Merge pull request #1689 from g199209/master
Add CMake minimum version required.
2020-04-10 17:34:09 +08:00
Gao Mingfei 1ce28f454b Add CMake minimum version required.
Interface Libraries feature is not available before CMake 3.0

Signed-off-by: Gao Mingfei <mingfei.gao@ucloud.cn>
2020-04-10 14:50:51 +08:00
Matteo Settenvini f376690822
Add a target to RapidJSONConfig.cmake.in (#1350)
This way, users can call target_link_libraries against the imported target, which is the recommended way of doing things.
2020-03-30 10:29:56 +08:00
Jun 234ff044f4
ci: upgrade distro to xenial and add arm64 test cases (#1662)
Start from xenial, Travis supports multiple CPU architectures.
To bump to this version allows expand test coverage for more
architectures.
See: https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system
Add arm64 test cases to matrix.

Change-Id: If61e2d38223dad70b542d6ec0afcf4a433c9debf
Signed-off-by: Jun He <jun.he@arm.com>

Co-authored-by: Jun He <jun.he@arm.com>
2020-03-30 10:24:11 +08:00
ioannis-e 36481c30b3
Update Visual Studio Visualizer (#1665)
1. Determine the correct type of string based on encoding
2. Omit string pointer address
2020-03-30 10:22:52 +08:00
仓鼠 d4f03d0d04
Doc: Fix some typos. (#1675) 2020-03-30 10:21:37 +08:00
Nikolay ebcbd04484
Three-way comparison for CLang 10 fix (#1679)
C++20 features must enable additional functionality, not to change interface completely
2020-03-30 10:20:35 +08:00
Romain Geissler @ Amadeus 2661a17c7e
Avoid warnings when using -std=c++20 and clang 10: use three way comparision for iterators when possible. (#1667)
/data/mwrep/res/osp/RapidJson/20-0-0-0/include/rapidjson/document.h:729:58: error: use of overloaded operator '!=' is ambiguous (with operand types 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::MemberIterator' (aka 'rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >') and 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::MemberIterator')
                for (MemberIterator m = MemberBegin(); m != MemberEnd(); ++m)
2020-03-20 13:39:48 +08:00
Jun 814bb27bf0
Replace RAPIDJSON_CLZLL with internal clzll (#1660)
RAPIDJSON_CLZLL is defined as macro of __builtin_clzll when
using gcc to compile. This introduces two issues:
1. in gcc __builtin_clzll returns int, not uint32_t.
2. __builtin_clzll return is undefined when input x is 0
See: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html

This patch removes RAPIDJSON_CLZLL, merges __builtin_clzll to
internal clzll with input check and return value explicit cast.

Change-Id: Iac4b355dc5e5b4ed9b3f35a640b6b5537e76f22c
Signed-off-by: Jun He <jun.he@arm.com>

Co-authored-by: Jun He <jun.he@arm.com>
2020-03-11 15:11:25 +08:00
Milo Yip 563fe5bbbe
PrettyWriter constructor uninitialized member (#1654)
Fix #1653
2020-03-05 14:13:11 +08:00
Milo Yip 2bed293f48
Update biginteger.h (#1652)
Fix intel compiler macro
de6681e295 (commitcomment-37645051)
2020-03-05 11:06:01 +08:00
mdamle b16cec1a1a
Closes #1643 (#1644)
This change comes up with compile time pre-processor directives to
tune the behavior of rapidjson wrt memory consumption. The idea is to
allow each module using this library to choose the right defaults based
on how it consumes memory and what performance it expects.

1. RAPIDJSON_DEFAULT_ALLOCATOR: If defined allows you to choose
	CrtAllocator over MemoryPoolAllocator. If it is not defined, chooses MemoryPoolAllocator by default.
2. RAPIDJSON_DEFAULT_STACK_ALLOCATOR: If defined allows you to choose
	MemoryPoolAllocator over CrtAllocator. If it is not defined, chooses CrtAllocator by default.
3. RAPIDJSON_VALUE_DEFAULT_OBJECT_CAPACITY and RAPIDJSON_VALUE_DEFAULT_ARRAY_CAPACITY: If defined and set to a
	value, uses that value for default number of objects/array elements to be pre-allocated. If not defined,
	uses value of 16: the current default.

Verified that all tests pass.
2020-02-25 11:34:28 +08:00
Tim Gates 98f52b6bb0
Fix simple typo: drived -> derived (#1646)
Closes #1645
2020-02-21 15:46:10 +08:00
xpahos a895ce150f
Allow escaped apostrophe in values (#1639)
* Allow escaped apostrophe in values

* Allow escaped apostrophe in values

* Canonical flag name

* Add translation for escaped apostrophe

Co-authored-by: Milo Yip <miloyip@gmail.com>
2020-02-13 09:53:15 +08:00
Milo Yip 418331e99f
Merge pull request #1631 from PhoebeHui/dev/Phoebe/vcpkg_instructions
Add vcpkg installation instructions
2020-01-17 09:55:44 +08:00
PhoebeHui b4cf6e7381 Add vcpkg installation instructions 2020-01-16 03:09:20 -08:00
Milo Yip dfbe1db9da
Merge pull request #1502 from ylavic/compilation_fixes
Compilation fixes
2019-12-03 09:51:05 +08:00
Milo Yip eeb9d553f8
Merge pull request #1617 from JPEWdev/master
Remove shadow typedef
2019-12-03 09:49:40 +08:00
Joshua Watt 134af9d811 Remove shadow typedef
Removes a duplicate and identical typedef that was causing a
'declaration shadows typedef' (-Wshadow) warning in clang.
2019-12-02 09:19:16 -06:00
Milo Yip 35e480fc4d
Merge pull request #1609 from piratf/readme_contributing
add contributing section in readme.md
2019-11-25 11:54:59 +08:00
piratf 6cadd4b2ca add contributing section in readme.md, introduced the basic cooperation process. 2019-11-24 12:28:34 +08:00
Milo Yip 6534506e82
Merge pull request #1603 from piratf/cmakelist_upgrade
fix CMake policy CMP0048 warning #1154
2019-11-11 18:03:54 +08:00
piratf 46d980b46a fix CMake policy CMP0048 warning #1154 2019-11-11 16:09:43 +08:00
Milo Yip c4c6a65410
Merge pull request #1548 from TranslucentTB/master
Fix ARM NEON under MSVC
2019-11-01 10:53:00 +08:00
Charles Milette e54aca7006
Merge branch 'master' of https://github.com/Tencent/rapidjson 2019-10-31 21:10:28 -04:00
Milo Yip bb5f966b99
Merge pull request #1591 from veekxt/patch-1
fix a typo of doc
2019-10-21 21:19:59 +08:00
VeekXT 67b245e07d
doc: fix a typo 2019-10-18 18:49:15 +08:00
Milo Yip 1a825d24fa
Merge pull request #1529 from rkoshy/master
Fixed a build issue by initializing "index" in the header file
2019-10-15 09:49:27 +08:00
Milo Yip 6a6bed2759
Merge pull request #1582 from crazyscot/master
Use C++17 fallthrough tag instead of disabling compiler warning
2019-10-08 10:12:13 +08:00
Milo Yip 5592c2eed4
Merge pull request #1544 from fredgan/master
修复文档中的错误
2019-10-08 09:57:38 +08:00
fredgan 39db1177bf fix some misspellings 2019-10-08 09:25:51 +08:00
Ross Younger 4116912cde Use C++17 fallthrough tag instead of disabling warning
Signed-off-by: Ross Younger <crazyscot@gmail.com>
2019-10-01 20:12:54 +13:00
Milo Yip d67a69a9cf
Merge pull request #1490 from MalcolmTyrrell/fixCompileErrorInPointerH
Fix vs2017 compile error C2105: '--' needs l-value
2019-09-26 10:08:13 +08:00
Milo Yip 5777291497
Merge pull request #1579 from Tencent/vs2010
Fix VS2010 build via disabling copy constructor in GenericMember
2019-09-26 10:07:46 +08:00
Milo Yip 88a1ba9e30 Provide default implementations for move constructor/assignment in GenericMember 2019-09-25 20:20:20 +08:00
Milo Yip c36b713c47 Disable copy constructor in GenericMember 2019-09-25 18:02:17 +08:00
Milo Yip 6006d6b678
Merge pull request #1573 from esrrhs/master
fix travis build
2019-09-25 14:27:37 +08:00
zhao xin 02d4ae838c
Update travis-doxygen.sh 2019-09-25 11:17:28 +08:00
zhao xin 4c1d9edb35
Update travis-doxygen.sh 2019-09-25 11:16:55 +08:00
zhao xin c136acf023
Update travis-doxygen.sh 2019-09-25 11:16:26 +08:00
zhao xin b2861565aa
Update travis-doxygen.sh 2019-09-25 11:16:06 +08:00
zhao xin ed234bf749
Update .travis.yml 2019-09-25 10:26:39 +08:00
zhao xin d3c4b2b2b1
Update .travis.yml 2019-09-25 10:17:39 +08:00
Eric Rannaud ebc003e205 Make GenericMemberIterator::Iterator public again (RAPIDJSON_NOMEMBERITERATORCLASS)
d87b698d0f made all definitions of GenericMemberIterator consistent as
classes (they were structs with RAPIDJSON_NOMEMBERITERATORCLASS
defined), but it didn't keep the member definitions public.

document.h:586:71: error: 'Iterator' is a private member of
      'rapidjson::GenericMemberIterator<false, rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >'
    typedef typename GenericMemberIterator<false,Encoding,Allocator>::Iterator MemberIterator;  //!< Member iterator for i...
                                                                      ^
document.h:2124:32: note: in instantiation of template class
      'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' requested here
class GenericDocument : public GenericValue<Encoding, Allocator> {
2019-09-12 09:08:11 -07:00
Milo Yip fcec7735dc
Merge pull request #1567 from AtnNn/master
Allow pointer tokens to have non-null-terminated strings
2019-09-12 17:40:00 +08:00
Etienne Laurin 123d7c89a4 add test for non-null-terminated token 2019-09-12 08:12:06 +01:00
Etienne Laurin 6102f0bd06 fix template parameter 2019-09-11 17:23:15 +01:00
Etienne Laurin 6fe99777e4 Allow pointer tokens to have non-null-terminated strings 2019-09-11 17:03:35 +01:00
Milo Yip 2648a732db
Merge pull request #1557 from MBoldyrev/doc/fix-uint-case
Documentation: fixed Uint case
2019-08-23 15:07:50 +08:00
Mikhail Boldyrev 8973b279cf fixed Uint case in docs 2019-08-23 07:44:29 +03:00