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

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

Issue 2506493003: Continue nit cleanup in fwl/core (Closed)
Patch Set: Prior review comment Created 4 years, 1 month 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 | « no previous file | xfa/fwl/core/cfwl_widget.h » ('j') | xfa/fwl/core/cfwl_widget.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/cfwl_listbox.cpp
diff --git a/xfa/fwl/core/cfwl_listbox.cpp b/xfa/fwl/core/cfwl_listbox.cpp
index c5bf88107467fb4ccba6bdd740f3bc1d1858ea70..213a6a97cad40048e12268596f09bd6a6569c53b 100644
--- a/xfa/fwl/core/cfwl_listbox.cpp
+++ b/xfa/fwl/core/cfwl_listbox.cpp
@@ -47,9 +47,8 @@ bool CFWL_ListBox::DeleteString(CFWL_ListItem* pItem) {
if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size())
return false;
- int32_t iCount = CountItems(m_pIface.get());
int32_t iSel = nIndex + 1;
- if (iSel >= iCount) {
+ if (iSel >= CountItems(m_pIface.get())) {
iSel = nIndex - 1;
if (iSel < 0)
npm 2016/11/15 23:27:03 Remove this if: unneeded.
dsinclair 2016/11/16 15:10:47 Done.
iSel = -1;
« no previous file with comments | « no previous file | xfa/fwl/core/cfwl_widget.h » ('j') | xfa/fwl/core/cfwl_widget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698