refactor: replace tr_variant::is_*() with tr_variant::holds_alternative() (#5930)

This commit is contained in:
Charles Kerr
2023-08-21 16:16:54 -05:00
committed by GitHub
parent 5190db57d9
commit 59c638c63d
13 changed files with 182 additions and 169 deletions

View File

@@ -164,7 +164,7 @@ void TorrentModel::updateTorrents(tr_variant* torrent_list, bool is_complete_lis
// build a list of the property keys
tr_variant* const first_child = tr_variantListChild(torrent_list, 0);
bool const table = tr_variantIsList(first_child);
bool const table = first_child != nullptr && first_child->holds_alternative<tr_variant::Vector>();
std::vector<tr_quark> keys;
if (table)
{