[prev in list] [next in list] [prev in thread] [next in thread]
List: cygwin-apps
Subject: [PATCH setup 5/5] Simplify PickView::insert_pkg
From: Jon Turney <jon.turney () dronecode ! org ! uk>
Date: 2016-11-18 16:46:46
Message-ID: 20161118164646.209716-6-jon.turney () dronecode ! org ! uk
[Download RAW message or body]
This is only called from PickView::setViewMode(), and only when view_style
is not viewStyles::Category, so checking that is redundant.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
---
PickView.cc | 26 +++-----------------------
1 file changed, 3 insertions(+), 23 deletions(-)
diff --git a/PickView.cc b/PickView.cc
index fc6f8c2..3de49f7 100644
--- a/PickView.cc
+++ b/PickView.cc
@@ -278,29 +278,9 @@ PickView::insert_pkg (packagemeta & pkg)
{
if (!showObsolete && isObsolete (pkg.categories))
return;
-
- if (view_mode != views::Category)
- {
- PickLine & line = *new PickPackageLine (*this, pkg);
- contents.insert (line);
- }
- else
- {
- for (set <std::string, casecompare_lt_op>::const_iterator x
- = pkg.categories.begin (); x != pkg.categories.end (); ++x)
- {
- // Special case - yuck
- if (casecompare(*x, "All") == 0)
- continue;
-
- packagedb db;
- PickCategoryLine & catline =
- *new PickCategoryLine (*this, *db.categories.find (*x), 1);
- PickLine & line = *new PickPackageLine(*this, pkg);
- catline.insert (line);
- contents.insert (catline);
- }
- }
+
+ PickLine & line = *new PickPackageLine (*this, pkg);
+ contents.insert (line);
}
void
--
2.8.3
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic