diff options
Diffstat (limited to 'core/fxcrt')
-rw-r--r-- | core/fxcrt/string_data_template.h | 6 | ||||
-rw-r--r-- | core/fxcrt/widestring.cpp | 38 | ||||
-rw-r--r-- | core/fxcrt/widestring.h | 1 |
3 files changed, 0 insertions, 45 deletions
diff --git a/core/fxcrt/string_data_template.h b/core/fxcrt/string_data_template.h index bc797c07e2..f65d37c3ef 100644 --- a/core/fxcrt/string_data_template.h +++ b/core/fxcrt/string_data_template.h @@ -41,12 +41,6 @@ class StringDataTemplate { return new (pData) StringDataTemplate(nLen, usableLen); } - static StringDataTemplate* Create(const StringDataTemplate& other) { - StringDataTemplate* result = Create(other.m_nDataLength); - result->CopyContents(other); - return result; - } - static StringDataTemplate* Create(const CharType* pStr, size_t nLen) { StringDataTemplate* result = Create(nLen); result->CopyContents(pStr, nLen); diff --git a/core/fxcrt/widestring.cpp b/core/fxcrt/widestring.cpp index e3c08d72e1..146de3af0c 100644 --- a/core/fxcrt/widestring.cpp +++ b/core/fxcrt/widestring.cpp @@ -1024,48 +1024,10 @@ void WideString::TrimRight(const WideStringView& targets) { } } -float FX_wtof(const wchar_t* str, int len) { - if (len == 0) { - return 0.0; - } - int cc = 0; - bool bNegative = false; - if (str[0] == '+') { - cc++; - } else if (str[0] == '-') { - bNegative = true; - cc++; - } - int integer = 0; - while (cc < len) { - if (str[cc] == '.') { - break; - } - integer = integer * 10 + FXSYS_DecimalCharToInt(str[cc]); - cc++; - } - float fraction = 0; - if (str[cc] == '.') { - cc++; - float scale = 0.1f; - while (cc < len) { - fraction += scale * FXSYS_DecimalCharToInt(str[cc]); - scale *= 0.1f; - cc++; - } - } - fraction += static_cast<float>(integer); - return bNegative ? -fraction : fraction; -} - int WideString::GetInteger() const { return m_pData ? FXSYS_wtoi(m_pData->m_String) : 0; } -float WideString::GetFloat() const { - return m_pData ? FX_wtof(m_pData->m_String, m_pData->m_nDataLength) : 0.0f; -} - std::wostream& operator<<(std::wostream& os, const WideString& str) { return os.write(str.c_str(), str.GetLength()); } diff --git a/core/fxcrt/widestring.h b/core/fxcrt/widestring.h index c51c74506b..799eb98686 100644 --- a/core/fxcrt/widestring.h +++ b/core/fxcrt/widestring.h @@ -176,7 +176,6 @@ class WideString { void ReleaseBuffer(size_t len); int GetInteger() const; - float GetFloat() const; Optional<size_t> Find(const WideStringView& pSub, size_t start = 0) const; Optional<size_t> Find(wchar_t ch, size_t start = 0) const; |