summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/Field.cpp
diff options
context:
space:
mode:
authorBruce Dawson <brucedawson@google.com>2014-11-17 15:33:04 -0800
committerBruce Dawson <brucedawson@google.com>2014-11-17 15:33:04 -0800
commitcf19caadfa3e7e01d3412d83540e8492b52b31d7 (patch)
treef100f6946c18e387b6a0eaf14b396e79d564ac9c /fpdfsdk/src/javascript/Field.cpp
parent9ae02acf2f33fc68a6f3c00c3ad86e15725b8941 (diff)
downloadpdfium-cf19caadfa3e7e01d3412d83540e8492b52b31d7.tar.xz
Removing unnecessary casts from wchar_t* to wchar_t*, by various names.
Remove casts that merely cast from wchar_t* to wchar_t*. Sometimes the types or casts are FX_LPCWSTR but the idea is the same. Excess casts can (and have) hidden bugs so removing these may prevent future problems. Original patch from Bruce Dawson(brucedawson@chromium.org) R=bo_xu@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/730993002
Diffstat (limited to 'fpdfsdk/src/javascript/Field.cpp')
-rw-r--r--fpdfsdk/src/javascript/Field.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 73a4e0a959..a84599298e 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -149,7 +149,7 @@ void Field::ParseFieldName(const std::wstring &strFieldNameParsed,std::wstring &
return;
}
std::wstring suffixal = strFieldNameParsed.substr(iStart+1);
- iControlNo = FXSYS_wtoi((FX_LPCWSTR)suffixal.c_str());
+ iControlNo = FXSYS_wtoi(suffixal.c_str());
if (iControlNo == 0)
{
int iStart;
@@ -194,7 +194,7 @@ FX_BOOL Field::AttachField(Document* pDocument, const CFX_WideString& csFieldNam
{
std::wstring strFieldName;
int iControlNo = -1;
- ParseFieldName((wchar_t*)(FX_LPCWSTR)swFieldNameTemp, strFieldName, iControlNo);
+ ParseFieldName((FX_LPCWSTR)swFieldNameTemp, strFieldName, iControlNo);
if (iControlNo == -1) return FALSE;
m_FieldName = strFieldName.c_str();