diff options
author | George Hazan <george.hazan@gmail.com> | 2013-11-10 10:33:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-11-10 10:33:36 +0000 |
commit | 09fba0e6c57fe19189150de73a7a9ad7f3462224 (patch) | |
tree | 82252ae41d6e67956e0ff6a3480b28016292f04b /plugins | |
parent | 9aeb4475dbf2a03d632033a623183f22389738cf (diff) |
missing method added
git-svn-id: http://svn.miranda-ng.org/main/trunk@6854 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/SmileyAdd/src/smileys.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 94da1c34bd..e2595a8dad 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -977,33 +977,29 @@ SmileyLookup::SmileyLookup(const CMString& str, const bool regexs, const int ind TCHAR msgtxt[1024];
m_ind = ind;
- if (regexs)
- {
+ if (regexs) {
static const CMString testString(_T("Test String"));
m_pattern = _TPattern::compile(str);
m_valid = m_pattern != NULL;
- if (m_valid)
- {
+ if (m_valid) {
_TMatcher* matcher = m_pattern->createTMatcher(testString);
m_valid &= (!matcher->findFirstMatch() ||
matcher->getStartingIndex() != matcher->getEndingIndex());
- if (!m_valid)
- {
+ if (!m_valid) {
static const TCHAR errmsg[] = LPGENT("Regular Expression \"%s\" in smiley pack \"%s\" could produce \"empty matches\".");
mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str());
}
delete matcher;
}
- else
- {
+ else {
static const TCHAR errmsg[] = LPGENT("Regular Expression \"%s\" in smiley pack \"%s\" malformed.") ;
mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str());
}
- if (!m_valid) CallService(MS_NETLIB_LOG, (WPARAM) hNetlibUser, (LPARAM)(char*)T2A_SM(msgtxt));
+ if (!m_valid)
+ CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)(char*)T2A_SM(msgtxt));
}
- else
- {
+ else {
m_text = str;
m_pattern = NULL;
m_valid = !str.IsEmpty();
@@ -1013,7 +1009,7 @@ SmileyLookup::SmileyLookup(const CMString& str, const bool regexs, const int ind SmileyLookup::~SmileyLookup()
{
- if (m_pattern) delete m_pattern;
+ delete m_pattern;
}
|