summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_datetime.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-05-25 20:12:39 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-25 20:12:39 +0000
commitd4d645abecec0fe2e6477b5928cfa2967675585b (patch)
treea130cf0a76265c359e4fd1331213c836fe7066e7 /fpdfsdk/cpdfsdk_datetime.cpp
parent710fa99b0bd26e6761c4481b4b9b6d26d2954c3e (diff)
downloadpdfium-d4d645abecec0fe2e6477b5928cfa2967675585b.tar.xz
Reserve space for code words when creating encoder context
During encoding, the code is going to walk through every character in m_msg and determine what values need to be added to m_codewords. The ceiling on the number of characters being added to m_codewords is the length of m_msg, so reserving enought space in advance. This prevents thrash related to incrementing the string and thus resizing in a tight loop. BUG=chromium:846027 Change-Id: Icefd6955933f8068feeeee6243e430f60c50d747 Reviewed-on: https://pdfium-review.googlesource.com/32990 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_datetime.cpp')
0 files changed, 0 insertions, 0 deletions