summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_basic_buffer.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-06 16:17:06 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-06 16:17:06 -0700
commitdd995a3d20de128ff1e3143a531beed0c90d65c1 (patch)
tree07a5b3671a640b40673b6a7fb619eafeba47b211 /core/src/fxcrt/fx_basic_buffer.cpp
parent996bf1f2ba1bf89c53fca14cf2d171a5528f6183 (diff)
downloadpdfium-dd995a3d20de128ff1e3143a531beed0c90d65c1.tar.xz
Merge to XFA:Remove FX_STRSIZE casts, use safe conversions
Original Review URL: https://codereview.chromium.org/1124043003 BUG=pdfium:153 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1132443002
Diffstat (limited to 'core/src/fxcrt/fx_basic_buffer.cpp')
-rw-r--r--core/src/fxcrt/fx_basic_buffer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/fxcrt/fx_basic_buffer.cpp b/core/src/fxcrt/fx_basic_buffer.cpp
index eb5246acec..7903740e47 100644
--- a/core/src/fxcrt/fx_basic_buffer.cpp
+++ b/core/src/fxcrt/fx_basic_buffer.cpp
@@ -150,14 +150,14 @@ CFX_ByteTextBuf& CFX_ByteTextBuf::operator << (int i)
{
char buf[32];
FXSYS_itoa(i, buf, 10);
- AppendBlock(buf, (FX_STRSIZE)FXSYS_strlen(buf));
+ AppendBlock(buf, FXSYS_strlen(buf));
return *this;
}
CFX_ByteTextBuf& CFX_ByteTextBuf::operator << (FX_DWORD i)
{
char buf[32];
FXSYS_itoa(i, buf, 10);
- AppendBlock(buf, (FX_STRSIZE)FXSYS_strlen(buf));
+ AppendBlock(buf, FXSYS_strlen(buf));
return *this;
}
CFX_ByteTextBuf& CFX_ByteTextBuf::operator << (double f)
@@ -199,7 +199,7 @@ CFX_WideTextBuf& CFX_WideTextBuf::operator << (int i)
{
char buf[32];
FXSYS_itoa(i, buf, 10);
- FX_STRSIZE len = (FX_STRSIZE)FXSYS_strlen(buf);
+ FX_STRSIZE len = FXSYS_strlen(buf);
if (m_AllocSize < m_DataSize + (FX_STRSIZE)(len * sizeof(FX_WCHAR))) {
ExpandBuf(len * sizeof(FX_WCHAR));
}
@@ -228,7 +228,7 @@ CFX_WideTextBuf& CFX_WideTextBuf::operator << (double f)
}
CFX_WideTextBuf& CFX_WideTextBuf::operator << (FX_LPCWSTR lpsz)
{
- AppendBlock(lpsz, (FX_STRSIZE)FXSYS_wcslen(lpsz)*sizeof(FX_WCHAR));
+ AppendBlock(lpsz, FXSYS_wcslen(lpsz)*sizeof(FX_WCHAR));
return *this;
}
CFX_WideTextBuf& CFX_WideTextBuf::operator << (const CFX_WideTextBuf& buf)
@@ -294,7 +294,7 @@ CFX_ArchiveSaver& CFX_ArchiveSaver::operator << (FX_BSTR bstr)
}
CFX_ArchiveSaver& CFX_ArchiveSaver::operator << (FX_LPCWSTR wstr)
{
- FX_STRSIZE len = (FX_STRSIZE)FXSYS_wcslen(wstr);
+ FX_STRSIZE len = FXSYS_wcslen(wstr);
if (m_pStream) {
m_pStream->WriteBlock(&len, sizeof(int));
m_pStream->WriteBlock(wstr, len);