Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3196)

Unified Diff: core/fxcrt/fx_basic_wstring.cpp

Issue 1801383002: Re-enable several MSVC warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fxcrt/fx_basic_wstring.cpp
diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp
index 95b761bd09e67a55b38ae5216ab5e555b8872a96..93570af04328fdb1639bf84bb32b36afe282b5ba 100644
--- a/core/fxcrt/fx_basic_wstring.cpp
+++ b/core/fxcrt/fx_basic_wstring.cpp
@@ -642,7 +642,8 @@ FX_STRSIZE CFX_WideString::Replace(const FX_WCHAR* lpszOld,
FX_WCHAR* lpszEnd = m_pData->m_String + m_pData->m_nDataLength;
FX_WCHAR* lpszTarget;
{
Tom Sepez 2016/03/16 18:34:59 nit: brace needed here?
Wei Li 2016/03/17 02:24:05 Done.
- while ((lpszTarget = (FX_WCHAR*)FXSYS_wcsstr(lpszStart, lpszOld)) &&
+ while ((lpszTarget = (FX_WCHAR*)FXSYS_wcsstr(lpszStart, lpszOld)) !=
+ nullptr &&
lpszStart < lpszEnd) {
Tom Sepez 2016/03/16 18:34:59 This should be fine. Not sure we want to write it
Wei Li 2016/03/17 02:24:05 For pdfium code, this warning is not that useful.
nCount++;
lpszStart = lpszTarget + nSourceLen;
@@ -668,7 +669,7 @@ FX_STRSIZE CFX_WideString::Replace(const FX_WCHAR* lpszOld,
lpszEnd = m_pData->m_String + std::max(m_pData->m_nDataLength, nNewLength);
{
while ((lpszTarget = (FX_WCHAR*)FXSYS_wcsstr(lpszStart, lpszOld)) !=
- NULL &&
+ nullptr &&
lpszStart < lpszEnd) {
FX_STRSIZE nBalance =
nOldLength -

Powered by Google App Engine
This is Rietveld 408576698