diff options
author | dan sinclair <dsinclair@chromium.org> | 2017-04-06 14:09:04 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-06 19:15:32 +0000 |
commit | 93c086c8bc8080e7591def6eb617dfd6d11b9932 (patch) | |
tree | 698771b1c0f42ec2fdb66906fb79e8336844b12f /core/fxcrt/cfx_blockbuffer.cpp | |
parent | deff61fe7368c2db41d31accb45291dd41bacd4f (diff) | |
download | pdfium-93c086c8bc8080e7591def6eb617dfd6d11b9932.tar.xz |
Cleanup nits from previous XML Cl
Change-Id: I1e0b84a8b208d92aff3f02b6461b3a20f60f4d1e
Reviewed-on: https://pdfium-review.googlesource.com/3870
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_blockbuffer.cpp')
-rw-r--r-- | core/fxcrt/cfx_blockbuffer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fxcrt/cfx_blockbuffer.cpp b/core/fxcrt/cfx_blockbuffer.cpp index 7609fb9a25..aeef5653e8 100644 --- a/core/fxcrt/cfx_blockbuffer.cpp +++ b/core/fxcrt/cfx_blockbuffer.cpp @@ -11,7 +11,7 @@ namespace { -const int kAllocStep = 1024 * 1024; +const size_t kAllocStep = 1024 * 1024; } // namespace @@ -77,8 +77,7 @@ CFX_WideString CFX_BlockBuffer::GetTextData(size_t start, size_t length) const { size_t maybeDataLength = m_BufferSize - 1 - m_StartPosition; if (start > maybeDataLength) return CFX_WideString(); - if (length > maybeDataLength) - length = maybeDataLength; + length = std::min(length, maybeDataLength); CFX_WideString wsTextData; wchar_t* pBuf = wsTextData.GetBuffer(length); |