diff options
author | weili <weili@chromium.org> | 2016-05-20 15:38:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-20 15:38:30 -0700 |
commit | 038aa531bcf1a76764d3cef46fd9b8e08b166dae (patch) | |
tree | d1ef7d15ff37e4c98d1d7522b225755ba99bc330 /xfa/fxfa/app/xfa_ffnotify.cpp | |
parent | dc3ccdfb49c4d533d524d2084a7ebe5117f35934 (diff) | |
download | pdfium-038aa531bcf1a76764d3cef46fd9b8e08b166dae.tar.xz |
Clean up XFA code which causes warnings
This is part of efforts to bring XFA to chromium_code standard.
The warnings are from unreachable code, or using potentially
uninitialized variables, or using assignment within a condition.
This change list only contains easy to fix cases. More cleanups
will follow.
BUG=pdfium:29
Review-Url: https://codereview.chromium.org/1998873002
Diffstat (limited to 'xfa/fxfa/app/xfa_ffnotify.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_ffnotify.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp index 4d7d4799f2..e8fb4dd1dc 100644 --- a/xfa/fxfa/app/xfa_ffnotify.cpp +++ b/xfa/fxfa/app/xfa_ffnotify.cpp @@ -56,7 +56,7 @@ void CXFA_FFNotify::OnWidgetListItemAdded(CXFA_WidgetData* pSender, return; CXFA_FFWidget* pWidget = nullptr; - while ((pWidget = pWidgetAcc->GetNextWidget(pWidget))) { + while ((pWidget = pWidgetAcc->GetNextWidget(pWidget)) != nullptr) { if (pWidget->IsLoaded()) { if (pWidgetAcc->IsListBox()) { static_cast<CXFA_FFListBox*>(pWidget)->InsertItem(pLabel, iIndex); @@ -74,7 +74,7 @@ void CXFA_FFNotify::OnWidgetListItemRemoved(CXFA_WidgetData* pSender, return; CXFA_FFWidget* pWidget = nullptr; - while ((pWidget = pWidgetAcc->GetNextWidget(pWidget))) { + while ((pWidget = pWidgetAcc->GetNextWidget(pWidget)) != nullptr) { if (pWidget->IsLoaded()) { if (pWidgetAcc->IsListBox()) { static_cast<CXFA_FFListBox*>(pWidget)->DeleteItem(iIndex); @@ -360,7 +360,7 @@ void CXFA_FFNotify::OnValueChanging(CXFA_Node* pSender, XFA_ATTRIBUTE eAttr) { return; CXFA_FFWidget* pWidget = nullptr; - while ((pWidget = pWidgetAcc->GetNextWidget(pWidget))) { + while ((pWidget = pWidgetAcc->GetNextWidget(pWidget)) != nullptr) { if (pWidget->IsLoaded()) pWidget->AddInvalidateRect(); } @@ -422,7 +422,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender, } } CXFA_FFWidget* pWidget = nullptr; - while ((pWidget = pWidgetAcc->GetNextWidget(pWidget))) { + while ((pWidget = pWidgetAcc->GetNextWidget(pWidget)) != nullptr) { if (!pWidget->IsLoaded()) continue; |