mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Performance tweaks
This commit is contained in:
parent
2b30e0eead
commit
ef37981592
@ -246,11 +246,6 @@ const WCHAR* CMeasure::CheckSubstitute(const WCHAR* buffer)
|
|||||||
int flags = PCRE_UTF8;
|
int flags = PCRE_UTF8;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
|
||||||
if (m_Substitute[i].empty())
|
|
||||||
{
|
|
||||||
m_Substitute[i] = L"^$";
|
|
||||||
}
|
|
||||||
|
|
||||||
re = pcre_compile(
|
re = pcre_compile(
|
||||||
ConvertToUTF8(m_Substitute[i].c_str()).c_str(), // the pattern
|
ConvertToUTF8(m_Substitute[i].c_str()).c_str(), // the pattern
|
||||||
flags, // default options
|
flags, // default options
|
||||||
@ -428,6 +423,11 @@ std::wstring CMeasure::ExtractWord(std::wstring& buffer)
|
|||||||
|
|
||||||
buffer.erase(0, end);
|
buffer.erase(0, end);
|
||||||
|
|
||||||
|
if (m_RegExpSubstitute && ret.empty())
|
||||||
|
{
|
||||||
|
ret = L"^$";
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user