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

Unified Diff: xfa/fwl/core/fwl_widgetmgrimp.cpp

Issue 1998873002: Clean up XFA code which causes warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments 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
« no previous file with comments | « xfa/fgas/layout/fgas_textbreak.cpp ('k') | xfa/fwl/lightwidget/cfwl_theme.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/fwl_widgetmgrimp.cpp
diff --git a/xfa/fwl/core/fwl_widgetmgrimp.cpp b/xfa/fwl/core/fwl_widgetmgrimp.cpp
index f4ceb78c48ae1bfc93709f5dc2fbf8813b0468f5..759f2ed85ed1cb3242c54342bff05b4727a73c0d 100644
--- a/xfa/fwl/core/fwl_widgetmgrimp.cpp
+++ b/xfa/fwl/core/fwl_widgetmgrimp.cpp
@@ -471,21 +471,17 @@ IFWL_Widget* CFWL_WidgetMgr::GetSiblingRadioButton(IFWL_Widget* pWidget,
}
IFWL_Widget* CFWL_WidgetMgr::GetRadioButtonGroupHeader(
IFWL_Widget* pRadioButton) {
- if (pRadioButton->GetStyles() & FWL_WGTSTYLE_Group) {
- return pRadioButton;
- }
IFWL_Widget* pNext = pRadioButton;
- while ((pNext = GetSiblingRadioButton(pNext, FALSE)) != NULL) {
- if (pNext->GetStyles() & FWL_WGTSTYLE_Group) {
+ while (pNext) {
+ if (pNext->GetStyles() & FWL_WGTSTYLE_Group)
return pNext;
- }
+ pNext = GetSiblingRadioButton(pNext, FALSE);
}
pNext = GetWidget(pRadioButton, FWL_WGTRELATION_LastSibling);
- while ((pNext = GetSiblingRadioButton(pNext, FALSE)) && pNext &&
+ while ((pNext = GetSiblingRadioButton(pNext, FALSE)) != nullptr &&
pNext != pRadioButton) {
- if (pNext->GetStyles() & FWL_WGTSTYLE_Group) {
+ if (pNext->GetStyles() & FWL_WGTSTYLE_Group)
return pNext;
- }
}
pNext = GetWidget(pRadioButton, FWL_WGTRELATION_FirstSibling);
return GetSiblingRadioButton(pNext, TRUE);
« no previous file with comments | « xfa/fgas/layout/fgas_textbreak.cpp ('k') | xfa/fwl/lightwidget/cfwl_theme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698