summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-27 22:22:00 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-27 22:22:00 +0300
commitb671f9f84a415206fde423b7dbbe0c15a9ec9b47 (patch)
treec043e1c0fd49be705ab68002f8633e59726ae940 /include
parentea5a8c7d51ff9ee1f2abcae19a1a4c29d98a6114 (diff)
SmileyAdd: attempt to fix code insertion
Diffstat (limited to 'include')
-rw-r--r--include/m_regexp.h8
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)