summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-21 15:24:49 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-21 15:24:49 -0700
commit8f608d9c0d09ab5fc19cfb4a9d5d8ccef3de6625 (patch)
tree4b646dd9d34b5373c222419209d03139c782c35a /core
parent76b88e906a992b90609864867b620289a3e928e5 (diff)
downloadpdfium-8f608d9c0d09ab5fc19cfb4a9d5d8ccef3de6625.tar.xz
Merge to XFA: Kill CFX_StringBufTemplate.
Original Review URL: https://codereview.chromium.org/1098203002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1080633008
Diffstat (limited to 'core')
-rw-r--r--core/include/fxcrt/fx_string.h56
-rw-r--r--core/src/fxcrt/fx_basic_bstring.cpp25
2 files changed, 0 insertions, 81 deletions
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h
index df7dd0c762..70f64932c8 100644
--- a/core/include/fxcrt/fx_string.h
+++ b/core/include/fxcrt/fx_string.h
@@ -428,62 +428,6 @@ inline CFX_ByteString operator + (FX_BSTR str1, const CFX_ByteString& str2)
{
return CFX_ByteString(str1, str2);
}
-class CFX_StringBufBase
-{
-public:
-
- CFX_StringBufBase(FX_STRSIZE limit)
- {
- m_Size = 0;
- m_Limit = limit;
- }
-
- FX_CHAR* GetPtr() const
- {
- return (FX_CHAR*)(this + 1);
- }
-
- FX_STRSIZE GetSize() const
- {
- return m_Size;
- }
-
- void Empty()
- {
- m_Size = 0;
- }
-
- void Copy(FX_BSTR str);
-
- void Append(FX_BSTR str);
-
- void Append(int i, FX_DWORD flags = 0);
-
- CFX_ByteStringC GetStringC() const
- {
- return CFX_ByteStringC((FX_CHAR*)(this + 1), m_Size);
- }
-
- CFX_ByteString GetString() const
- {
- return CFX_ByteString((FX_CHAR*)(this + 1), m_Size);
- }
-protected:
-
- FX_STRSIZE m_Limit;
-
- FX_STRSIZE m_Size;
-};
-template<FX_STRSIZE limit>
-class CFX_StringBufTemplate : public CFX_StringBufBase
-{
-public:
-
- CFX_StringBufTemplate() : CFX_StringBufBase(limit) {}
-
- FX_CHAR m_Buffer[limit];
-};
-typedef CFX_StringBufTemplate<256> CFX_StringBuf256;
class CFX_WideStringC
{
public:
diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp
index 895c8e560e..ea9ca85021 100644
--- a/core/src/fxcrt/fx_basic_bstring.cpp
+++ b/core/src/fxcrt/fx_basic_bstring.cpp
@@ -1137,28 +1137,3 @@ CFX_ByteString CFX_ByteString::FormatFloat(FX_FLOAT d, int precision)
FX_STRSIZE len = FX_ftoa(d, buf);
return CFX_ByteString(buf, len);
}
-void CFX_StringBufBase::Copy(FX_BSTR str)
-{
- m_Size = str.GetLength();
- if (m_Size > m_Limit) {
- m_Size = m_Limit;
- }
- FX_CHAR* pBuffer = (FX_CHAR*)(this + 1);
- FXSYS_memcpy32(pBuffer, str.GetPtr(), m_Size);
-}
-void CFX_StringBufBase::Append(FX_BSTR str)
-{
- int len = str.GetLength();
- if (len > m_Limit - m_Size) {
- len = m_Limit - m_Size;
- }
- FX_CHAR* pBuffer = (FX_CHAR*)(this + 1);
- FXSYS_memcpy32(pBuffer + m_Size, str.GetPtr(), len);
- m_Size += len;
-}
-void CFX_StringBufBase::Append(int i, FX_DWORD flags)
-{
- char buf[32];
- int len = _Buffer_itoa(buf, i, flags);
- Append(CFX_ByteStringC(buf, len));
-}