Kaydet (Commit) 18775b18 authored tarafından Noel Grandin's avatar Noel Grandin

inline IMark::StartsBefore

Change-Id: Ia4f4d57899821cf735a3babadd73bbd90e84afb0
Reviewed-on: https://gerrit.libreoffice.org/72983
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ed65a25a
...@@ -64,8 +64,6 @@ namespace sw { namespace mark ...@@ -64,8 +64,6 @@ namespace sw { namespace mark
{ return GetMarkStart() < rOther.GetMarkStart(); } { return GetMarkStart() < rOther.GetMarkStart(); }
bool operator==(const IMark& rOther) const bool operator==(const IMark& rOther) const
{ return GetMarkStart() == rOther.GetMarkStart(); } { return GetMarkStart() == rOther.GetMarkStart(); }
bool StartsBefore(const SwPosition& rPos) const
{ return GetMarkStart() < rPos; }
bool StartsAfter(const SwPosition& rPos) const bool StartsAfter(const SwPosition& rPos) const
{ return GetMarkStart() > rPos; } { return GetMarkStart() > rPos; }
bool EndsBefore(const SwPosition& rPos) const bool EndsBefore(const SwPosition& rPos) const
......
...@@ -164,7 +164,7 @@ namespace ...@@ -164,7 +164,7 @@ namespace
bool operator()(std::shared_ptr<sw::mark::IMark> const& pMark, bool operator()(std::shared_ptr<sw::mark::IMark> const& pMark,
SwPosition const& rPos) SwPosition const& rPos)
{ {
return pMark->StartsBefore(rPos); return pMark->GetMarkStart() < rPos;
} }
}; };
...@@ -1045,7 +1045,7 @@ namespace sw { namespace mark ...@@ -1045,7 +1045,7 @@ namespace sw { namespace mark
pMark->GetMarkStart(), pMark->GetMarkStart(),
CompareIMarkStartsBefore()); CompareIMarkStartsBefore());
for ( ; it != m_vAllMarks.end(); ++it) for ( ; it != m_vAllMarks.end(); ++it)
if (pMark->StartsBefore((*it)->GetMarkStart())) if (pMark->GetMarkStart() < (*it)->GetMarkStart())
break; break;
else if (it->get() == pMark) else if (it->get() == pMark)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment