summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_extension.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcrt/fx_extension.cpp')
-rw-r--r--core/src/fxcrt/fx_extension.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp
index 20e2e1a320..eeecc811c2 100644
--- a/core/src/fxcrt/fx_extension.cpp
+++ b/core/src/fxcrt/fx_extension.cpp
@@ -139,25 +139,25 @@ FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x)
{
return FXSYS_log(x) / FXSYS_log(b);
}
-FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, FX_INT32 iLength, FX_INT32 *pUsedLen)
+FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, int32_t iLength, int32_t *pUsedLen)
{
FXSYS_assert(pcsStr != NULL);
if (iLength < 0) {
- iLength = (FX_INT32)FXSYS_strlen(pcsStr);
+ iLength = (int32_t)FXSYS_strlen(pcsStr);
}
CFX_WideString ws = CFX_WideString::FromLocal(pcsStr, iLength);
return FXSYS_wcstof(ws.c_str(), iLength, pUsedLen);
}
-FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, FX_INT32 iLength, FX_INT32 *pUsedLen)
+FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, int32_t iLength, int32_t *pUsedLen)
{
FXSYS_assert(pwsStr != NULL);
if (iLength < 0) {
- iLength = (FX_INT32)FXSYS_wcslen(pwsStr);
+ iLength = (int32_t)FXSYS_wcslen(pwsStr);
}
if (iLength == 0) {
return 0.0f;
}
- FX_INT32 iUsedLen = 0;
+ int32_t iUsedLen = 0;
FX_BOOL bNegtive = FALSE;
switch (pwsStr[iUsedLen]) {
case '-':
@@ -202,7 +202,7 @@ FX_LPWSTR FXSYS_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count)
}
return dstStr;
}
-FX_INT32 FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count)
+int32_t FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count)
{
FXSYS_assert(s1 != NULL && s2 != NULL && count > 0);
FX_WCHAR wch1 = 0, wch2 = 0;
@@ -215,7 +215,7 @@ FX_INT32 FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count)
}
return wch1 - wch2;
}
-FX_INT32 FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count)
+int32_t FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count)
{
FXSYS_assert(s1 != NULL && s2 != NULL && count > 0);
FX_CHAR ch1 = 0, ch2 = 0;
@@ -228,11 +228,11 @@ FX_INT32 FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count)
}
return ch1 - ch2;
}
-FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, FX_INT32 iLength, FX_BOOL bIgnoreCase)
+FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase)
{
FXSYS_assert(pStr != NULL);
if (iLength < 0) {
- iLength = (FX_INT32)FXSYS_strlen(pStr);
+ iLength = (int32_t)FXSYS_strlen(pStr);
}
FX_LPCSTR pStrEnd = pStr + iLength;
FX_DWORD dwHashCode = 0;
@@ -247,11 +247,11 @@ FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, FX_INT32 iLength, FX_BOOL bIgno
}
return dwHashCode;
}
-FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, FX_INT32 iLength, FX_BOOL bIgnoreCase)
+FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase)
{
FXSYS_assert(pStr != NULL);
if (iLength < 0) {
- iLength = (FX_INT32)FXSYS_wcslen(pStr);
+ iLength = (int32_t)FXSYS_wcslen(pStr);
}
FX_LPCWSTR pStrEnd = pStr + iLength;
FX_DWORD dwHashCode = 0;
@@ -321,7 +321,7 @@ void FX_Random_MT_Close(FX_LPVOID pContext)
FXSYS_assert(pContext != NULL);
FX_Free(pContext);
}
-void FX_Random_GenerateMT(FX_LPDWORD pBuffer, FX_INT32 iCount)
+void FX_Random_GenerateMT(FX_LPDWORD pBuffer, int32_t iCount)
{
FX_DWORD dwSeed;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
@@ -337,7 +337,7 @@ void FX_Random_GenerateMT(FX_LPDWORD pBuffer, FX_INT32 iCount)
}
FX_Random_MT_Close(pContext);
}
-void FX_Random_GenerateBase(FX_LPDWORD pBuffer, FX_INT32 iCount)
+void FX_Random_GenerateBase(FX_LPDWORD pBuffer, int32_t iCount)
{
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
SYSTEMTIME st1, st2;
@@ -358,7 +358,7 @@ void FX_Random_GenerateBase(FX_LPDWORD pBuffer, FX_INT32 iCount)
}
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-FX_BOOL FX_GenerateCryptoRandom(FX_LPDWORD pBuffer, FX_INT32 iCount)
+FX_BOOL FX_GenerateCryptoRandom(FX_LPDWORD pBuffer, int32_t iCount)
{
HCRYPTPROV hCP = NULL;
if (!::CryptAcquireContext(&hCP, NULL, NULL, PROV_RSA_FULL, 0) || hCP == NULL) {
@@ -369,7 +369,7 @@ FX_BOOL FX_GenerateCryptoRandom(FX_LPDWORD pBuffer, FX_INT32 iCount)
return TRUE;
}
#endif
-void FX_Random_GenerateCrypto(FX_LPDWORD pBuffer, FX_INT32 iCount)
+void FX_Random_GenerateCrypto(FX_LPDWORD pBuffer, int32_t iCount)
{
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
FX_GenerateCryptoRandom(pBuffer, iCount);