summaryrefslogtreecommitdiff
path: root/xfa/fde
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-08-15 11:29:16 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-15 15:54:21 +0000
commit28549c91b9fb7bdc637466218348b0759e251456 (patch)
tree7d3b26929d625a61b55afaecd9aa874b9c9f10a4 /xfa/fde
parent29fd935aab369d210c2a6cc2682e8aaac56d4d36 (diff)
downloadpdfium-28549c91b9fb7bdc637466218348b0759e251456.tar.xz
Make GetChar & Clone const for IFX_CharIter
BUG=pdfium:864 Change-Id: Iab03e1977c859f150452825650afed3520024cca Reviewed-on: https://pdfium-review.googlesource.com/11030 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fde')
-rw-r--r--xfa/fde/cfde_txtedtbuf.cpp4
-rw-r--r--xfa/fde/cfde_txtedtbuf.h4
2 files changed, 4 insertions, 4 deletions
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<IFX_CharIter> CFDE_TxtEdtBuf::Iterator::Clone() {
+std::unique_ptr<IFX_CharIter> CFDE_TxtEdtBuf::Iterator::Clone() const {
auto pIter = pdfium::MakeUnique<CFDE_TxtEdtBuf::Iterator>(m_pBuf, 0);
pIter->m_nCurChunk = m_nCurChunk;
pIter->m_nCurIndex = m_nCurIndex;
diff --git a/xfa/fde/cfde_txtedtbuf.h b/xfa/fde/cfde_txtedtbuf.h
index 3fbcd4b9d0..b500a9871e 100644
--- a/xfa/fde/cfde_txtedtbuf.h
+++ b/xfa/fde/cfde_txtedtbuf.h
@@ -23,13 +23,13 @@ class CFDE_TxtEdtBuf {
~Iterator() override;
bool Next(bool bPrev = false) override;
- wchar_t GetChar() override;
+ wchar_t GetChar() const override;
void SetAt(int32_t nIndex) override;
int32_t GetAt() const override;
bool IsEOF(bool bTail = true) const override;
- std::unique_ptr<IFX_CharIter> Clone() override;
+ std::unique_ptr<IFX_CharIter> Clone() const override;
private:
CFDE_TxtEdtBuf* m_pBuf;