Skip to content

Commit 0277ebd

Browse files
committed
document.h: avoid casting away const
Another instance of casting away constness via C-style cast has been missed (introduced by Tencent#20).
1 parent be01d3d commit 0277ebd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/rapidjson/document.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class GenericValue {
202202
*/
203203
template <typename SourceAllocator>
204204
GenericValue& CopyFrom(const GenericValue<Encoding,SourceAllocator>& rhs, Allocator& allocator) {
205-
RAPIDJSON_ASSERT((void*)this != (void*)&rhs);
205+
RAPIDJSON_ASSERT((void*)this != (void const*)&rhs);
206206
this->~GenericValue();
207207
new (this) GenericValue(rhs,allocator);
208208
return *this;

0 commit comments

Comments
 (0)