summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_basic_bstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/fx_basic_bstring.cpp')
-rw-r--r--core/fxcrt/fx_basic_bstring.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/core/fxcrt/fx_basic_bstring.cpp b/core/fxcrt/fx_basic_bstring.cpp
index e035dd53d1..3a81e41920 100644
--- a/core/fxcrt/fx_basic_bstring.cpp
+++ b/core/fxcrt/fx_basic_bstring.cpp
@@ -13,6 +13,7 @@
#include "third_party/base/numerics/safe_math.h"
template class CFX_StringDataTemplate<FX_CHAR>;
+template class CFX_StringCTemplate<FX_CHAR>;
namespace {
@@ -931,26 +932,6 @@ void CFX_ByteString::TrimLeft() {
uint32_t CFX_ByteString::GetID(FX_STRSIZE start_pos) const {
return AsStringC().GetID(start_pos);
}
-uint32_t CFX_ByteStringC::GetID(FX_STRSIZE start_pos) const {
- if (m_Length == 0) {
- return 0;
- }
- if (start_pos < 0 || start_pos >= m_Length) {
- return 0;
- }
- uint32_t strid = 0;
- if (start_pos + 4 > m_Length) {
- for (FX_STRSIZE i = 0; i < m_Length - start_pos; i++) {
- strid = strid * 256 + m_Ptr[start_pos + i];
- }
- strid = strid << ((4 - m_Length + start_pos) * 8);
- } else {
- for (int i = 0; i < 4; i++) {
- strid = strid * 256 + m_Ptr[start_pos + i];
- }
- }
- return strid;
-}
FX_STRSIZE FX_ftoa(FX_FLOAT d, FX_CHAR* buf) {
buf[0] = '0';
buf[1] = '\0';