diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-20 20:32:04 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-20 20:32:04 +0000 |
commit | c62e8489042c5efaa3b666846b38a52da3b91481 (patch) | |
tree | f0a1ef59f861bbd8e9ba81c6fb274f44d69450ea /fxjs/cjs_util.cpp | |
parent | b6b01cb2cbaf6b38736f4dfebb9b6cdc243960f9 (diff) | |
download | pdfium-c62e8489042c5efaa3b666846b38a52da3b91481.tar.xz |
Avoid more .c_str() usage, part 3
Change-Id: I5dfadcb68e640235be6e3eb7c8d57ae3b8013d26
Reviewed-on: https://pdfium-review.googlesource.com/35691
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_util.cpp')
-rw-r--r-- | fxjs/cjs_util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fxjs/cjs_util.cpp b/fxjs/cjs_util.cpp index fec727302d..3889f5ab63 100644 --- a/fxjs/cjs_util.cpp +++ b/fxjs/cjs_util.cpp @@ -183,7 +183,7 @@ CJS_Return CJS_Util::printd(CJS_Runtime* pRuntime, return CJS_Return(JSMessage::kValueError); } - return CJS_Return(pRuntime->NewString(swResult.c_str())); + return CJS_Return(pRuntime->NewString(swResult.AsStringView())); } if (params[0]->IsString()) { @@ -259,7 +259,7 @@ CJS_Return CJS_Util::printx(CJS_Runtime* pRuntime, return CJS_Return( pRuntime->NewString(printx(pRuntime->ToWideString(params[0]), pRuntime->ToWideString(params[1])) - .c_str())); + .AsStringView())); } enum CaseMode { kPreserveCase, kUpperCase, kLowerCase }; |