From 7558414b8aa1d14ce02e360dd88e4f421cee8725 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Fri, 1 Sep 2017 13:30:19 -0400 Subject: Prepare for converting FX_STRSIZE int->size_t When turning on this conversion a number of typing issues and other nits where found in the code base that can be merged in without actually changing the underlying type. Landing these changes before the type change CL, since there is a high likelihood that the type change will need to be rolled back, since it is high risk. BUG=pdfium:828 Change-Id: I587443d9090055963446485a1aacb8772eb5ca64 Reviewed-on: https://pdfium-review.googlesource.com/12810 Commit-Queue: Ryan Harrison Reviewed-by: Tom Sepez Reviewed-by: Henrique Nakashima --- core/fxcrt/cfx_binarybuf.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/fxcrt/cfx_binarybuf.cpp') diff --git a/core/fxcrt/cfx_binarybuf.cpp b/core/fxcrt/cfx_binarybuf.cpp index a1388b8d32..6c67912d3b 100644 --- a/core/fxcrt/cfx_binarybuf.cpp +++ b/core/fxcrt/cfx_binarybuf.cpp @@ -51,7 +51,8 @@ void CFX_BinaryBuf::ExpandBuf(FX_STRSIZE add_size) { if (m_AllocSize >= new_size.ValueOrDie()) return; - int alloc_step = std::max(128, m_AllocStep ? m_AllocStep : m_AllocSize / 4); + FX_STRSIZE alloc_step = std::max(static_cast(128), + m_AllocStep ? m_AllocStep : m_AllocSize / 4); new_size += alloc_step - 1; // Quantize, don't combine these lines. new_size /= alloc_step; new_size *= alloc_step; -- cgit v1.2.3