diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-13 12:02:11 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-13 12:02:11 -0700 |
commit | 6eeffab789800e2afa1b9d10de70c9116db32355 (patch) | |
tree | f9684fa2fdd4f1416bb3d639322b20dfb53b3a44 /core/src | |
parent | c212b684cb028a5d98e57f711c9eed931b853a44 (diff) | |
download | pdfium-6eeffab789800e2afa1b9d10de70c9116db32355.tar.xz |
wstring allocations waste up to 7 wasted bytes.
Consequence of having the same code in two places;
fx_basic_bstring.cpp is correct, but fx_basic_wstring.cpp
is missing one small change.
Noticed while working on 542403, but this will not fix that
issue. It is just a space savings.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1399983003 .
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/fxcrt/fx_basic_wstring.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp index e7f8c01d41..c097e1fc09 100644 --- a/core/src/fxcrt/fx_basic_wstring.cpp +++ b/core/src/fxcrt/fx_basic_wstring.cpp @@ -32,7 +32,7 @@ CFX_WideString::StringData* CFX_WideString::StringData::Create(int nLen) { int usableLen = (totalSize - overhead) / sizeof(FX_WCHAR); FXSYS_assert(usableLen >= nLen); - void* pData = FX_Alloc(uint8_t, iSize.ValueOrDie()); + void* pData = FX_Alloc(uint8_t, totalSize); return new (pData) StringData(nLen, usableLen); } CFX_WideString::~CFX_WideString() { |