summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/PublicMethods.cpp
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-12-30 16:56:12 -0800
committerBo Xu <bo_xu@foxitsoftware.com>2014-12-30 16:56:12 -0800
commit659a56bcbeb12b22708fe979d12b318080d828ba (patch)
treea2dcf561ef8db60344789adc97dbd690f828825c /fpdfsdk/src/javascript/PublicMethods.cpp
parent3fc36e8ba200e0dd6099a1f4d72c463c3e8a1d01 (diff)
downloadpdfium-659a56bcbeb12b22708fe979d12b318080d828ba.tar.xz
Get rid of FX_LPCSTR cast.
Follow up on https://codereview.chromium.org/733693003 R=brucedawson@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/809993004
Diffstat (limited to 'fpdfsdk/src/javascript/PublicMethods.cpp')
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index b29a5b4f3c..3eb8a09ee7 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -443,7 +443,7 @@ CJS_Array CJS_PublicMethods::AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Valu
const char * pTemp = strchr(p, ch);
if (pTemp == NULL)
{
- StrArray.SetElement(nIndex, CJS_Value(isolate,(FX_LPCSTR)StrTrim(p)));
+ StrArray.SetElement(nIndex, CJS_Value(isolate, StrTrim(p).c_str()));
break;
}
else
@@ -452,7 +452,7 @@ CJS_Array CJS_PublicMethods::AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Valu
strncpy(pSub, p, pTemp - p);
*(pSub + (pTemp - p)) = '\0';
- StrArray.SetElement(nIndex, CJS_Value(isolate,(FX_LPCSTR)StrTrim(pSub)));
+ StrArray.SetElement(nIndex, CJS_Value(isolate, StrTrim(pSub).c_str()));
delete []pSub;
nIndex ++;
@@ -1807,7 +1807,7 @@ FX_BOOL CJS_PublicMethods::AFSpecial_Format(OBJ_METHOD_PARAMS)
if(!pEvent->m_pValue)
return FALSE;
CFX_WideString& Value = pEvent->Value();
- std::string strSrc = (FX_LPCSTR)CFX_ByteString::FromUnicode(Value);
+ std::string strSrc = CFX_ByteString::FromUnicode(Value).c_str();
switch (iIndex)
{
@@ -1962,7 +1962,7 @@ FX_BOOL CJS_PublicMethods::AFSpecial_Keystroke(OBJ_METHOD_PARAMS)
return FALSE;
//CJS_Value val = pEvent->Value();
CFX_WideString& val = pEvent->Value();
- std::string strSrc = (FX_LPCSTR)CFX_ByteString::FromUnicode(val);
+ std::string strSrc = CFX_ByteString::FromUnicode(val).c_str();
std::wstring wstrChange(pEvent->Change());
switch (iIndex)