Files
macports-ports/devel/rapidjson/files/patch-access_fix.diff
Ryan Carsten Schmidt 63a3caff52 rapidjson: Remove wrong assignment operator
Some compilers complained when compiling code that includes
<rapidjson/document.h>.

Closes: https://trac.macports.org/ticket/70842
2025-01-17 23:49:50 -06:00

27 lines
1.0 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Fix:
error: const size_t rapidjson::Writer<rapidjson::BasicOStreamWrapper<std::basic_ostream<char> >, rapidjson::UTF8<>, rapidjson::UTF8<>, rapidjson::CrtAllocator, 0>::kDefaultLevelDepth is protected within this context
https://github.com/Tencent/rapidjson/issues/1718
https://github.com/Tencent/rapidjson/pull/1720
--- include/rapidjson/writer.h.orig 2016-08-25 02:59:05.000000000 -0500
+++ include/rapidjson/writer.h 2025-01-17 23:30:49.000000000 -0600
@@ -251,6 +251,8 @@
*/
bool RawValue(const Ch* json, size_t length, Type type) { Prefix(type); return EndValue(WriteRawValue(json, length)); }
+ static const size_t kDefaultLevelDepth = 32;
+
protected:
//! Information for each nested level
struct Level {
@@ -259,8 +261,6 @@
bool inArray; //!< true if in array, otherwise in object
};
- static const size_t kDefaultLevelDepth = 32;
-
bool WriteNull() {
PutReserve(*os_, 4);
PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 'l'); return true;