diff options
Diffstat (limited to 'core/fxcrt')
-rw-r--r-- | core/fxcrt/fx_basic_bstring.cpp | 2 | ||||
-rw-r--r-- | core/fxcrt/fx_basic_gcc.cpp | 4 | ||||
-rw-r--r-- | core/fxcrt/fx_basic_util.cpp | 8 | ||||
-rw-r--r-- | core/fxcrt/include/fx_string.h | 3 |
4 files changed, 7 insertions, 10 deletions
diff --git a/core/fxcrt/fx_basic_bstring.cpp b/core/fxcrt/fx_basic_bstring.cpp index 23fdcaa25e..bfa0cbd98c 100644 --- a/core/fxcrt/fx_basic_bstring.cpp +++ b/core/fxcrt/fx_basic_bstring.cpp @@ -921,7 +921,7 @@ void CFX_ByteString::TrimLeft() { } uint32_t CFX_ByteString::GetID(FX_STRSIZE start_pos) const { - return CFX_ByteStringC(*this).GetID(start_pos); + return AsStringC().GetID(start_pos); } uint32_t CFX_ByteStringC::GetID(FX_STRSIZE start_pos) const { if (m_Length == 0) { diff --git a/core/fxcrt/fx_basic_gcc.cpp b/core/fxcrt/fx_basic_gcc.cpp index c3afe1115b..ddbdcd5881 100644 --- a/core/fxcrt/fx_basic_gcc.cpp +++ b/core/fxcrt/fx_basic_gcc.cpp @@ -133,8 +133,8 @@ uint32_t FXSYS_GetModuleFileName(void* hModule, char* buf, uint32_t bufsize) { extern "C" { #endif FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode) { - return FXSYS_fopen(CFX_ByteString::FromUnicode(filename), - CFX_ByteString::FromUnicode(mode)); + return FXSYS_fopen(CFX_ByteString::FromUnicode(filename).c_str(), + CFX_ByteString::FromUnicode(mode).c_str()); } char* FXSYS_strlwr(char* str) { if (!str) { diff --git a/core/fxcrt/fx_basic_util.cpp b/core/fxcrt/fx_basic_util.cpp index 4374dec779..1cf966589d 100644 --- a/core/fxcrt/fx_basic_util.cpp +++ b/core/fxcrt/fx_basic_util.cpp @@ -210,9 +210,9 @@ void* FX_OpenFolder(const FX_CHAR* path) { #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ #ifndef _WIN32_WCE CFindFileDataA* pData = new CFindFileDataA; - pData->m_Handle = - FindFirstFileExA(CFX_ByteString(path) + "/*.*", FindExInfoStandard, - &pData->m_FindData, FindExSearchNameMatch, NULL, 0); + pData->m_Handle = FindFirstFileExA((CFX_ByteString(path) + "/*.*").c_str(), + FindExInfoStandard, &pData->m_FindData, + FindExSearchNameMatch, NULL, 0); #else CFindFileDataW* pData = new CFindFileDataW; pData->m_Handle = FindFirstFileW(CFX_WideString::FromLocal(path) + L"/*.*", @@ -242,7 +242,7 @@ void* FX_OpenFolder(const FX_WCHAR* path) { pData->m_bEnd = FALSE; return pData; #else - DIR* dir = opendir(CFX_ByteString::FromUnicode(path)); + DIR* dir = opendir(CFX_ByteString::FromUnicode(path).c_str()); return dir; #endif } diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h index ef0dfee6fb..4b73551573 100644 --- a/core/fxcrt/include/fx_string.h +++ b/core/fxcrt/include/fx_string.h @@ -170,9 +170,6 @@ class CFX_ByteString { // Note: Any subsequent modification of |this| will invalidate the result. const FX_CHAR* c_str() const { return m_pData ? m_pData->m_String : ""; } - // Implicit conversion to C-style string -- deprecated. - operator const FX_CHAR*() const { return m_pData ? m_pData->m_String : ""; } - // Explicit conversion to uint8_t*. // Note: Any subsequent modification of |this| will invalidate the result. const uint8_t* raw_str() const { |