diff options
author | René Schümann <white06tiger@gmail.com> | 2014-12-25 00:31:38 +0000 |
---|---|---|
committer | René Schümann <white06tiger@gmail.com> | 2014-12-25 00:31:38 +0000 |
commit | 288f205d6c240ec833af74d921076b2098f8274d (patch) | |
tree | fea67b90100a59a6211c950bb71cfe557d8862c4 /plugins/SendScreenshotPlus/src/Utils.cpp | |
parent | e7198780400e52d809f6829edbac625a96c770f0 (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/Utils.cpp')
-rw-r--r-- | plugins/SendScreenshotPlus/src/Utils.cpp | 16 |
1 files changed, 8 insertions, 8 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; |