From 28549c91b9fb7bdc637466218348b0759e251456 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Tue, 15 Aug 2017 11:29:16 -0400 Subject: Make GetChar & Clone const for IFX_CharIter BUG=pdfium:864 Change-Id: Iab03e1977c859f150452825650afed3520024cca Reviewed-on: https://pdfium-review.googlesource.com/11030 Reviewed-by: dsinclair Commit-Queue: Ryan Harrison --- xfa/fde/cfde_txtedtbuf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fde/cfde_txtedtbuf.cpp') diff --git a/xfa/fde/cfde_txtedtbuf.cpp b/xfa/fde/cfde_txtedtbuf.cpp index 101385b143..d0f41d8b9d 100644 --- a/xfa/fde/cfde_txtedtbuf.cpp +++ b/xfa/fde/cfde_txtedtbuf.cpp @@ -330,7 +330,7 @@ int32_t CFDE_TxtEdtBuf::Iterator::GetAt() const { return m_nIndex; } -wchar_t CFDE_TxtEdtBuf::Iterator::GetChar() { +wchar_t CFDE_TxtEdtBuf::Iterator::GetChar() const { ASSERT(m_nIndex >= 0 && m_nIndex < m_pBuf->m_nTotal); if (m_Alias == 0 || m_nIndex == (m_pBuf->m_nTotal - 1)) { wchar_t* buf = m_pBuf->m_chunks[m_nCurChunk]->wChars.get(); @@ -343,7 +343,7 @@ bool CFDE_TxtEdtBuf::Iterator::IsEOF(bool bTail) const { return bTail ? m_nIndex == (m_pBuf->GetTextLength() - 2) : m_nIndex == 0; } -std::unique_ptr CFDE_TxtEdtBuf::Iterator::Clone() { +std::unique_ptr CFDE_TxtEdtBuf::Iterator::Clone() const { auto pIter = pdfium::MakeUnique(m_pBuf, 0); pIter->m_nCurChunk = m_nCurChunk; pIter->m_nCurIndex = m_nCurIndex; -- cgit v1.2.3