Mercurial > minori
comparison 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 |
comparison
equal
deleted
inserted
replaced
149:e41505d24733 | 150:ffa535b6d630 |
---|---|
62 | 62 |
63 if (!animia::ParsePlayersData(Strings::ToUtf8String(ts.readAll()), players)) | 63 if (!animia::ParsePlayersData(Strings::ToUtf8String(ts.readAll()), players)) |
64 return false; | 64 return false; |
65 | 65 |
66 recognition.players.reserve(players.size()); | 66 recognition.players.reserve(players.size()); |
67 for (const auto& player : players) | 67 for (const auto& player : players) { |
68 recognition.players.push_back({true, player}); | 68 MediaPlayer mediaplayer; |
69 | |
70 mediaplayer.enabled = true; | |
71 mediaplayer.player = player; | |
72 | |
73 recognition.players.push_back(mediaplayer); | |
74 } | |
69 } | 75 } |
70 | 76 |
71 for (auto& [enabled, player] : recognition.players) { | 77 for (auto& [enabled, player] : recognition.players) { |
72 switch (player.type) { | 78 switch (player.type) { |
73 default: | 79 default: |