diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2018-02-13 20:52:57 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2018-02-14 01:13:51 +0100 |
commit | 3c913c3844acae8ee0d80ab174133bdc7677efea (patch) | |
tree | 1d5d9bd5bb027107748a1c843703a1e117f3fa26 /starmath/source | |
parent | 97a73d2772a86e26369fc32e25a59c0d5a274c01 (diff) |
starmath: Omit SmParser::GetError()'s argument
as it was always 0.
Change-Id: I59570967deb139f258e7aeaab17619f714bc7bb5
Reviewed-on: https://gerrit.libreoffice.org/49640
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/parse.cxx | 10 | ||||
-rw-r--r-- | starmath/source/view.cxx | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 6c5414e25d50..9bb4530eae4e 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -2418,14 +2418,10 @@ const SmErrorDesc *SmParser::PrevError() } -const SmErrorDesc *SmParser::GetError(size_t i) +const SmErrorDesc *SmParser::GetError() { - if ( i < m_aErrDescList.size() ) - return m_aErrDescList[ i ].get(); - - if ( static_cast<size_t>(m_nCurError) < m_aErrDescList.size() ) - return m_aErrDescList[ m_nCurError ].get(); - + if ( !m_aErrDescList.empty() ) + return m_aErrDescList.front().get(); return nullptr; } diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 21e3e619a978..34cff7ebedd3 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1295,7 +1295,7 @@ void SmViewShell::SetStatusText(const OUString& rText) void SmViewShell::ShowError(const SmErrorDesc* pErrorDesc) { assert(GetDoc()); - if (pErrorDesc || nullptr != (pErrorDesc = GetDoc()->GetParser().GetError(0)) ) + if (pErrorDesc || nullptr != (pErrorDesc = GetDoc()->GetParser().GetError()) ) { SetStatusText( pErrorDesc->m_aText ); GetEditWindow()->MarkError( Point( pErrorDesc->m_pNode->GetColumn(), |