Mercurial > minori
diff src/core/config.cc @ 150:ffa535b6d630
*: avoid usage of std::[pair,tuple]
https://arne-mertz.de/2017/03/smelly-pair-tuple/
it's better to use real structures and such where variables are easily known...
also apparently using [] on structs is actually valid? I had no idea.
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 14 Nov 2023 16:27:33 -0500 |
parents | e41505d24733 |
children | 54744a48a7d7 |
line wrap: on
line diff
--- a/src/core/config.cc Tue Nov 14 13:40:11 2023 -0500 +++ b/src/core/config.cc Tue Nov 14 16:27:33 2023 -0500 @@ -64,8 +64,14 @@ return false; recognition.players.reserve(players.size()); - for (const auto& player : players) - recognition.players.push_back({true, player}); + for (const auto& player : players) { + MediaPlayer mediaplayer; + + mediaplayer.enabled = true; + mediaplayer.player = player; + + recognition.players.push_back(mediaplayer); + } } for (auto& [enabled, player] : recognition.players) {