From 44223012ce0fa631cc5af6fc588166bccc3a66f6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 3 Mar 2016 14:07:30 +0000 Subject: - more obsolete shit removed; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmileyAdd/src/download.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins/SmileyAdd/src/download.cpp') diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp index 7e511a952d..f0f052b416 100644 --- a/plugins/SmileyAdd/src/download.cpp +++ b/plugins/SmileyAdd/src/download.cpp @@ -27,7 +27,7 @@ struct QueueElem CMString fname; bool needext; - QueueElem(CMString& purl, CMString& pfname, bool ne) + QueueElem(CMString &purl, CMString &pfname, bool ne) : url(purl), fname(pfname), needext(ne) { } @@ -39,7 +39,7 @@ static OBJLIST dlQueue(10); static TCHAR cachepath[MAX_PATH]; static bool threadRunning; -bool InternetDownloadFile(const char *szUrl, char* szDest, HANDLE &hHttpDwnl) +bool InternetDownloadFile(const char *szUrl, char *szDest, HANDLE &hHttpDwnl) { int result = 0xBADBAD; char *szRedirUrl = NULL; @@ -91,10 +91,9 @@ bool InternetDownloadFile(const char *szUrl, char* szDest, HANDLE &hHttpDwnl) if (!mir_strcmp(nlhrReply->headers[i].szName, "Location")) { size_t rlen = 0; if (nlhrReply->headers[i].szValue[0] == '/') { - const char* szPath; - const char* szPref = strstr(szUrl, "://"); + const char *szPref = strstr(szUrl, "://"); szPref = szPref ? szPref + 3 : szUrl; - szPath = strchr(szPref, '/'); + const char *szPath = strchr(szPref, '/'); rlen = szPath != NULL ? szPath - szUrl : mir_strlen(szUrl); } @@ -155,7 +154,7 @@ void __cdecl SmileyDownloadThread(void*) } } -bool GetSmileyFile(CMString& url, const CMString& packstr) +bool GetSmileyFile(CMString &url, const CMString &packstr) { _TPattern *urlsplit = _TPattern::compile(_T(".*/(.*)")); _TMatcher *m0 = urlsplit->createTMatcher(url); -- cgit v1.2.3