From 09fba0e6c57fe19189150de73a7a9ad7f3462224 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 10 Nov 2013 10:33:36 +0000 Subject: missing method added git-svn-id: http://svn.miranda-ng.org/main/trunk@6854 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmileyAdd/src/smileys.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'plugins/SmileyAdd/src/smileys.cpp') 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; } -- cgit v1.2.3