summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/download.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-11-29 18:41:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-11-29 18:41:39 +0300
commitb65ebafbb15e8e69cfa5aba221b6fd9fab1f41c7 (patch)
tree26345eb86cd7a72d25de2fd06d5e2121cf64d8ed /plugins/SmileyAdd/src/download.cpp
parent7fa12897e87d7ff7a7556a9b33afb8628b7bbeba (diff)
SmaileyAdd to use pcre16 instead of the obsoleted regexp parser
Diffstat (limited to 'plugins/SmileyAdd/src/download.cpp')
-rw-r--r--plugins/SmileyAdd/src/download.cpp11
1 files changed, 3 insertions, 8 deletions
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)