From 15a62973b9b89c3e229cc0ab501c45967f91b325 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 27 Apr 2015 11:22:20 -0700 Subject: Kill operator LPCWSTR from CFX_WideString(). This involves adding some explicit c_str() calls. Doing so flagged PDF_EncodeText() and FindOptionValue() as having suboptimal signatures, in that we are often throwing away a perfectly fine length and recomputing it. R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1101933003 --- fpdfsdk/src/javascript/JS_Context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/src/javascript/JS_Context.cpp') diff --git a/fpdfsdk/src/javascript/JS_Context.cpp b/fpdfsdk/src/javascript/JS_Context.cpp index bdcb1ac542..277abc08e5 100644 --- a/fpdfsdk/src/javascript/JS_Context.cpp +++ b/fpdfsdk/src/javascript/JS_Context.cpp @@ -72,11 +72,11 @@ FX_BOOL CJS_Context::DoJob(int nMode, const CFX_WideString& script, CFX_WideStri { if (nMode == 0) { - nRet = JS_Execute(*m_pRuntime, this, script, script.GetLength(), &error); + nRet = JS_Execute(*m_pRuntime, this, script.c_str(), script.GetLength(), &error); } else { - nRet = JS_Parse(*m_pRuntime, this, script, script.GetLength(), &error); + nRet = JS_Parse(*m_pRuntime, this, script.c_str(), script.GetLength(), &error); } } -- cgit v1.2.3