diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-08-02 16:36:37 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-02 20:52:11 +0000 |
commit | 17e54528fe0a2203074f4d086677d14c33cf7253 (patch) | |
tree | 3c85bb3384a837617031269f7fa52e5fa84b7ed9 /core/fxcrt/cfx_string_c_template.h | |
parent | 0811da801dd72e2e0af2d7b9d1e866162df2cee1 (diff) | |
download | pdfium-17e54528fe0a2203074f4d086677d14c33cf7253.tar.xz |
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 <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_string_c_template.h')
-rw-r--r-- | core/fxcrt/cfx_string_c_template.h | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |