Mercurial > minori
diff src/gui/pages/anime_list.cpp @ 11:fc1bf97c528b
*: use C++11 standard
I've been meaning to do this for a while, but I didn't want to reimplement
the filesystem code. Now we are on C++11 and most compilers from the past 5 centuries should support this now
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 17 Sep 2023 06:14:30 -0400 |
parents | 4b198a111713 |
children | cde8f67a7c7d |
line wrap: on
line diff
--- a/src/gui/pages/anime_list.cpp Sat Sep 16 02:06:01 2023 -0400 +++ b/src/gui/pages/anime_list.cpp Sun Sep 17 06:14:30 2023 -0400 @@ -193,8 +193,8 @@ void AnimeListWidgetModel::UpdateAnime(int id) { /* meh... it might be better to just reinit the entire list */ int i = 0; - for (const auto& [a_id, anime] : Anime::db.items) { - if (anime.IsInUserList() && a_id == id && anime.GetUserStatus() == status) { + for (const auto& a : Anime::db.items) { + if (a.second.IsInUserList() && a.first == id && a.second.GetUserStatus() == status) { emit dataChanged(index(i), index(i)); } i++; @@ -210,9 +210,9 @@ if (has_children) beginResetModel(); list.clear(); - for (const auto& [id, anime] : Anime::db.items) { - if (anime.IsInUserList() && anime.GetUserStatus() == status) { - list.push_back(anime); + for (const auto& a : Anime::db.items) { + if (a.second.IsInUserList() && a.second.GetUserStatus() == status) { + list.push_back(a.second); } } if (has_children) endResetModel();