DescriptionCFX_ByteString::Reserve(), ReleaseBuffer() fixes.
Also identical fixes for CFX_WideString.
Reserve() on an empty string would not actually reserve a
buffer. Currently unused, but there are places where this
would really help.
ReleaseBuffer() would rarely return memory to the system, since
it would short-circuit thinking it could operate in place. Tune
the algorithm slightly so that we hold on when the savings is
small.
Bounds check release buffer args rather than just asserting.
Add tests for all of these.
Committed: https://pdfium.googlesource.com/pdfium/+/518fd4c5ababbfbf28e010a9c27098e8f6669e4b
Patch Set 1 #Patch Set 2 : Assert private copy, saner behaviour with out-of-bounds args. #
Total comments: 2
Patch Set 3 : Remove stray TrimLeft() #
Messages
Total messages: 12 (7 generated)
|