diff options
author | tsepez <tsepez@chromium.org> | 2016-04-26 12:13:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-26 12:13:16 -0700 |
commit | 518fd4c5ababbfbf28e010a9c27098e8f6669e4b (patch) | |
tree | 79e20cf56d24f2aaf9463056ccb52803426be082 /core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp | |
parent | 5cc24654fb345189140acb4711ff981e1c720951 (diff) | |
download | pdfium-518fd4c5ababbfbf28e010a9c27098e8f6669e4b.tar.xz |
CFX_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.
Review URL: https://codereview.chromium.org/1916303004
Diffstat (limited to 'core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp')
0 files changed, 0 insertions, 0 deletions