1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-23 03:32:32 +00:00

Ensures consistent ordering.

This commit is contained in:
Thomas Harte 2020-03-19 19:41:50 -04:00
parent b8ebdc012f
commit 7ab7efdbc1

View File

@ -155,6 +155,12 @@ std::vector<std::string> Machine::AllMachines(Type type, bool long_names) {
#define AddName(x) result.push_back(long_names ? LongNameForTargetMachine(Analyser::Machine::x) : ShortNameForTargetMachine(Analyser::Machine::x))
if(type == Type::Any || type == Type::RequiresMedia) {
AddName(Atari2600);
AddName(ColecoVision);
AddName(MasterSystem);
}
if(type == Type::Any || type == Type::DoesntRequireMedia) {
AddName(AmstradCPC);
AddName(AppleII);
@ -167,16 +173,8 @@ std::vector<std::string> Machine::AllMachines(Type type, bool long_names) {
AddName(ZX8081);
}
if(type == Type::Any || type == Type::RequiresMedia) {
AddName(Atari2600);
AddName(ColecoVision);
AddName(MasterSystem);
}
#undef AddName
std::sort(result.begin(), result.end());
return result;
}