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>
diff --git a/fxjs/cjs_util.cpp b/fxjs/cjs_util.cpp
index fec7273..3889f5a 100644
--- a/fxjs/cjs_util.cpp
+++ b/fxjs/cjs_util.cpp
@@ -183,7 +183,7 @@
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 @@
return CJS_Return(
pRuntime->NewString(printx(pRuntime->ToWideString(params[0]),
pRuntime->ToWideString(params[1]))
- .c_str()));
+ .AsStringView()));
}
enum CaseMode { kPreserveCase, kUpperCase, kLowerCase };