document.h: avoid casting away const

Another instance of casting away constness via C-style cast
has been missed (introduced by #20).
This commit is contained in:
Philipp A. Hartmann 2014-06-27 10:27:35 +02:00
parent be01d3d7cc
commit 0277ebdc3c

View File

@ -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;