diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-01-04 14:43:27 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-04 20:19:41 +0000 |
commit | c560a8c11a6f8ee239e570db8c022ae0fd2a4db5 (patch) | |
tree | 0c16389f7e5c5e29c57a9c7f77dd062fa07d8640 /core/fpdftext/cpdf_textpagefind.cpp | |
parent | df0a749452d933e4f434e2a33112667f1880db34 (diff) | |
download | pdfium-c560a8c11a6f8ee239e570db8c022ae0fd2a4db5.tar.xz |
Convert usages of pdfium::Optional to Optional
Change-Id: I29769f78eaad10c6a8b79e27524336c4f330377e
Reviewed-on: https://pdfium-review.googlesource.com/22258
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdftext/cpdf_textpagefind.cpp')
-rw-r--r-- | core/fpdftext/cpdf_textpagefind.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp index 97aa34fafe..4950a8fae2 100644 --- a/core/fpdftext/cpdf_textpagefind.cpp +++ b/core/fpdftext/cpdf_textpagefind.cpp @@ -81,7 +81,7 @@ int CPDF_TextPageFind::GetCharIndex(int index) const { bool CPDF_TextPageFind::FindFirst(const WideString& findwhat, int flags, - pdfium::Optional<size_t> startPos) { + Optional<size_t> startPos) { if (!m_pTextPage) return false; if (m_strText.IsEmpty() || m_bMatchCase != (flags & FPDFTEXT_MATCHCASE)) @@ -142,7 +142,7 @@ bool CPDF_TextPageFind::FindNext() { return m_IsFind; } int nCount = pdfium::CollectionSize<int>(m_csFindWhatArray); - pdfium::Optional<size_t> nResultPos = 0; + Optional<size_t> nResultPos = 0; size_t nStartPos = m_findNextStart.value(); bool bSpaceStart = false; for (int iWord = 0; iWord < nCount; iWord++) { @@ -236,8 +236,7 @@ bool CPDF_TextPageFind::FindPrev() { return m_IsFind; } CPDF_TextPageFind findEngine(m_pTextPage.Get()); - bool ret = - findEngine.FindFirst(m_findWhat, m_flags, pdfium::Optional<size_t>(0)); + bool ret = findEngine.FindFirst(m_findWhat, m_flags, Optional<size_t>(0)); if (!ret) { m_IsFind = false; return m_IsFind; |