diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-08-01 16:20:40 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-01 20:42:42 +0000 |
commit | 0186c1817bd1503051597dbcf0b032d4ff1277ab (patch) | |
tree | d6fa77d9a14936838de8a54756dc2c27eed85bfe /core/fxcrt/cfx_widestring_unittest.cpp | |
parent | da129ab38c3fb6ed3de85ffb6f8938eb31130a53 (diff) | |
download | pdfium-0186c1817bd1503051597dbcf0b032d4ff1277ab.tar.xz |
Remove support for negative params to ReleaseBuffer()
This CL removes the default param value for this method, which was
negative. It also adds in a method to get buffer lengths, so that the
callsites can explictly passing in the length of the buffer if they
were using the default value previously.
BUG=pdfium:828
Change-Id: I0170771ee81970b8b601631015ab3e6e39fea8ea
Reviewed-on: https://pdfium-review.googlesource.com/9790
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_widestring_unittest.cpp')
-rw-r--r-- | core/fxcrt/cfx_widestring_unittest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/cfx_widestring_unittest.cpp b/core/fxcrt/cfx_widestring_unittest.cpp index a53e9a35e2..b743a17fd1 100644 --- a/core/fxcrt/cfx_widestring_unittest.cpp +++ b/core/fxcrt/cfx_widestring_unittest.cpp @@ -618,14 +618,14 @@ TEST(fxcrt, WideStringGetBuffer) { CFX_WideString str; wchar_t* buffer = str.GetBuffer(12); wcscpy(buffer, L"clams"); - str.ReleaseBuffer(); + str.ReleaseBuffer(str.GetStringLength()); EXPECT_EQ(L"clams", str); } { CFX_WideString str(L"cl"); wchar_t* buffer = str.GetBuffer(12); wcscpy(buffer + 2, L"ams"); - str.ReleaseBuffer(); + str.ReleaseBuffer(str.GetStringLength()); EXPECT_EQ(L"clams", str); } } |