diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-27 22:22:00 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-27 22:22:00 +0300 |
commit | b671f9f84a415206fde423b7dbbe0c15a9ec9b47 (patch) | |
tree | c043e1c0fd49be705ab68002f8633e59726ae940 /include | |
parent | ea5a8c7d51ff9ee1f2abcae19a1a4c29d98a6114 (diff) |
SmileyAdd: attempt to fix code insertion
Diffstat (limited to 'include')
-rw-r--r-- | include/m_regexp.h | 8 |
1 files changed, 3 insertions, 5 deletions
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) |