From 17e54528fe0a2203074f4d086677d14c33cf7253 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 2 Aug 2017 16:36:37 -0400 Subject: Remove parameter from GetID All of the call sites for this method used the default value, so it has been removed. This simplifies converting FX_STRSIZE to be unsigned, since the removed parameter was of this type. BUG=pdfium:828 Change-Id: I369285aed561731ab34ec6d30de0d21fb3431492 Reviewed-on: https://pdfium-review.googlesource.com/9891 Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- core/fxcrt/cfx_string_c_template.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fxcrt/cfx_string_c_template.h') diff --git a/core/fxcrt/cfx_string_c_template.h b/core/fxcrt/cfx_string_c_template.h index b87b65991e..6a95a05d45 100644 --- a/core/fxcrt/cfx_string_c_template.h +++ b/core/fxcrt/cfx_string_c_template.h @@ -99,14 +99,14 @@ class CFX_StringCTemplate { return !(*this == other); } - uint32_t GetID(FX_STRSIZE start_pos = 0) const { - if (m_Length == 0 || start_pos < 0 || start_pos >= m_Length) + uint32_t GetID() const { + if (m_Length == 0) return 0; uint32_t strid = 0; - FX_STRSIZE size = std::min(4, m_Length - start_pos); + FX_STRSIZE size = std::min(4, m_Length); for (FX_STRSIZE i = 0; i < size; i++) - strid = strid * 256 + m_Ptr.Get()[start_pos + i]; + strid = strid * 256 + m_Ptr.Get()[i]; return strid << ((4 - size) * 8); } -- cgit v1.2.3