diff options
Diffstat (limited to 'Common/String.h')
-rwxr-xr-x | Common/String.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Common/String.h b/Common/String.h index c4277c1c..d38cc462 100755 --- a/Common/String.h +++ b/Common/String.h @@ -52,7 +52,7 @@ inline const char* MyStringGetPrevCharPointer(const char *base, const char *p) { return CharPrevA(base, p); } inline char MyCharUpper(char c) - { return (char)(unsigned int)CharUpperA((LPSTR)(unsigned int)(unsigned char)c); } + { return (char)(unsigned int)(UINT_PTR)CharUpperA((LPSTR)(UINT_PTR)(unsigned int)(unsigned char)c); } #ifdef _UNICODE inline wchar_t MyCharUpper(wchar_t c) { return (wchar_t)CharUpperW((LPWSTR)c); } @@ -61,7 +61,7 @@ wchar_t MyCharUpper(wchar_t c); #endif inline char MyCharLower(char c) - { return (char)(unsigned int)CharLowerA((LPSTR)(unsigned int)(unsigned char)c); } + { return (char)(unsigned int)(UINT_PTR)CharLowerA((LPSTR)(UINT_PTR)(unsigned int)(unsigned char)c); } #ifdef _UNICODE inline wchar_t MyCharLower(wchar_t c) { return (wchar_t)CharLowerW((LPWSTR)c); } @@ -373,7 +373,7 @@ public: int Find(T c, int startIndex) const { T *p = _chars + startIndex; - while (true) + for (;;) { if (*p == c) return (int)(p - _chars); @@ -403,7 +403,7 @@ public: if (_length == 0) return -1; T *p = _chars + _length - 1; - while (true) + for (;;) { if (*p == c) return (int)(p - _chars); |