summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus/src
diff options
context:
space:
mode:
authorRené Schümann <white06tiger@gmail.com>2014-12-25 00:31:38 +0000
committerRené Schümann <white06tiger@gmail.com>2014-12-25 00:31:38 +0000
commit288f205d6c240ec833af74d921076b2098f8274d (patch)
treefea67b90100a59a6211c950bb71cfe557d8862c4 /plugins/SendScreenshotPlus/src
parente7198780400e52d809f6829edbac625a96c770f0 (diff)
SendSS:
* optimize helper functions by adding "const" to read-only string parameters git-svn-id: http://svn.miranda-ng.org/main/trunk@11612 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus/src')
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.cpp16
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.h8
2 files changed, 12 insertions, 12 deletions
diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp
index 5c4cdc8162..2b7e028dbd 100644
--- a/plugins/SendScreenshotPlus/src/Utils.cpp
+++ b/plugins/SendScreenshotPlus/src/Utils.cpp
@@ -349,31 +349,31 @@ TCHAR* SaveImage(FREE_IMAGE_FORMAT fif, FIBITMAP* dib, TCHAR* pszFilename, TCHAR
}
//---------------------------------------------------------------------------
-TCHAR* GetFileNameW(TCHAR* pszPath) {
- TCHAR* slash=_tcsrchr(pszPath,_T('\\'));
+TCHAR* GetFileNameW(const TCHAR* pszPath) {
+ const TCHAR* slash=_tcsrchr(pszPath,_T('\\'));
if(!slash) slash=_tcsrchr(pszPath,_T('/'));
if(slash)
return mir_t2u(slash+1);
else
return mir_t2u(pszPath);
}
-TCHAR* GetFileExtW(TCHAR* pszPath) {
- TCHAR* slash=_tcsrchr(pszPath,_T('.'));
+TCHAR* GetFileExtW(const TCHAR* pszPath) {
+ const TCHAR* slash=_tcsrchr(pszPath,_T('.'));
if(slash)
return mir_t2u(slash);
return NULL;
}
-char* GetFileNameA(TCHAR* pszPath) {
- TCHAR* slash=_tcsrchr(pszPath,_T('\\'));
+char* GetFileNameA(const TCHAR* pszPath) {
+ const TCHAR* slash=_tcsrchr(pszPath,_T('\\'));
if(!slash) slash=_tcsrchr(pszPath,_T('/'));
if(slash)
return mir_t2a(slash+1);
else
return mir_t2a(pszPath);
}
-char* GetFileExtA(TCHAR* pszPath) {
- TCHAR* slash=_tcsrchr(pszPath,_T('.'));
+char* GetFileExtA(const TCHAR* pszPath) {
+ const TCHAR* slash=_tcsrchr(pszPath,_T('.'));
if(slash)
return mir_t2a(slash);
return NULL;
diff --git a/plugins/SendScreenshotPlus/src/Utils.h b/plugins/SendScreenshotPlus/src/Utils.h
index 9fed8a737d..2eab116f54 100644
--- a/plugins/SendScreenshotPlus/src/Utils.h
+++ b/plugins/SendScreenshotPlus/src/Utils.h
@@ -55,10 +55,10 @@ FIBITMAP* CaptureScreen(HDC hDC, SIZE size, HWND hCapture=0);
//FIBITMAP* CaptureDesktop(); /*emulate print screen (not used)*/
TCHAR* SaveImage(FREE_IMAGE_FORMAT fif, FIBITMAP* dib, TCHAR* pszFilename, TCHAR* pszExt, int flag=0);
-TCHAR* GetFileNameW(TCHAR* pszPath);
-TCHAR* GetFileExtW (TCHAR* pszPath);
-char* GetFileNameA(TCHAR* pszPath);
-char* GetFileExtA (TCHAR* pszPath);
+TCHAR* GetFileNameW(const TCHAR* pszPath);
+TCHAR* GetFileExtW (const TCHAR* pszPath);
+char* GetFileNameA(const TCHAR* pszPath);
+char* GetFileExtA (const TCHAR* pszPath);
#ifdef _UNICODE
# define GetFileName GetFileNameW
# define GetFileExt GetFileExtW