summaryrefslogtreecommitdiff
path: root/core/src/fxcrt
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 /core/src/fxcrt
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 'core/src/fxcrt')
-rw-r--r--core/src/fxcrt/fx_basic_wstring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp
index 3a13d59054..0827fb6f34 100644
--- a/core/src/fxcrt/fx_basic_wstring.cpp
+++ b/core/src/fxcrt/fx_basic_wstring.cpp
@@ -586,7 +586,7 @@ FX_STRSIZE CFX_WideString::Find(FX_LPCWSTR lpszSub, FX_STRSIZE nStart) const
if (nLength < 1 || nStart > nLength) {
return -1;
}
- FX_LPCWSTR lpsz = (FX_LPCWSTR)FXSYS_wcsstr(m_pData->m_String + nStart, lpszSub);
+ FX_LPCWSTR lpsz = FXSYS_wcsstr(m_pData->m_String + nStart, lpszSub);
return (lpsz == NULL) ? -1 : (int)(lpsz - m_pData->m_String);
}
FX_STRSIZE CFX_WideString::Find(FX_WCHAR ch, FX_STRSIZE nStart) const
@@ -598,7 +598,7 @@ FX_STRSIZE CFX_WideString::Find(FX_WCHAR ch, FX_STRSIZE nStart) const
if (nStart >= nLength) {
return -1;
}
- FX_LPCWSTR lpsz = (FX_LPCWSTR)FXSYS_wcschr(m_pData->m_String + nStart, ch);
+ FX_LPCWSTR lpsz = FXSYS_wcschr(m_pData->m_String + nStart, ch);
return (lpsz == NULL) ? -1 : (int)(lpsz - m_pData->m_String);
}
void CFX_WideString::TrimRight(FX_LPCWSTR lpszTargetList)