From 6a78b8c34efc8856acab62e22c61a0883311170c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 26 Aug 2015 09:14:05 +0000 Subject: - warnings' fixes; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@15032 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Utils/mir_buffer.h | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'plugins/Utils/mir_buffer.h') diff --git a/plugins/Utils/mir_buffer.h b/plugins/Utils/mir_buffer.h index c8388bd731..4d5361b8ab 100644 --- a/plugins/Utils/mir_buffer.h +++ b/plugins/Utils/mir_buffer.h @@ -27,67 +27,63 @@ Boston, MA 02111-1307, USA. #include template -static inline size_t __blen(const T *str) +inline size_t __blen(const T *str) { return 0; } template<> -static inline size_t __blen(const char *str) +inline size_t __blen(const char *str) { return mir_strlen(str); } template<> -static inline size_t __blen(const wchar_t *str) +inline size_t __blen(const wchar_t *str) { return mir_wstrlen(str); } template -static inline T * __bTranslate(const T *str) +inline T * __bTranslate(const T *str) { return 0; } template<> -static inline char * __bTranslate(const char *str) +inline char * __bTranslate(const char *str) { return Translate(str); } template<> -static inline wchar_t * __bTranslate(const wchar_t *str) +inline wchar_t * __bTranslate(const wchar_t *str) { return TranslateW(str); } template -static void __bcopy(D *dest, const O *orig, size_t len) +inline void __bcopy(D *dest, const O *orig, size_t len) { } -template<> -static void __bcopy(char *dest, const char *orig, size_t len) +inline void __bcopy(char *dest, const char *orig, size_t len) { strncpy(dest, orig, len); } -template<> -static void __bcopy(WCHAR *dest, const WCHAR *orig, size_t len) +inline void __bcopy(WCHAR *dest, const WCHAR *orig, size_t len) { wcsncpy(dest, orig, len); } -template<> -static void __bcopy(WCHAR *dest, const char *orig, size_t len) +inline void __bcopy(WCHAR *dest, const char *orig, size_t len) { MultiByteToWideChar(CallService("LangPack/GetCodePage", 0, 0), 0, orig, (int)len, dest, (int)len); } -template<> -static void __bcopy(char *dest, const WCHAR *orig, size_t len) +inline void __bcopy(char *dest, const WCHAR *orig, size_t len) { WideCharToMultiByte(CallService("LangPack/GetCodePage", 0, 0), 0, orig, (int)len, dest, (int)len, NULL, NULL); } -- cgit v1.2.3