Commit Graph

2470 Commits

Author SHA1 Message Date
Peter Kasting 4695953567 Avoid exit-time destructors.
operator[]() was recently changed to use the existing code in order to
correctly align the returned pointer; however this broke
-Wexit-time-destructors.  Change to a method that is still correctly
aligned but does not generate a destructor.
2022-05-19 11:55:17 +08:00
Peter Kasting 0390b1ad57 Avoid exit-time destructors.
operator[]() was recently changed to use the existing code in order to
correctly align the returned pointer; however this broke
-Wexit-time-destructors.  Change to a method that is still correctly
aligned but does not generate a destructor.
2022-05-19 11:55:17 +08:00
Tom Briden 2b2c804500 encdedstreamtest: fix use-after-free compile error with gcc-12 2022-05-16 10:23:11 +08:00
Tom Briden 1f59c69cd1 valuetest: fix potential write of terminating nul past the end of the destination
Fixes 2 compile errors with gcc-12, eg:

tesunittest/valuetest.cpp:1516:30: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=]
test/unittest/valuetest.cpp:1516:20: note: 'sprintf' output between 2 and 11 bytes into a destination of size 10
2022-05-16 10:23:11 +08:00
Jack·Boos·Yu 3445e155e9
Merge branch 'master' into master 2022-05-05 08:03:42 +00:00
Milo Yip fcb23c2dbf
Merge pull request #2008 from agate-pris/access-to-allocator-types
Access to allocator types
2022-04-06 12:28:13 +08:00
Milo Yip bdc49ad80a
Merge pull request #2014 from lazydroid/dev/lenik/fix_shadowed_variables
fix shadowed variable
2022-04-06 12:27:10 +08:00
Leonid Terenin 6b500986c4 fix shadowed variable, take 2 2022-04-06 10:42:40 +09:00
Leonid Terenin 3988c5e25e fix shadowed variable 2022-04-06 09:58:56 +09:00
agate-pris 386d31ab69 Allow access to the template parameter StackAllocator in the GenericDocument
Add the typedef declaration `StackAllocatorType` to the class template
`GenericDocument`. This allows the user to access the template parameter
`StackAllocator`.
2022-03-18 19:34:11 +09:00
agate-pris 79d7a448e9 Allow the macro RAPIDJSON_DEFAULT_STACK_ALLOCATOR to be used in any namespace
RAPIDJSON_DEFAULT_STACK_ALLOCATOR uses names in the namespace
`RAPIDJSON_NAMESPACE`. Replace this with a name starting in the global
namespace.
2022-03-18 19:32:01 +09:00
agate-pris 9965ab37f6 Allow the macro RAPIDJSON_DEFAULT_ALLOCATOR to be used in any namespace
`RAPIDJSON_DEFAULT_ALLOCATOR` uses names in the namespace
`RAPIDJSON_NAMESPACE`. Replace this with a name starting in the global
namespace.
2022-03-18 19:22:19 +09:00
Milo Yip 8261c1ddf4
Merge pull request #1969 from MalcolmTyrrell/MalcolmTyrrell/sanitizeSchemaCode
Sanitize the code in schema.h
2022-03-09 12:15:45 +08:00
Milo Yip 0d78b1ce93
Merge pull request #1989 from adamcalhoon/really-fix-placement-new-alignment
Fix the alignment of placement new buffer for GenericValue.
2022-03-08 17:09:47 +08:00
Adam Calhoon 1dff2abff7 Fix the alignment of placement new buffer for GenericValue.
When using operator[] on a GenericValue type clang-tidy complains,
appropriately, about the alignment of the buffer used for placement-new
of the "dummy" GenericValue.
2022-02-08 22:29:15 -05:00
Milo Yip e4bde97744
Merge pull request #1988 from Tencent/revert-1987-fix-placement-new-alignment
Revert "Fix the alignment of placement new buffer for GenericValue."
2022-02-09 10:48:22 +08:00
Milo Yip 88bbd87ddd
Revert "Fix the alignment of placement new buffer for GenericValue." 2022-02-09 10:48:05 +08:00
Milo Yip bf8ca5da88
Merge pull request #1987 from adamcalhoon/fix-placement-new-alignment
Fix the alignment of placement new buffer for GenericValue.
2022-02-09 10:47:25 +08:00
Adam Calhoon 5b242b6b2d Fix the alignment of placement new buffer for GenericValue.
When using operator[] on a GenericValue type clang-tidy complains,
appropriately, about the alignment of the buffer used for placement-new
of the "dummy" GenericValue.
2022-02-08 12:03:02 -05:00
Milo Yip fd3dc29a5c
Merge pull request #1944 from ilelann/patch-1
Support CMake none targets
2021-11-24 23:11:45 +08:00
Malcolm Tyrrell 53602ec6bb Sanitize the code in schema.h 2021-11-17 09:31:22 +00:00
Milo Yip 0d4517f15a
Merge pull request #1961 from jedwardsol/issue1960_arm64ec_intrinsic
use softintrin on arm64ec
2021-10-31 11:07:57 +08:00
jedwards 060c348ea0 use softintrin on arm64ec 2021-10-29 15:31:10 -07:00
Milo Yip 4d6cb08189
Merge pull request #1949 from ardb-uk/master
Resolving issue #1948
2021-10-15 14:34:41 +08:00
ardb-uk 033bef3c6c
Merge pull request #1 from ardb-uk/ardb-uk-patch-1
Resolve issue 1948
2021-10-12 16:33:03 +01:00
ardb-uk befba39afc
Merge pull request #2 from ardb-uk/ardb-uk-patch-1-1
Resolved issue #1948
2021-10-12 16:32:28 +01:00
ardb-uk 4bbaf28ffc
Add files via upload 2021-10-12 16:23:44 +01:00
ardb-uk 14f1e37f85
Resolve issue 1948
Correct instances of >> as they failed compilation.
2021-10-12 16:22:22 +01:00
Ivan Le Lann e6736d1baa
Support CMake none targets
When trying to import rapidjson with for exemple : 
fetchcontent_declare(rapidjson GIT_REPOSITORY https://github.com/Tencent/rapidjson.git)

if your CMake/Clang is "bare metal", exemple given : 

set(CMAKE_SYSTEM_NAME none)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(CMAKE_C_COMPILER_TARGET x86_64-elf-none)
set(CMAKE_CXX_COMPILER_TARGET x86_64-elf-none)

CMake fails to process CMakeLists.txt because of the switch on UNIX/CYGWIN/WIN32 for install directory.

Error is: 

CMake Error at cmake-build-debug-clang/_deps/rapidjson-src/CMakeLists.txt:244 (INSTALL):
  INSTALL FILES given no DESTINATION!
2021-10-02 15:26:17 +02:00
Milo Yip 2e8f5d897d
Merge pull request #1940 from smhdfdl/issue-1924
Issue 1924 - stop erroneous compiler warnings
2021-09-24 18:05:03 +08:00
Steve Hanson 9ea3f45dbd fix the warning 2021-09-24 08:51:03 +01:00
Milo Yip b9ae2499ef
Merge pull request #1941 from DiamondI/patch-1
typo on documentation dom.zh-cn.md: "己于" -> "已于"
2021-09-24 11:47:04 +08:00
Andrew 553a3ea31f
typo on documentation dom.zh-cn.md: "己于" -> "已于" 2021-09-24 10:57:46 +08:00
Steve Hanson 864e44aef8 Merge branch 'master' of https://github.com/Tencent/rapidjson 2021-09-23 14:33:30 +01:00
Milo Yip 00dbcf2c6e
Merge pull request #1926 from Kyrega/master
Fix RawNumber for characters with sizeof(Ch) > sizeof(char)
2021-08-13 12:25:41 +08:00
Kyrega 22ee8b07c8 Correct WIStreamWrapper 2021-08-10 17:39:04 +02:00
Kyrega a3d52c75b7 No default template parameter for older compilers 2021-08-10 17:38:41 +02:00
Kyrega 19b55c9049 No default template parameter for older compilers 2021-08-10 17:38:23 +02:00
Kyrega 128b1031b0 Use rapidjson internal::SelectIf 2021-08-10 17:38:09 +02:00
Kyrega 8710d7e989 Do not depend on c++11 conditional 2021-08-10 17:37:35 +02:00
Kyrega e0512e0944 Using unsigned for WIStreamWrapper 2021-08-10 17:36:31 +02:00
Kyrega 7fac34f7bb Added typename 2021-08-10 17:35:49 +02:00
Kyrega b952a592a4 Fix RawNumber for longer char types 2021-08-10 17:35:07 +02:00
Milo Yip 28c59ab4c6
Merge pull request #1922 from jack-perisich/grisu2_precision
Fix small errors in dtoa output for certain doubles
2021-08-10 22:16:46 +08:00
jack_perisich bb06211088 Fix small errors in dtoa output for certain doubles 2021-07-27 19:50:51 -04:00
Steve Hanson 7ee918fc8f Merge branch 'master' of https://github.com/Tencent/rapidjson 2021-07-09 10:47:18 +01:00
Milo Yip 48fbd8cd20
Merge pull request #1848 from smhdfdl/id-and-ref
Fix issue 1843 - support Id keyword
2021-07-09 10:57:40 +08:00
Steve Hanson 8d16abd980 Uri Parse improvements 2021-06-30 17:09:52 +01:00
Milo Yip b557259f88
Merge pull request #1904 from Tencent/issue1899_pointerappend
Fix Pointer::Append() crash for custom allocator on Windows
2021-06-14 22:49:09 +08:00
Steve Hanson a21cf9f7b8 equiv fix for issue 1899 2021-06-14 11:35:00 +01:00