Simplify UTF16LE_Encode and add unittest.
authorBo Xu <bo_xu@foxitsoftware.com>
Wed, 21 Jan 2015 20:17:23 +0000 (12:17 -0800)
committerBo Xu <bo_xu@foxitsoftware.com>
Wed, 21 Jan 2015 20:17:23 +0000 (12:17 -0800)
commit0185408126529d5df7e095c5789affd4ae971375
tree093caeab0a75ed18a26ffc3ff950b624c3e59460
parentaa7b4ede03764a5701a477b601720a32c88d8e42
Simplify UTF16LE_Encode and add unittest.

Previously, UTF16LE_Encode take an optional flag to indicate
if the returned byte string has trailing zeros. In fact, no where
needs the flag to be false. So just get rid of it so callers won't
misuse.

The bug is found by https://codereview.chromium.org/837723009

R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/860973002
BUILD.gn
core/include/fxcrt/fx_string.h
core/src/fxcrt/fx_basic_wstring.cpp
core/src/fxcrt/fx_basic_wstring_unittest.cpp [new file with mode: 0644]
fpdfsdk/src/fpdfdoc.cpp
fpdfsdk/src/fpdfview.cpp
pdfium.gyp