From b65ebafbb15e8e69cfa5aba221b6fd9fab1f41c7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 29 Nov 2017 18:41:39 +0300 Subject: SmaileyAdd to use pcre16 instead of the obsoleted regexp parser --- plugins/SmileyAdd/src/download.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'plugins/SmileyAdd/src/download.cpp') diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp index a305436364..7633dffab0 100644 --- a/plugins/SmileyAdd/src/download.cpp +++ b/plugins/SmileyAdd/src/download.cpp @@ -158,18 +158,13 @@ void __cdecl SmileyDownloadThread(void*) bool GetSmileyFile(CMStringW &url, const CMStringW &packstr) { - _TPattern *urlsplit = _TPattern::compile(L".*/(.*)"); - _TMatcher *m0 = urlsplit->createWCMatcher(url); - - m0->findFirstMatch(); + MRegexp16 urlsplit(L".*/(.*)"); + urlsplit.match(url); CMStringW filename; filename.AppendFormat(L"%s\\%s\\", cachepath, packstr.c_str()); int pathpos = filename.GetLength(); - filename += m0->getGroup(1); - - delete m0; - delete urlsplit; + filename += urlsplit.getGroup(1); bool needext = filename.Find('.') == -1; if (needext) -- cgit v1.2.3