CMake file

Update to C++ 11: std::shared_ptr, for each loops
Update to wxWidgets 3.0+
This commit is contained in:
Twan van Laarhoven
2020-04-08 00:18:14 +02:00
parent aa39a9bc71
commit 35a89676b4
53 changed files with 343 additions and 415 deletions
+3 -2
View File
@@ -42,14 +42,15 @@ void PackageUpdateList::TreeItem::add(const InstallablePackageP& package, const
String name = path.substr(0,pos);
String rest = pos == String::npos ? _("") : path.substr(pos+1);
// find/add child
FOR_EACH(ti, children) {
for (auto it = children.begin() ; it != children.end() ; ++it) {
auto const& ti = *it;
if (ti->label == name) {
// already have this child
if (pos == String::npos && ti->package) {
// two packages with the same path
TreeItemP ti2(new TreeItem);
ti2->label = name;
children.insert(ti_IT.first, ti2);
children.insert(it, ti2);
ti2->add(package, rest, level + 1);
} else {
ti->add(package, rest, level + 1);