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

Unified Diff: xfa/fxfa/app/xfa_ffwidgetacc.cpp

Issue 1998873002: Clean up XFA code which causes warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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: xfa/fxfa/app/xfa_ffwidgetacc.cpp
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 08c52de79aa4ffc166381a65302ab1136884c06c..2c84a7f9b7489cda85cdfcf9046d8167158f725f 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -713,7 +713,7 @@ CXFA_FFWidget* CXFA_WidgetAcc::GetNextWidget(CXFA_FFWidget* pWidget) {
}
void CXFA_WidgetAcc::UpdateUIDisplay(CXFA_FFWidget* pExcept) {
CXFA_FFWidget* pWidget = NULL;
- while ((pWidget = GetNextWidget(pWidget))) {
+ while ((pWidget = GetNextWidget(pWidget)) != nullptr) {
Lei Zhang 2016/05/20 03:48:02 Why do we need the explicit check against nullptr?
Wei Li 2016/05/20 16:33:15 This is due to msvs warning c4706 "assignment with
if (pWidget == pExcept || !pWidget->IsLoaded() ||
(GetUIType() != XFA_ELEMENT_CheckButton && pWidget->IsFocused())) {
continue;

Powered by Google App Engine
This is Rietveld 408576698