Make logic more clearly

This commit is contained in:
halx99 2021-09-30 13:27:39 +08:00
parent 0d9a303991
commit 366113e72e

View File

@ -2365,7 +2365,7 @@ PUGI__NS_BEGIN
if (header & header_mask) alloc->deallocate_string(dest); if (header & header_mask) alloc->deallocate_string(dest);
// mark the string as not allocated // mark the string as not allocated
dest = !shallow_copy ? nullptr : const_cast<String>(source); dest = source_length ? nullptr : const_cast<String>(source);
header &= ~header_mask; header &= ~header_mask;
return true; return true;