From b671f9f84a415206fde423b7dbbe0c15a9ec9b47 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 27 Feb 2018 22:22:00 +0300 Subject: SmileyAdd: attempt to fix code insertion --- include/m_regexp.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/m_regexp.h b/include/m_regexp.h index a497176f59..6eff132083 100644 --- a/include/m_regexp.h +++ b/include/m_regexp.h @@ -73,14 +73,12 @@ public: __forceinline bool isValid() const { return m_bIsValid; } __forceinline int numMatches() const { return m_nMatches; } - int getPos() const - { - return (m_nMatches >= 0) ? m_offsets[0] : 0; - } + __forceinline int getPos() const { return m_offsets[0]; } + __forceinline int getLength() const { return m_offsets[1] - m_offsets[0]; } CMStringW getMatch() { - return CMStringW(m_prevText + m_offsets[0], m_offsets[1] - m_offsets[0]); + return CMStringW(m_prevText + getPos(), getLength()); } CMStringW getGroup(int i) -- cgit v1.2.3