Commit 0277ebdc authored by Philipp A. Hartmann's avatar Philipp A. Hartmann

document.h: avoid casting away const

Another instance of casting away constness via C-style cast
has been missed (introduced by #20).
parent be01d3d7
...@@ -202,7 +202,7 @@ public: ...@@ -202,7 +202,7 @@ public:
*/ */
template <typename SourceAllocator> template <typename SourceAllocator>
GenericValue& CopyFrom(const GenericValue<Encoding,SourceAllocator>& rhs, Allocator& allocator) { GenericValue& CopyFrom(const GenericValue<Encoding,SourceAllocator>& rhs, Allocator& allocator) {
RAPIDJSON_ASSERT((void*)this != (void*)&rhs); RAPIDJSON_ASSERT((void*)this != (void const*)&rhs);
this->~GenericValue(); this->~GenericValue();
new (this) GenericValue(rhs,allocator); new (this) GenericValue(rhs,allocator);
return *this; return *this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment