1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-01 13:58:20 +00:00

Merge pull request #936 from TomHarte/Style

Correct minor style errors.
This commit is contained in:
Thomas Harte 2021-05-03 22:23:27 -04:00 committed by GitHub
commit 012235bfeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 2 deletions

View File

@ -16,6 +16,7 @@ void Keyboard::perform_command(const Command &command) {
switch(command.type) {
case Command::Type::Reset:
modifiers_ = 0xffff;
[[fallthrough]];
case Command::Type::Flush: {
std::lock_guard lock_guard(keys_mutex_);
pending_events_.clear();

View File

@ -280,6 +280,7 @@ const uint16_t *CharacterMapper::sequence_for_character(char character) const {
case Machine::ZX81:
return table_lookup_sequence_for_character(zx81_key_sequences, character);
default:
case Machine::ZXSpectrum:
return table_lookup_sequence_for_character(spectrum_key_sequences, character);
}

View File

@ -420,6 +420,7 @@ template<Model model> class ConcreteMachine:
break;
}
}
[[fallthrough]];
case PartialMachineCycle::Read:
if constexpr (model == Model::SixteenK) {

View File

@ -12,6 +12,7 @@
#include <cassert>
#include <cstdarg>
#include <cstring>
#include <cstddef>
#include <string>
#include <typeindex>
#include <typeinfo>
@ -318,12 +319,12 @@ template <typename Owner> class StructImpl: public Struct {
if(iterator != contents_.end()) {
return iterator->first;
} else {
return "";
return std::string();
}
}
private:
template <typename Type> bool declare_reflectable(Type *t, const std::string &name) {
template <typename Type> bool declare_reflectable([[maybe_unused]] Type *t, const std::string &name) {
if constexpr (std::is_base_of<Reflection::Struct, Type>::value) {
Reflection::Struct *const str = static_cast<Reflection::Struct *>(t);
declare_emplace(str, name);