1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-29 12:50:28 +00:00

Updates scons file and corrects missing headers; backports to C++11.

This commit is contained in:
Thomas Harte 2018-02-19 05:13:41 -08:00
parent fc9e84c72e
commit 9728bea0a7
4 changed files with 29 additions and 18 deletions

View File

@ -8,6 +8,8 @@
#include "MultiConfigurable.hpp" #include "MultiConfigurable.hpp"
#include <algorithm>
using namespace Analyser::Dynamic; using namespace Analyser::Dynamic;
MultiConfigurable::MultiConfigurable(const std::vector<std::unique_ptr<::Machine::DynamicMachine>> &machines) { MultiConfigurable::MultiConfigurable(const std::vector<std::unique_ptr<::Machine::DynamicMachine>> &machines) {

View File

@ -8,6 +8,8 @@
#include "MultiMachine.hpp" #include "MultiMachine.hpp"
#include <algorithm>
using namespace Analyser::Dynamic; using namespace Analyser::Dynamic;
MultiMachine::MultiMachine(std::vector<std::unique_ptr<DynamicMachine>> &&machines) : MultiMachine::MultiMachine(std::vector<std::unique_ptr<DynamicMachine>> &&machines) :
@ -71,7 +73,8 @@ void MultiMachine::multi_crt_did_run_machines() {
printf("\n"); printf("\n");
DynamicMachine *front = machines_.front().get(); DynamicMachine *front = machines_.front().get();
std::stable_sort(machines_.begin(), machines_.end(), [] (const auto &lhs, const auto &rhs){ std::stable_sort(machines_.begin(), machines_.end(),
[] (const std::unique_ptr<DynamicMachine> &lhs, const std::unique_ptr<DynamicMachine> &rhs){
CRTMachine::Machine *lhs_crt = lhs->crt_machine(); CRTMachine::Machine *lhs_crt = lhs->crt_machine();
CRTMachine::Machine *rhs_crt = rhs->crt_machine(); CRTMachine::Machine *rhs_crt = rhs->crt_machine();
return lhs_crt->get_confidence() > rhs_crt->get_confidence(); return lhs_crt->get_confidence() > rhs_crt->get_confidence();

View File

@ -8,6 +8,7 @@
#include "StaticAnalyser.hpp" #include "StaticAnalyser.hpp"
#include <algorithm>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
@ -166,7 +167,8 @@ std::vector<std::unique_ptr<Target>> Analyser::Static::GetTargets(const char *fi
// Sort by initial confidence. Use a stable sort in case any of the machine-specific analysers // Sort by initial confidence. Use a stable sort in case any of the machine-specific analysers
// picked their insertion order carefully. // picked their insertion order carefully.
std::stable_sort(targets.begin(), targets.end(), [](auto &a, auto &b) { std::stable_sort(targets.begin(), targets.end(),
[] (const std::unique_ptr<Target> &a, const std::unique_ptr<Target> &b) {
return a->confidence > b->confidence; return a->confidence > b->confidence;
}); });

View File

@ -10,6 +10,20 @@ env.ParseConfig('sdl2-config --libs')
# gather a list of source files # gather a list of source files
SOURCES = glob.glob('*.cpp') SOURCES = glob.glob('*.cpp')
SOURCES += glob.glob('../../Analyser/Dynamic/*.cpp')
SOURCES += glob.glob('../../Analyser/Dynamic/MultiMachine/*.cpp')
SOURCES += glob.glob('../../Analyser/Dynamic/MultiMachine/Implementation/*.cpp')
SOURCES += glob.glob('../../Analyser/Static/*.cpp')
SOURCES += glob.glob('../../Analyser/Static/Acorn/*.cpp')
SOURCES += glob.glob('../../Analyser/Static/AmstradCPC/*.cpp')
SOURCES += glob.glob('../../Analyser/Static/Atari/*.cpp')
SOURCES += glob.glob('../../Analyser/Static/Commodore/*.cpp')
SOURCES += glob.glob('../../Analyser/Static/Disassembler/*.cpp')
SOURCES += glob.glob('../../Analyser/Static/MSX/*.cpp')
SOURCES += glob.glob('../../Analyser/Static/Oric/*.cpp')
SOURCES += glob.glob('../../Analyser/Static/ZX8081/*.cpp')
SOURCES += glob.glob('../../Components/1770/*.cpp') SOURCES += glob.glob('../../Components/1770/*.cpp')
SOURCES += glob.glob('../../Components/6522/Implementation/*.cpp') SOURCES += glob.glob('../../Components/6522/Implementation/*.cpp')
SOURCES += glob.glob('../../Components/6560/*.cpp') SOURCES += glob.glob('../../Components/6560/*.cpp')
@ -46,16 +60,6 @@ SOURCES += glob.glob('../../Processors/Z80/Implementation/*.cpp')
SOURCES += glob.glob('../../SignalProcessing/*.cpp') SOURCES += glob.glob('../../SignalProcessing/*.cpp')
SOURCES += glob.glob('../../StaticAnalyser/*.cpp')
SOURCES += glob.glob('../../StaticAnalyser/Acorn/*.cpp')
SOURCES += glob.glob('../../StaticAnalyser/AmstradCPC/*.cpp')
SOURCES += glob.glob('../../StaticAnalyser/Atari/*.cpp')
SOURCES += glob.glob('../../StaticAnalyser/Commodore/*.cpp')
SOURCES += glob.glob('../../StaticAnalyser/Disassembler/*.cpp')
SOURCES += glob.glob('../../StaticAnalyser/MSX/*.cpp')
SOURCES += glob.glob('../../StaticAnalyser/Oric/*.cpp')
SOURCES += glob.glob('../../StaticAnalyser/ZX8081/*.cpp')
SOURCES += glob.glob('../../Storage/*.cpp') SOURCES += glob.glob('../../Storage/*.cpp')
SOURCES += glob.glob('../../Storage/Cartridge/*.cpp') SOURCES += glob.glob('../../Storage/Cartridge/*.cpp')
SOURCES += glob.glob('../../Storage/Cartridge/Encodings/*.cpp') SOURCES += glob.glob('../../Storage/Cartridge/Encodings/*.cpp')