summaryrefslogtreecommitdiff
path: root/include/m_string.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-18 16:00:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-18 16:00:04 +0000
commit774574b6ccdfb7b87e5d5a97ad42e887109b1725 (patch)
tree77c910df31257aadeacb5a7e0226bb42e5cf53cc /include/m_string.h
parentd9ecab2dcd4ca334e1923d8c9beadeb3e231a4b8 (diff)
fixes bug #800 (CMString::MakeUpper() and CMString::MakeLower() bug)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11514 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_string.h')
-rw-r--r--include/m_string.h46
1 files changed, 16 insertions, 30 deletions
diff --git a/include/m_string.h b/include/m_string.h
index 54c464461a..0d488ff851 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -675,37 +675,25 @@ public:
static LPSTR __stdcall StringUppercase(LPSTR psz)
{
-#pragma warning (push)
-#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >(_mbsupr(reinterpret_cast< unsigned char* >(psz)));
-#pragma warning (pop)
+ CharUpperBuffA(psz, (DWORD)strlen(psz));
+ return psz;
}
static LPSTR __stdcall StringLowercase(LPSTR psz)
{
-#pragma warning (push)
-#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >(_mbslwr(reinterpret_cast< unsigned char* >(psz)));
-#pragma warning (pop)
+ CharLowerBuffA(psz, (DWORD)strlen(psz));
+ return psz;
}
static LPSTR __stdcall StringUppercase(LPSTR psz, size_t size)
{
- #if _MSC_VER >= 1400
- _mbsupr_s(reinterpret_cast< unsigned char* >(psz), size);
- #else
- _mbsupr(reinterpret_cast< unsigned char* >(psz));
- #endif
+ CharUpperBuffA(psz, (DWORD)size);
return psz;
}
static LPSTR __stdcall StringLowercase(LPSTR psz, size_t size)
{
- #if _MSC_VER >= 1400
- _mbslwr_s(reinterpret_cast< unsigned char* >(psz), size);
- #else
- _mbslwr(reinterpret_cast< unsigned char* >(psz));
- #endif
+ CharLowerBuffA(psz, (DWORD)size);
return psz;
}
@@ -923,28 +911,26 @@ public:
static LPWSTR __stdcall StringUppercase(LPWSTR psz)
{
-#pragma warning (push)
-#pragma warning(disable : 4996)
- return _wcsupr(psz);
-#pragma warning (pop)
+ CharUpperBuffW(psz, (DWORD)wcslen(psz));
+ return psz;
}
static LPWSTR __stdcall StringLowercase(LPWSTR psz)
{
-#pragma warning (push)
-#pragma warning(disable : 4996)
- return _wcslwr(psz);
-#pragma warning (pop)
+ CharLowerBuffW(psz, (DWORD)wcslen(psz));
+ return psz;
}
- static LPWSTR __stdcall StringUppercase(LPWSTR psz, size_t)
+ static LPWSTR __stdcall StringUppercase(LPWSTR psz, size_t len)
{
- return _wcsupr(psz);
+ CharUpperBuffW(psz, (DWORD)len);
+ return psz;
}
- static LPWSTR __stdcall StringLowercase(LPWSTR psz, size_t)
+ static LPWSTR __stdcall StringLowercase(LPWSTR psz, size_t len)
{
- return _wcslwr(psz);
+ CharLowerBuffW(psz, (DWORD)len);
+ return psz;
}
static LPWSTR __stdcall StringReverse(LPWSTR psz)