diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-09-19 11:35:17 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-20 15:19:33 +0000 |
commit | bc48185643b3983fd9620ba2f987ada1478fbdc2 (patch) | |
tree | f38e4ac373b47b1907da5a4ca5853a6f93df5624 /xfa/fde/cfde_texteditengine.h | |
parent | eea631943cb9535db8be2885a7c81bda956758e5 (diff) | |
download | pdfium-bc48185643b3983fd9620ba2f987ada1478fbdc2.tar.xz |
Convert FindNextBreakPos to return position
This CL changes FindNextBreakPos to return the found index instead of
requiring a call to GetAt(). This also fixes the issue that we may
return -1 from GetAt which would cause issues in the BoundsForWordAt
method when it gets shoved into a size_t variable.
Change-Id: I29e09de5d0837921a027208fc2471a9b1de287f1
Reviewed-on: https://pdfium-review.googlesource.com/14293
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_texteditengine.h')
-rw-r--r-- | xfa/fde/cfde_texteditengine.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xfa/fde/cfde_texteditengine.h b/xfa/fde/cfde_texteditengine.h index fc5a5fb490..e26487aaf6 100644 --- a/xfa/fde/cfde_texteditengine.h +++ b/xfa/fde/cfde_texteditengine.h @@ -44,9 +44,8 @@ class CFDE_TextEditEngine { void Next(bool bPrev); wchar_t GetChar() const; - void SetAt(int32_t nIndex); - int32_t GetAt() const; - void FindNextBreakPos(bool bPrev); + void SetAt(size_t nIndex); + size_t FindNextBreakPos(bool bPrev); bool IsEOF(bool bPrev) const; private: |