65 lines
2.3 KiB
Diff
65 lines
2.3 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index ceda71b..0128f99 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -9,6 +9,7 @@ endif()
|
|
|
|
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)
|
|
|
|
+cmake_policy(SET CMP0048 NEW)
|
|
PROJECT(RapidJSON CXX)
|
|
|
|
set(LIB_MAJOR_VERSION "1")
|
|
|
|
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
|
|
index e3e20dfb..592c5678 100644
|
|
--- a/include/rapidjson/document.h
|
|
+++ b/include/rapidjson/document.h
|
|
@@ -97,17 +97,20 @@ struct GenericMember {
|
|
|
|
\see GenericMember, GenericValue::MemberIterator, GenericValue::ConstMemberIterator
|
|
*/
|
|
+#pragma GCC diagnostic push
|
|
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
template <bool Const, typename Encoding, typename Allocator>
|
|
class GenericMemberIterator
|
|
: public std::iterator<std::random_access_iterator_tag
|
|
, typename internal::MaybeAddConst<Const,GenericMember<Encoding,Allocator> >::Type> {
|
|
-
|
|
+
|
|
friend class GenericValue<Encoding,Allocator>;
|
|
template <bool, typename, typename> friend class GenericMemberIterator;
|
|
|
|
typedef GenericMember<Encoding,Allocator> PlainType;
|
|
typedef typename internal::MaybeAddConst<Const,PlainType>::Type ValueType;
|
|
typedef std::iterator<std::random_access_iterator_tag,ValueType> BaseType;
|
|
+#pragma GCC diagnostic pop
|
|
|
|
public:
|
|
//! Iterator type itself
|
|
@@ -1936,7 +1939,10 @@ private:
|
|
if (count) {
|
|
GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
|
|
SetElementsPointer(e);
|
|
+#pragma GCC diagnostic push
|
|
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
|
|
std::memcpy(e, values, count * sizeof(GenericValue));
|
|
+#pragma GCC diagnostic pop
|
|
}
|
|
else
|
|
SetElementsPointer(0);
|
|
@@ -1949,7 +1955,10 @@ private:
|
|
if (count) {
|
|
Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
|
|
SetMembersPointer(m);
|
|
+#pragma GCC diagnostic push
|
|
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
|
|
std::memcpy(m, members, count * sizeof(Member));
|
|
+#pragma GCC diagnostic pop
|
|
}
|
|
else
|
|
SetMembersPointer(0);
|
|
diff --git a/package.json b/package.json
|
|
index 843463d7..cc6087a5 100644
|
|
Binary files a/package.json and b/package.json differ
|