mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-10 16:30:07 +00:00
Corrects various indentation errors.
This commit is contained in:
parent
3e0055737e
commit
1293d8b69e
@ -16,7 +16,7 @@ MultiConfigurable::MultiConfigurable(const std::vector<std::unique_ptr<::Machine
|
|||||||
for(const auto &machine: machines) {
|
for(const auto &machine: machines) {
|
||||||
Configurable::Device *device = machine->configurable_device();
|
Configurable::Device *device = machine->configurable_device();
|
||||||
if(device) devices_.push_back(device);
|
if(device) devices_.push_back(device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::unique_ptr<Configurable::Option>> MultiConfigurable::get_options() {
|
std::vector<std::unique_ptr<Configurable::Option>> MultiConfigurable::get_options() {
|
||||||
|
@ -14,7 +14,7 @@ MultiConfigurationTarget::MultiConfigurationTarget(const std::vector<std::unique
|
|||||||
for(const auto &machine: machines) {
|
for(const auto &machine: machines) {
|
||||||
ConfigurationTarget::Machine *configuration_target = machine->configuration_target();
|
ConfigurationTarget::Machine *configuration_target = machine->configuration_target();
|
||||||
if(configuration_target) targets_.push_back(configuration_target);
|
if(configuration_target) targets_.push_back(configuration_target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiConfigurationTarget::configure_as_target(const Analyser::Static::Target *target) {
|
void MultiConfigurationTarget::configure_as_target(const Analyser::Static::Target *target) {
|
||||||
|
@ -66,7 +66,7 @@ MultiJoystickMachine::MultiJoystickMachine(const std::vector<std::unique_ptr<::M
|
|||||||
joystick_machines.push_back(joystick_machine);
|
joystick_machines.push_back(joystick_machine);
|
||||||
total_joysticks = std::max(total_joysticks, joystick_machine->get_joysticks().size());
|
total_joysticks = std::max(total_joysticks, joystick_machine->get_joysticks().size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(std::size_t index = 0; index < total_joysticks; ++index) {
|
for(std::size_t index = 0; index < total_joysticks; ++index) {
|
||||||
joysticks_.emplace_back(new MultiJoystick(joystick_machines, index));
|
joysticks_.emplace_back(new MultiJoystick(joystick_machines, index));
|
||||||
|
@ -14,30 +14,30 @@ MultiKeyboardMachine::MultiKeyboardMachine(const std::vector<std::unique_ptr<::M
|
|||||||
for(const auto &machine: machines) {
|
for(const auto &machine: machines) {
|
||||||
KeyboardMachine::Machine *keyboard_machine = machine->keyboard_machine();
|
KeyboardMachine::Machine *keyboard_machine = machine->keyboard_machine();
|
||||||
if(keyboard_machine) machines_.push_back(keyboard_machine);
|
if(keyboard_machine) machines_.push_back(keyboard_machine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiKeyboardMachine::clear_all_keys() {
|
void MultiKeyboardMachine::clear_all_keys() {
|
||||||
for(const auto &machine: machines_) {
|
for(const auto &machine: machines_) {
|
||||||
machine->clear_all_keys();
|
machine->clear_all_keys();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiKeyboardMachine::set_key_state(uint16_t key, bool is_pressed) {
|
void MultiKeyboardMachine::set_key_state(uint16_t key, bool is_pressed) {
|
||||||
for(const auto &machine: machines_) {
|
for(const auto &machine: machines_) {
|
||||||
machine->set_key_state(key, is_pressed);
|
machine->set_key_state(key, is_pressed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiKeyboardMachine::type_string(const std::string &string) {
|
void MultiKeyboardMachine::type_string(const std::string &string) {
|
||||||
for(const auto &machine: machines_) {
|
for(const auto &machine: machines_) {
|
||||||
machine->type_string(string);
|
machine->type_string(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiKeyboardMachine::keyboard_did_change_key(Inputs::Keyboard *keyboard, Inputs::Keyboard::Key key, bool is_pressed) {
|
void MultiKeyboardMachine::keyboard_did_change_key(Inputs::Keyboard *keyboard, Inputs::Keyboard::Key key, bool is_pressed) {
|
||||||
for(const auto &machine: machines_) {
|
for(const auto &machine: machines_) {
|
||||||
uint16_t mapped_key = machine->get_keyboard_mapper()->mapped_key_for_key(key);
|
uint16_t mapped_key = machine->get_keyboard_mapper()->mapped_key_for_key(key);
|
||||||
if(mapped_key != KeyNotMapped) machine->set_key_state(mapped_key, is_pressed);
|
if(mapped_key != KeyNotMapped) machine->set_key_state(mapped_key, is_pressed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,11 +82,11 @@ void MultiMachine::multi_crt_did_run_machines() {
|
|||||||
|
|
||||||
DynamicMachine *front = machines_.front().get();
|
DynamicMachine *front = machines_.front().get();
|
||||||
std::stable_sort(machines_.begin(), machines_.end(),
|
std::stable_sort(machines_.begin(), machines_.end(),
|
||||||
[] (const std::unique_ptr<DynamicMachine> &lhs, const std::unique_ptr<DynamicMachine> &rhs){
|
[] (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();
|
||||||
});
|
});
|
||||||
|
|
||||||
if(machines_.front().get() != front) {
|
if(machines_.front().get() != front) {
|
||||||
crt_machine_.did_change_machine_order();
|
crt_machine_.did_change_machine_order();
|
||||||
|
@ -35,8 +35,8 @@ static bool is_implied_extension(const std::string &extension) {
|
|||||||
|
|
||||||
static void right_trim(std::string &string) {
|
static void right_trim(std::string &string) {
|
||||||
string.erase(std::find_if(string.rbegin(), string.rend(), [](int ch) {
|
string.erase(std::find_if(string.rbegin(), string.rend(), [](int ch) {
|
||||||
return !std::isspace(ch);
|
return !std::isspace(ch);
|
||||||
}).base(), string.end());
|
}).base(), string.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string RunCommandFor(const Storage::Disk::CPM::File &file) {
|
static std::string RunCommandFor(const Storage::Disk::CPM::File &file) {
|
||||||
|
@ -185,9 +185,9 @@ TargetList Analyser::Static::GetTargets(const std::string &file_name) {
|
|||||||
// 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(),
|
std::stable_sort(targets.begin(), targets.end(),
|
||||||
[] (const std::unique_ptr<Target> &a, const std::unique_ptr<Target> &b) {
|
[] (const std::unique_ptr<Target> &a, const std::unique_ptr<Target> &b) {
|
||||||
return a->confidence > b->confidence;
|
return a->confidence > b->confidence;
|
||||||
});
|
});
|
||||||
|
|
||||||
return targets;
|
return targets;
|
||||||
}
|
}
|
||||||
|
@ -46,11 +46,11 @@ class CAS: public Tape {
|
|||||||
void get_next(Storage::FileHolder &file, uint8_t (&buffer)[10], std::size_t quantity);
|
void get_next(Storage::FileHolder &file, uint8_t (&buffer)[10], std::size_t quantity);
|
||||||
|
|
||||||
// Storage for the array of data blobs to transcribe into audio;
|
// Storage for the array of data blobs to transcribe into audio;
|
||||||
// each chunk is preceded by a header which may be long, and is optionally
|
// each chunk is preceded by a header which may be long, and is optionally
|
||||||
// also preceded by a gap.
|
// also preceded by a gap.
|
||||||
struct Chunk {
|
struct Chunk {
|
||||||
bool has_gap;
|
bool has_gap;
|
||||||
bool long_header;
|
bool long_header;
|
||||||
std::vector<std::uint8_t> data;
|
std::vector<std::uint8_t> data;
|
||||||
};
|
};
|
||||||
std::vector<Chunk> chunks_;
|
std::vector<Chunk> chunks_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user