Skip to content

Commit

Permalink
document.h: avoid casting away const
Browse files Browse the repository at this point in the history
Another instance of casting away constness via C-style cast
has been missed (introduced by Tencent#20).
  • Loading branch information
pah committed Jun 27, 2014
1 parent be01d3d commit 0277ebd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/rapidjson/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class GenericValue {
*/
template <typename SourceAllocator>
GenericValue& CopyFrom(const GenericValue<Encoding,SourceAllocator>& rhs, Allocator& allocator) {
RAPIDJSON_ASSERT((void*)this != (void*)&rhs);
RAPIDJSON_ASSERT((void*)this != (void const*)&rhs);
this->~GenericValue();
new (this) GenericValue(rhs,allocator);
return *this;
Expand Down

0 comments on commit 0277ebd

Please sign in to comment.