From 7ab7efdbc18217cd577d07a10a014ea2435d72b1 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 19 Mar 2020 19:41:50 -0400 Subject: [PATCH] Ensures consistent ordering. --- Machines/Utility/MachineForTarget.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Machines/Utility/MachineForTarget.cpp b/Machines/Utility/MachineForTarget.cpp index 253dd4d2a..2d721a4dc 100644 --- a/Machines/Utility/MachineForTarget.cpp +++ b/Machines/Utility/MachineForTarget.cpp @@ -155,6 +155,12 @@ std::vector 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 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; }