Fix narrowing conversions

This commit is contained in:
Jonas Kvinge
2021-10-30 02:21:29 +02:00
parent a704412dee
commit 79ac53b2d9
111 changed files with 376 additions and 373 deletions

View File

@@ -126,7 +126,7 @@ void SmartPlaylistsModel::Init() {
// How many defaults do we have to write?
int unwritten_defaults = 0;
for (int i = version; i < default_smart_playlists_.count(); ++i) {
unwritten_defaults += default_smart_playlists_[i].count();
unwritten_defaults += static_cast<int>(default_smart_playlists_[i].count());
}
// Save the defaults if there are any unwritten ones
@@ -230,7 +230,7 @@ void SmartPlaylistsModel::DeleteGenerator(const QModelIndex &idx) {
s.beginGroup(kSettingsGroup);
// Rewrite all the items to the settings
s.beginWriteArray(backend_->songs_table(), root_->children.count());
s.beginWriteArray(backend_->songs_table(), static_cast<int>(root_->children.count()));
int i = 0;
for (SmartPlaylistsItem *item : root_->children) {
s.setArrayIndex(i++);