Mercurial > minori
comparison include/core/config.h @ 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 | 62e336597bb7 |
comparison
equal
deleted
inserted
replaced
| 149:e41505d24733 | 150:ffa535b6d630 |
|---|---|
| 8 #include "animia/player.h" | 8 #include "animia/player.h" |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 #include <utility> | 12 #include <utility> |
| 13 | |
| 14 struct MediaPlayer { | |
| 15 bool enabled = true; | |
| 16 animia::Player player; | |
| 17 }; | |
| 13 | 18 |
| 14 class Config { | 19 class Config { |
| 15 public: | 20 public: |
| 16 int Load(); | 21 int Load(); |
| 17 int Save() const; | 22 int Save() const; |
| 42 } auth; | 47 } auth; |
| 43 | 48 |
| 44 struct { | 49 struct { |
| 45 public: | 50 public: |
| 46 bool detect_media_players; | 51 bool detect_media_players; |
| 47 /* preferably web browsers would be in a separate vector, | 52 std::vector<MediaPlayer> players; |
| 48 but whatever :/ */ | |
| 49 std::vector<std::pair<bool, animia::Player>> players; | |
| 50 } recognition; | 53 } recognition; |
| 51 | 54 |
| 52 struct { | 55 struct { |
| 53 public: | 56 public: |
| 54 std::string feed_link; | 57 std::string feed_link; |
