diff --git a/Analyser/Dynamic/ConfidenceCounter.hpp b/Analyser/Dynamic/ConfidenceCounter.hpp index 9e409592f..a625a9d55 100644 --- a/Analyser/Dynamic/ConfidenceCounter.hpp +++ b/Analyser/Dynamic/ConfidenceCounter.hpp @@ -11,8 +11,7 @@ #include "ConfidenceSource.hpp" -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a confidence source that calculates its probability by virtual of a history of events. @@ -41,7 +40,6 @@ class ConfidenceCounter: public ConfidenceSource { int misses_ = 1; }; -} } #endif /* ConfidenceCounter_hpp */ diff --git a/Analyser/Dynamic/ConfidenceSource.hpp b/Analyser/Dynamic/ConfidenceSource.hpp index 0211a6d19..fb2dd3518 100644 --- a/Analyser/Dynamic/ConfidenceSource.hpp +++ b/Analyser/Dynamic/ConfidenceSource.hpp @@ -9,8 +9,7 @@ #ifndef ConfidenceSource_hpp #define ConfidenceSource_hpp -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides an abstract interface through which objects can declare the probability @@ -22,7 +21,6 @@ struct ConfidenceSource { virtual float get_confidence() = 0; }; -} } #endif /* ConfidenceSource_hpp */ diff --git a/Analyser/Dynamic/ConfidenceSummary.hpp b/Analyser/Dynamic/ConfidenceSummary.hpp index ccab36761..e49ad921d 100644 --- a/Analyser/Dynamic/ConfidenceSummary.hpp +++ b/Analyser/Dynamic/ConfidenceSummary.hpp @@ -13,8 +13,7 @@ #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Summaries a collection of confidence sources by calculating their weighted sum. @@ -40,7 +39,6 @@ class ConfidenceSummary: public ConfidenceSource { float weight_sum_; }; -} } #endif /* ConfidenceSummary_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp index 2595fc69c..82838db84 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiConfigurable.hpp @@ -15,8 +15,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a class that multiplexes the configurable interface to multiple machines. @@ -36,7 +35,6 @@ class MultiConfigurable: public Configurable::Device { std::vector devices_; }; -} } #endif /* MultiConfigurable_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp index 7c5457a16..dfe12c8a4 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiJoystickMachine.hpp @@ -14,8 +14,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a class that multiplexes the joystick machine interface to multiple machines. @@ -34,7 +33,6 @@ class MultiJoystickMachine: public MachineTypes::JoystickMachine { std::vector> joysticks_; }; -} } #endif /* MultiJoystickMachine_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp index 2de296456..c01b93c57 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiKeyboardMachine.hpp @@ -15,8 +15,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a class that multiplexes the keyboard machine interface to multiple machines. @@ -55,7 +54,6 @@ class MultiKeyboardMachine: public MachineTypes::KeyboardMachine { Inputs::Keyboard &get_keyboard() final; }; -} } #endif /* MultiKeyboardMachine_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiMediaTarget.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiMediaTarget.hpp index 274261462..0ec4ad1cf 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiMediaTarget.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiMediaTarget.hpp @@ -15,8 +15,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a class that multiplexes the media target interface to multiple machines. @@ -35,7 +34,6 @@ struct MultiMediaTarget: public MachineTypes::MediaTarget { std::vector targets_; }; -} } #endif /* MultiMediaTarget_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiProducer.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiProducer.hpp index 02e27c4df..3a850f709 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiProducer.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiProducer.hpp @@ -19,8 +19,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { template class MultiInterface { public: @@ -116,7 +115,5 @@ class MultiAudioProducer: public MultiInterface, pu */ } -} - #endif /* MultiProducer_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/Implementation/MultiSpeaker.hpp b/Analyser/Dynamic/MultiMachine/Implementation/MultiSpeaker.hpp index e5946da1a..def9feaba 100644 --- a/Analyser/Dynamic/MultiMachine/Implementation/MultiSpeaker.hpp +++ b/Analyser/Dynamic/MultiMachine/Implementation/MultiSpeaker.hpp @@ -16,8 +16,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides a class that multiplexes calls to and from Outputs::Speaker::Speaker in order @@ -55,7 +54,6 @@ class MultiSpeaker: public Outputs::Speaker::Speaker, Outputs::Speaker::Speaker: bool stereo_output_ = false; }; -} } #endif /* MultiSpeaker_hpp */ diff --git a/Analyser/Dynamic/MultiMachine/MultiMachine.hpp b/Analyser/Dynamic/MultiMachine/MultiMachine.hpp index ec7e10f48..a31c2f119 100644 --- a/Analyser/Dynamic/MultiMachine/MultiMachine.hpp +++ b/Analyser/Dynamic/MultiMachine/MultiMachine.hpp @@ -22,8 +22,7 @@ #include #include -namespace Analyser { -namespace Dynamic { +namespace Analyser::Dynamic { /*! Provides the same interface as to a single machine, while multiplexing all @@ -80,7 +79,6 @@ class MultiMachine: public ::Machine::DynamicMachine, public MultiTimedMachine:: bool has_picked_ = false; }; -} } #endif /* MultiMachine_hpp */ diff --git a/Analyser/Static/Acorn/Disk.hpp b/Analyser/Static/Acorn/Disk.hpp index bd3b519fc..87b11951c 100644 --- a/Analyser/Static/Acorn/Disk.hpp +++ b/Analyser/Static/Acorn/Disk.hpp @@ -12,9 +12,7 @@ #include "File.hpp" #include "../../../Storage/Disk/Disk.hpp" -namespace Analyser { -namespace Static { -namespace Acorn { +namespace Analyser::Static::Acorn { /// Describes a DFS- or ADFS-format catalogue(/directory): the list of files available and the catalogue's boot option. struct Catalogue { @@ -31,8 +29,6 @@ struct Catalogue { std::unique_ptr GetDFSCatalogue(const std::shared_ptr &disk); std::unique_ptr GetADFSCatalogue(const std::shared_ptr &disk); -} -} } #endif /* Disk_hpp */ diff --git a/Analyser/Static/Acorn/File.hpp b/Analyser/Static/Acorn/File.hpp index f0a9d612e..f268af247 100644 --- a/Analyser/Static/Acorn/File.hpp +++ b/Analyser/Static/Acorn/File.hpp @@ -13,9 +13,7 @@ #include #include -namespace Analyser { -namespace Static { -namespace Acorn { +namespace Analyser::Static::Acorn { struct File { std::string name; @@ -60,8 +58,6 @@ struct File { std::vector chunks; }; -} -} } #endif /* File_hpp */ diff --git a/Analyser/Static/Acorn/StaticAnalyser.hpp b/Analyser/Static/Acorn/StaticAnalyser.hpp index d7acbbc38..079178c96 100644 --- a/Analyser/Static/Acorn/StaticAnalyser.hpp +++ b/Analyser/Static/Acorn/StaticAnalyser.hpp @@ -13,14 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace Acorn { +namespace Analyser::Static::Acorn { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* AcornAnalyser_hpp */ diff --git a/Analyser/Static/Acorn/Tape.hpp b/Analyser/Static/Acorn/Tape.hpp index a02f83ce5..f01216910 100644 --- a/Analyser/Static/Acorn/Tape.hpp +++ b/Analyser/Static/Acorn/Tape.hpp @@ -14,14 +14,10 @@ #include "File.hpp" #include "../../../Storage/Tape/Tape.hpp" -namespace Analyser { -namespace Static { -namespace Acorn { +namespace Analyser::Static::Acorn { std::vector GetFiles(const std::shared_ptr &tape); -} -} } #endif /* Tape_hpp */ diff --git a/Analyser/Static/Acorn/Target.hpp b/Analyser/Static/Acorn/Target.hpp index 17dad7393..bf7f8ffc9 100644 --- a/Analyser/Static/Acorn/Target.hpp +++ b/Analyser/Static/Acorn/Target.hpp @@ -13,9 +13,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace Acorn { +namespace Analyser::Static::Acorn { struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl { bool has_acorn_adfs = false; @@ -37,8 +35,6 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl< } }; -} -} } #endif /* Analyser_Static_Acorn_Target_h */ diff --git a/Analyser/Static/Amiga/StaticAnalyser.hpp b/Analyser/Static/Amiga/StaticAnalyser.hpp index 99b6169ec..fe9dc6b56 100644 --- a/Analyser/Static/Amiga/StaticAnalyser.hpp +++ b/Analyser/Static/Amiga/StaticAnalyser.hpp @@ -13,15 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace Amiga { +namespace Analyser::Static::Amiga { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); } -} -} - #endif /* Analyser_Static_Amiga_StaticAnalyser_hpp */ diff --git a/Analyser/Static/Amiga/Target.hpp b/Analyser/Static/Amiga/Target.hpp index a41d37dd9..9ff9e99a3 100644 --- a/Analyser/Static/Amiga/Target.hpp +++ b/Analyser/Static/Amiga/Target.hpp @@ -12,9 +12,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace Amiga { +namespace Analyser::Static::Amiga { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(ChipRAM, @@ -41,8 +39,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace AmstradCPC { +namespace Analyser::Static::AmstradCPC { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* Analyser_Static_AmstradCPC_StaticAnalyser_hpp */ diff --git a/Analyser/Static/AmstradCPC/Target.hpp b/Analyser/Static/AmstradCPC/Target.hpp index 6f708d4b0..ce19355a6 100644 --- a/Analyser/Static/AmstradCPC/Target.hpp +++ b/Analyser/Static/AmstradCPC/Target.hpp @@ -14,9 +14,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace AmstradCPC { +namespace Analyser::Static::AmstradCPC { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, CPC464, CPC664, CPC6128); @@ -32,8 +30,5 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace AppleII { +namespace Analyser::Static::AppleII { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* Analyser_Static_AppleII_StaticAnalyser_hpp */ diff --git a/Analyser/Static/AppleII/Target.hpp b/Analyser/Static/AppleII/Target.hpp index 030b81947..e351c24fc 100644 --- a/Analyser/Static/AppleII/Target.hpp +++ b/Analyser/Static/AppleII/Target.hpp @@ -13,9 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace AppleII { +namespace Analyser::Static::AppleII { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, @@ -51,8 +49,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace AppleIIgs { +namespace Analyser::Static::AppleIIgs { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* Analyser_Static_AppleIIgs_StaticAnalyser_hpp */ diff --git a/Analyser/Static/AppleIIgs/Target.hpp b/Analyser/Static/AppleIIgs/Target.hpp index a0eb988aa..dda1515d4 100644 --- a/Analyser/Static/AppleIIgs/Target.hpp +++ b/Analyser/Static/AppleIIgs/Target.hpp @@ -13,9 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace AppleIIgs { +namespace Analyser::Static::AppleIIgs { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, @@ -42,8 +40,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace Atari2600 { +namespace Analyser::Static::Atari2600 { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/Atari2600/Target.hpp b/Analyser/Static/Atari2600/Target.hpp index c372656ff..2ed2400a2 100644 --- a/Analyser/Static/Atari2600/Target.hpp +++ b/Analyser/Static/Atari2600/Target.hpp @@ -11,9 +11,7 @@ #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace Atari2600 { +namespace Analyser::Static::Atari2600 { struct Target: public ::Analyser::Static::Target { enum class PagingModel { @@ -38,8 +36,6 @@ struct Target: public ::Analyser::Static::Target { Target() : Analyser::Static::Target(Machine::Atari2600) {} }; -} -} } #endif /* Analyser_Static_Atari_Target_h */ diff --git a/Analyser/Static/AtariST/StaticAnalyser.hpp b/Analyser/Static/AtariST/StaticAnalyser.hpp index 54c041eed..061e2cb4c 100644 --- a/Analyser/Static/AtariST/StaticAnalyser.hpp +++ b/Analyser/Static/AtariST/StaticAnalyser.hpp @@ -13,15 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace AtariST { +namespace Analyser::Static::AtariST { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); } -} -} - #endif /* Analyser_Static_AtariST_StaticAnalyser_hpp */ diff --git a/Analyser/Static/AtariST/Target.hpp b/Analyser/Static/AtariST/Target.hpp index b4d01279f..a8cd792da 100644 --- a/Analyser/Static/AtariST/Target.hpp +++ b/Analyser/Static/AtariST/Target.hpp @@ -12,9 +12,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace AtariST { +namespace Analyser::Static::AtariST { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(MemorySize, @@ -31,8 +29,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace Coleco { +namespace Analyser::Static::Coleco { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/Commodore/Disk.hpp b/Analyser/Static/Commodore/Disk.hpp index 486ea086d..ec4376d87 100644 --- a/Analyser/Static/Commodore/Disk.hpp +++ b/Analyser/Static/Commodore/Disk.hpp @@ -14,14 +14,10 @@ #include -namespace Analyser { -namespace Static { -namespace Commodore { +namespace Analyser::Static::Commodore { std::vector GetFiles(const std::shared_ptr &disk); -} -} } #endif /* Disk_hpp */ diff --git a/Analyser/Static/Commodore/File.hpp b/Analyser/Static/Commodore/File.hpp index 5f943a3c8..61b4a9b10 100644 --- a/Analyser/Static/Commodore/File.hpp +++ b/Analyser/Static/Commodore/File.hpp @@ -12,9 +12,7 @@ #include #include -namespace Analyser { -namespace Static { -namespace Commodore { +namespace Analyser::Static::Commodore { struct File { std::wstring name; @@ -35,8 +33,6 @@ struct File { bool is_basic(); }; -} -} } #endif /* File_hpp */ diff --git a/Analyser/Static/Commodore/StaticAnalyser.hpp b/Analyser/Static/Commodore/StaticAnalyser.hpp index 86d7c9bed..548020ae5 100644 --- a/Analyser/Static/Commodore/StaticAnalyser.hpp +++ b/Analyser/Static/Commodore/StaticAnalyser.hpp @@ -13,14 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace Commodore { +namespace Analyser::Static::Commodore { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* CommodoreAnalyser_hpp */ diff --git a/Analyser/Static/Commodore/Tape.hpp b/Analyser/Static/Commodore/Tape.hpp index 1dec3a1cc..2531bb89c 100644 --- a/Analyser/Static/Commodore/Tape.hpp +++ b/Analyser/Static/Commodore/Tape.hpp @@ -12,14 +12,10 @@ #include "../../../Storage/Tape/Tape.hpp" #include "File.hpp" -namespace Analyser { -namespace Static { -namespace Commodore { +namespace Analyser::Static::Commodore { std::vector GetFiles(const std::shared_ptr &tape); -} -} } #endif /* Tape_hpp */ diff --git a/Analyser/Static/Commodore/Target.hpp b/Analyser/Static/Commodore/Target.hpp index 9da8506ec..4752544c0 100644 --- a/Analyser/Static/Commodore/Target.hpp +++ b/Analyser/Static/Commodore/Target.hpp @@ -14,9 +14,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace Commodore { +namespace Analyser::Static::Commodore { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { enum class MemoryModel { @@ -71,8 +69,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl #include -namespace Analyser { -namespace Static { -namespace MOS6502 { +namespace Analyser::Static::MOS6502 { /*! Describes a 6502 instruciton: its address, the operation it performs, its addressing mode @@ -95,7 +93,5 @@ Disassembly Disassemble( std::vector entry_points); } -} -} #endif /* Disassembler6502_hpp */ diff --git a/Analyser/Static/Disassembler/AddressMapper.hpp b/Analyser/Static/Disassembler/AddressMapper.hpp index 0bb8988c0..debc18600 100644 --- a/Analyser/Static/Disassembler/AddressMapper.hpp +++ b/Analyser/Static/Disassembler/AddressMapper.hpp @@ -11,9 +11,7 @@ #include -namespace Analyser { -namespace Static { -namespace Disassembler { +namespace Analyser::Static::Disassembler { /*! Provides an address mapper that relocates a chunk of memory so that it starts at @@ -25,8 +23,6 @@ template std::function OffsetMapper(T start_address }; } -} -} } #endif /* AddressMapper_hpp */ diff --git a/Analyser/Static/Disassembler/Kernel.hpp b/Analyser/Static/Disassembler/Kernel.hpp index d18e9e915..e6817b760 100644 --- a/Analyser/Static/Disassembler/Kernel.hpp +++ b/Analyser/Static/Disassembler/Kernel.hpp @@ -9,9 +9,7 @@ #ifndef Kernel_hpp #define Kernel_hpp -namespace Analyser { -namespace Static { -namespace Disassembly { +namespace Analyser::Static::Disassembly { template struct PartialDisassembly { D disassembly; @@ -45,8 +43,6 @@ template D Disassemble( return partial_disassembly.disassembly; } -} -} } #endif /* Kernel_hpp */ diff --git a/Analyser/Static/Disassembler/Z80.hpp b/Analyser/Static/Disassembler/Z80.hpp index 4f46b055d..ebed669d2 100644 --- a/Analyser/Static/Disassembler/Z80.hpp +++ b/Analyser/Static/Disassembler/Z80.hpp @@ -15,9 +15,7 @@ #include #include -namespace Analyser { -namespace Static { -namespace Z80 { +namespace Analyser::Static::Z80 { struct Instruction { /*! The address this instruction starts at. This is a mapped address. */ @@ -84,7 +82,5 @@ Disassembly Disassemble( std::vector entry_points); } -} -} #endif /* StaticAnalyser_Disassembler_Z80_hpp */ diff --git a/Analyser/Static/DiskII/StaticAnalyser.hpp b/Analyser/Static/DiskII/StaticAnalyser.hpp index a1f7a09f1..87ebc413b 100644 --- a/Analyser/Static/DiskII/StaticAnalyser.hpp +++ b/Analyser/Static/DiskII/StaticAnalyser.hpp @@ -13,15 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace DiskII { +namespace Analyser::Static::DiskII { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); } -} -} - #endif /* Analyser_Static_DiskII_StaticAnalyser_hpp */ diff --git a/Analyser/Static/Enterprise/StaticAnalyser.hpp b/Analyser/Static/Enterprise/StaticAnalyser.hpp index 0d7435d0a..ef03fc17f 100644 --- a/Analyser/Static/Enterprise/StaticAnalyser.hpp +++ b/Analyser/Static/Enterprise/StaticAnalyser.hpp @@ -13,15 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace Enterprise { +namespace Analyser::Static::Enterprise { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); } -} -} - #endif /* Analyser_Static_Enterprise_StaticAnalyser_hpp */ diff --git a/Analyser/Static/Enterprise/Target.hpp b/Analyser/Static/Enterprise/Target.hpp index 957852c5f..c1428ae73 100644 --- a/Analyser/Static/Enterprise/Target.hpp +++ b/Analyser/Static/Enterprise/Target.hpp @@ -15,9 +15,7 @@ #include -namespace Analyser { -namespace Static { -namespace Enterprise { +namespace Analyser::Static::Enterprise { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, Enterprise64, Enterprise128, Enterprise256); @@ -50,8 +48,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace MSX { +namespace Analyser::Static::MSX { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_MSX_StaticAnalyser_hpp */ diff --git a/Analyser/Static/MSX/Tape.hpp b/Analyser/Static/MSX/Tape.hpp index eb0ca66bf..b57a5928c 100644 --- a/Analyser/Static/MSX/Tape.hpp +++ b/Analyser/Static/MSX/Tape.hpp @@ -14,9 +14,7 @@ #include #include -namespace Analyser { -namespace Static { -namespace MSX { +namespace Analyser::Static::MSX { struct File { std::string name; @@ -37,8 +35,6 @@ struct File { std::vector GetFiles(const std::shared_ptr &tape); -} -} } #endif /* StaticAnalyser_MSX_Tape_hpp */ diff --git a/Analyser/Static/MSX/Target.hpp b/Analyser/Static/MSX/Target.hpp index 13b95eff1..4b6ae5185 100644 --- a/Analyser/Static/MSX/Target.hpp +++ b/Analyser/Static/MSX/Target.hpp @@ -14,9 +14,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace MSX { +namespace Analyser::Static::MSX { struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl { bool has_disk_drive = false; @@ -46,8 +44,6 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl< } }; -} -} } #endif /* Analyser_Static_MSX_Target_h */ diff --git a/Analyser/Static/Macintosh/StaticAnalyser.hpp b/Analyser/Static/Macintosh/StaticAnalyser.hpp index 8b40c0120..e9b165c74 100644 --- a/Analyser/Static/Macintosh/StaticAnalyser.hpp +++ b/Analyser/Static/Macintosh/StaticAnalyser.hpp @@ -13,15 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace Macintosh { +namespace Analyser::Static::Macintosh { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); } -} -} - #endif /* Analyser_Static_Macintosh_StaticAnalyser_hpp */ diff --git a/Analyser/Static/Macintosh/Target.hpp b/Analyser/Static/Macintosh/Target.hpp index f00cb4a24..6a46ca1e0 100644 --- a/Analyser/Static/Macintosh/Target.hpp +++ b/Analyser/Static/Macintosh/Target.hpp @@ -13,9 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace Macintosh { +namespace Analyser::Static::Macintosh { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, Mac128k, Mac512k, Mac512ke, MacPlus); @@ -30,8 +28,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace Oric { +namespace Analyser::Static::Oric { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/Oric/Tape.hpp b/Analyser/Static/Oric/Tape.hpp index fc7734697..bf0931950 100644 --- a/Analyser/Static/Oric/Tape.hpp +++ b/Analyser/Static/Oric/Tape.hpp @@ -14,9 +14,7 @@ #include #include -namespace Analyser { -namespace Static { -namespace Oric { +namespace Analyser::Static::Oric { struct File { std::string name; @@ -33,8 +31,6 @@ struct File { std::vector GetFiles(const std::shared_ptr &tape); -} -} } #endif /* Tape_hpp */ diff --git a/Analyser/Static/Oric/Target.hpp b/Analyser/Static/Oric/Target.hpp index 74e686dff..4b43c4aff 100644 --- a/Analyser/Static/Oric/Target.hpp +++ b/Analyser/Static/Oric/Target.hpp @@ -14,9 +14,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace Oric { +namespace Analyser::Static::Oric { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(ROM, @@ -56,8 +54,6 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl -namespace Analyser { -namespace Static { -namespace Sega { +namespace Analyser::Static::Sega { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/Sega/Target.hpp b/Analyser/Static/Sega/Target.hpp index 24230293d..20142ca48 100644 --- a/Analyser/Static/Sega/Target.hpp +++ b/Analyser/Static/Sega/Target.hpp @@ -13,9 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace Sega { +namespace Analyser::Static::Sega { struct Target: public Analyser::Static::Target, public Reflection::StructImpl { enum class Model { @@ -52,8 +50,6 @@ constexpr bool is_master_system(Analyser::Static::Sega::Target::Model model) { return model >= Analyser::Static::Sega::Target::Model::MasterSystem; } -} -} } #endif /* Analyser_Static_Sega_Target_h */ diff --git a/Analyser/Static/StaticAnalyser.hpp b/Analyser/Static/StaticAnalyser.hpp index 259f7cca9..f4e3fd317 100644 --- a/Analyser/Static/StaticAnalyser.hpp +++ b/Analyser/Static/StaticAnalyser.hpp @@ -21,8 +21,7 @@ #include #include -namespace Analyser { -namespace Static { +namespace Analyser::Static { struct State; @@ -79,7 +78,6 @@ TargetList GetTargets(const std::string &file_name); */ Media GetMedia(const std::string &file_name); -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/ZX8081/StaticAnalyser.hpp b/Analyser/Static/ZX8081/StaticAnalyser.hpp index 141a15945..2fa1ce49e 100644 --- a/Analyser/Static/ZX8081/StaticAnalyser.hpp +++ b/Analyser/Static/ZX8081/StaticAnalyser.hpp @@ -13,14 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace ZX8081 { +namespace Analyser::Static::ZX8081 { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/ZX8081/Target.hpp b/Analyser/Static/ZX8081/Target.hpp index c7dd7e60d..f4a27c4ad 100644 --- a/Analyser/Static/ZX8081/Target.hpp +++ b/Analyser/Static/ZX8081/Target.hpp @@ -14,9 +14,7 @@ #include "../StaticAnalyser.hpp" #include -namespace Analyser { -namespace Static { -namespace ZX8081 { +namespace Analyser::Static::ZX8081 { struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(MemoryModel, @@ -40,8 +38,6 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl< } }; -} -} } #endif /* Analyser_Static_ZX8081_Target_h */ diff --git a/Analyser/Static/ZXSpectrum/StaticAnalyser.hpp b/Analyser/Static/ZXSpectrum/StaticAnalyser.hpp index 756c28ad0..7e5ef7945 100644 --- a/Analyser/Static/ZXSpectrum/StaticAnalyser.hpp +++ b/Analyser/Static/ZXSpectrum/StaticAnalyser.hpp @@ -13,14 +13,10 @@ #include "../../../Storage/TargetPlatforms.hpp" #include -namespace Analyser { -namespace Static { -namespace ZXSpectrum { +namespace Analyser::Static::ZXSpectrum { TargetList GetTargets(const Media &media, const std::string &file_name, TargetPlatform::IntType potential_platforms); -} -} } #endif /* StaticAnalyser_hpp */ diff --git a/Analyser/Static/ZXSpectrum/Target.hpp b/Analyser/Static/ZXSpectrum/Target.hpp index 76eada20e..bd42dbd8d 100644 --- a/Analyser/Static/ZXSpectrum/Target.hpp +++ b/Analyser/Static/ZXSpectrum/Target.hpp @@ -13,9 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../StaticAnalyser.hpp" -namespace Analyser { -namespace Static { -namespace ZXSpectrum { +namespace Analyser::Static::ZXSpectrum { struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl { ReflectableEnum(Model, @@ -38,8 +36,6 @@ struct Target: public ::Analyser::Static::Target, public Reflection::StructImpl< } }; -} -} } #endif /* Target_h */ diff --git a/Components/5380/ncr5380.hpp b/Components/5380/ncr5380.hpp index 6ea409b53..18d4e367d 100644 --- a/Components/5380/ncr5380.hpp +++ b/Components/5380/ncr5380.hpp @@ -14,8 +14,7 @@ #include "../../Storage/MassStorage/SCSI/SCSI.hpp" -namespace NCR { -namespace NCR5380 { +namespace NCR::NCR5380 { /*! Models the NCR 5380, a SCSI interface chip. @@ -86,7 +85,6 @@ class NCR5380 final: public SCSI::Bus::Observer { bool phase_matches() const; }; -} } #endif /* ncr5380_hpp */ diff --git a/Components/6522/6522.hpp b/Components/6522/6522.hpp index 3e09819d0..20eaeaa3e 100644 --- a/Components/6522/6522.hpp +++ b/Components/6522/6522.hpp @@ -15,8 +15,7 @@ #include "../../ClockReceiver/ClockReceiver.hpp" -namespace MOS { -namespace MOS6522 { +namespace MOS::MOS6522 { enum Port { A = 0, @@ -138,7 +137,6 @@ template class MOS6522: public MOS6522Storage { void evaluate_port_b_output(); }; -} } #include "Implementation/6522Implementation.hpp" diff --git a/Components/6522/Implementation/6522Implementation.hpp b/Components/6522/Implementation/6522Implementation.hpp index 3e23422eb..52edea000 100644 --- a/Components/6522/Implementation/6522Implementation.hpp +++ b/Components/6522/Implementation/6522Implementation.hpp @@ -12,8 +12,7 @@ // // PB6 count-down mode for timer 2. -namespace MOS { -namespace MOS6522 { +namespace MOS::MOS6522 { template void MOS6522::access(int address) { switch(address) { @@ -494,4 +493,3 @@ template void MOS6522::shift_out() { } } -} diff --git a/Components/6522/Implementation/6522Storage.hpp b/Components/6522/Implementation/6522Storage.hpp index 0c7f4c789..1488954e2 100644 --- a/Components/6522/Implementation/6522Storage.hpp +++ b/Components/6522/Implementation/6522Storage.hpp @@ -11,8 +11,7 @@ #include -namespace MOS { -namespace MOS6522 { +namespace MOS::MOS6522 { class MOS6522Storage { protected: @@ -107,7 +106,6 @@ class MOS6522Storage { } }; -} } #endif /* _522Storage_hpp */ diff --git a/Components/6526/6526.hpp b/Components/6526/6526.hpp index 99eb5e8e6..08c68cf6e 100644 --- a/Components/6526/6526.hpp +++ b/Components/6526/6526.hpp @@ -14,8 +14,7 @@ #include "Implementation/6526Storage.hpp" #include "../Serial/Line.hpp" -namespace MOS { -namespace MOS6526 { +namespace MOS::MOS6526 { enum Port { A = 0, @@ -86,7 +85,6 @@ template class MOS6526: bool serial_line_did_produce_bit(Serial::Line *line, int bit) final; }; -} } #include "Implementation/6526Implementation.hpp" diff --git a/Components/6526/Implementation/6526Implementation.hpp b/Components/6526/Implementation/6526Implementation.hpp index 92ecf5269..dad339574 100644 --- a/Components/6526/Implementation/6526Implementation.hpp +++ b/Components/6526/Implementation/6526Implementation.hpp @@ -12,8 +12,7 @@ #include #include -namespace MOS { -namespace MOS6526 { +namespace MOS::MOS6526 { enum Interrupts: uint8_t { TimerA = 1 << 0, @@ -238,7 +237,6 @@ bool MOS6526::serial_line_did_produce_bit(Serial::Line return true; } -} } #endif /* _526Implementation_h */ diff --git a/Components/6526/Implementation/6526Storage.hpp b/Components/6526/Implementation/6526Storage.hpp index 7a3c2bf1b..99978f67c 100644 --- a/Components/6526/Implementation/6526Storage.hpp +++ b/Components/6526/Implementation/6526Storage.hpp @@ -13,8 +13,7 @@ #include "../../../ClockReceiver/ClockReceiver.hpp" -namespace MOS { -namespace MOS6526 { +namespace MOS::MOS6526 { class TODBase { public: @@ -333,7 +332,6 @@ struct MOS6526Storage { int pending_ = 0; }; -} } #endif /* _526Storage_h */ diff --git a/Components/6560/6560.hpp b/Components/6560/6560.hpp index 1ebd3e6e8..91fc82a74 100644 --- a/Components/6560/6560.hpp +++ b/Components/6560/6560.hpp @@ -15,8 +15,7 @@ #include "../../Outputs/Speaker/Implementation/LowpassSpeaker.hpp" #include "../../Outputs/Speaker/Implementation/SampleSource.hpp" -namespace MOS { -namespace MOS6560 { +namespace MOS::MOS6560 { // audio state class AudioGenerator: public ::Outputs::Speaker::SampleSource { @@ -520,7 +519,6 @@ template class MOS6560 { OutputMode output_mode_ = OutputMode::NTSC; }; -} } #endif /* _560_hpp */ diff --git a/Components/6845/CRTC6845.hpp b/Components/6845/CRTC6845.hpp index 7006a37e9..fd7008041 100644 --- a/Components/6845/CRTC6845.hpp +++ b/Components/6845/CRTC6845.hpp @@ -14,8 +14,7 @@ #include #include -namespace Motorola { -namespace CRTC { +namespace Motorola::CRTC { struct BusState { bool display_enable = false; @@ -269,7 +268,6 @@ template class CRTC6845 { unsigned int character_is_visible_shifter_ = 0; }; -} } #endif /* CRTC6845_hpp */ diff --git a/Components/6850/6850.hpp b/Components/6850/6850.hpp index 69e192e90..280723e0b 100644 --- a/Components/6850/6850.hpp +++ b/Components/6850/6850.hpp @@ -15,8 +15,7 @@ #include "../../ClockReceiver/ClockingHintSource.hpp" #include "../Serial/Line.hpp" -namespace Motorola { -namespace ACIA { +namespace Motorola::ACIA { class ACIA: public ClockingHint::Source, private Serial::Line::ReadDelegate { public: @@ -126,7 +125,6 @@ class ACIA: public ClockingHint::Source, private Serial::Line::ReadDelega uint8_t get_status(); }; -} } #endif /* Motorola_ACIA_6850_hpp */ diff --git a/Components/68901/MFP68901.hpp b/Components/68901/MFP68901.hpp index f1bda90dd..4c067d1f2 100644 --- a/Components/68901/MFP68901.hpp +++ b/Components/68901/MFP68901.hpp @@ -14,8 +14,7 @@ #include -namespace Motorola { -namespace MFP68901 { +namespace Motorola::MFP68901 { class PortHandler { public: @@ -182,7 +181,6 @@ class MFP68901: public ClockingHint::Source { } }; -} } #endif /* MFP68901_hpp */ diff --git a/Components/8255/i8255.hpp b/Components/8255/i8255.hpp index d8e2a42f6..2551c402e 100644 --- a/Components/8255/i8255.hpp +++ b/Components/8255/i8255.hpp @@ -11,8 +11,7 @@ #include -namespace Intel { -namespace i8255 { +namespace Intel::i8255 { class PortHandler { public: @@ -88,7 +87,6 @@ template class i8255 { T &port_handler_; }; -} } #endif /* i8255_hpp */ diff --git a/Components/8272/i8272.hpp b/Components/8272/i8272.hpp index cb589343c..0c502e3c8 100644 --- a/Components/8272/i8272.hpp +++ b/Components/8272/i8272.hpp @@ -15,8 +15,7 @@ #include #include -namespace Intel { -namespace i8272 { +namespace Intel::i8272 { class BusHandler { public: @@ -130,7 +129,6 @@ class i8272 : public Storage::Disk::MFMController { bool is_sleeping_ = false; }; -} } #endif /* i8272_hpp */ diff --git a/Components/8530/z8530.hpp b/Components/8530/z8530.hpp index 4826cb445..099aa6e24 100644 --- a/Components/8530/z8530.hpp +++ b/Components/8530/z8530.hpp @@ -11,8 +11,7 @@ #include -namespace Zilog { -namespace SCC { +namespace Zilog::SCC { /*! Models the Zilog 8530 SCC, a serial adaptor. @@ -110,7 +109,5 @@ class z8530 { }; } -} - #endif /* z8530_hpp */ diff --git a/Components/AY38910/AY38910.hpp b/Components/AY38910/AY38910.hpp index b06a92b2b..a42a51124 100644 --- a/Components/AY38910/AY38910.hpp +++ b/Components/AY38910/AY38910.hpp @@ -14,8 +14,7 @@ #include "../../Reflection/Struct.hpp" -namespace GI { -namespace AY38910 { +namespace GI::AY38910 { /*! A port handler provides all input for an AY's two 8-bit ports, and may optionally receive @@ -219,7 +218,6 @@ struct State: public Reflection::StructImpl { } }; -} } #endif /* AY_3_8910_hpp */ diff --git a/Components/AppleClock/AppleClock.hpp b/Components/AppleClock/AppleClock.hpp index 0b06bb2cf..cf27a796f 100644 --- a/Components/AppleClock/AppleClock.hpp +++ b/Components/AppleClock/AppleClock.hpp @@ -11,8 +11,7 @@ #include -namespace Apple { -namespace Clock { +namespace Apple::Clock { /*! Models Apple's real-time clocks, as contained in the Macintosh and IIgs. @@ -293,7 +292,6 @@ class ParallelClock: public ClockStorage { uint8_t control_; }; -} } #endif /* Apple_RealTimeClock_hpp */ diff --git a/Components/DiskII/DiskIIDrive.hpp b/Components/DiskII/DiskIIDrive.hpp index e003919aa..55e883e08 100644 --- a/Components/DiskII/DiskIIDrive.hpp +++ b/Components/DiskII/DiskIIDrive.hpp @@ -11,8 +11,7 @@ #include "IWM.hpp" -namespace Apple { -namespace Disk { +namespace Apple::Disk { class DiskIIDrive: public IWMDrive { public: @@ -27,7 +26,6 @@ class DiskIIDrive: public IWMDrive { int stepper_position_ = 0; }; -} } #endif /* DiskIIDrive_hpp */ diff --git a/Components/DiskII/MacintoshDoubleDensityDrive.hpp b/Components/DiskII/MacintoshDoubleDensityDrive.hpp index 3c6bf5b8f..31ab1934e 100644 --- a/Components/DiskII/MacintoshDoubleDensityDrive.hpp +++ b/Components/DiskII/MacintoshDoubleDensityDrive.hpp @@ -11,8 +11,7 @@ #include "IWM.hpp" -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { class DoubleDensityDrive: public IWMDrive { public: @@ -47,7 +46,6 @@ class DoubleDensityDrive: public IWMDrive { int step_direction_ = 1; }; -} } #endif /* MacintoshDoubleDensityDrive_hpp */ diff --git a/Components/OPx/Implementation/EnvelopeGenerator.hpp b/Components/OPx/Implementation/EnvelopeGenerator.hpp index 3d7b80c19..06c7f2eb6 100644 --- a/Components/OPx/Implementation/EnvelopeGenerator.hpp +++ b/Components/OPx/Implementation/EnvelopeGenerator.hpp @@ -13,8 +13,7 @@ #include #include "LowFrequencyOscillator.hpp" -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { /*! Models an OPL-style envelope generator. @@ -258,7 +257,6 @@ template class EnvelopeGenerator } }; -} } #endif /* EnvelopeGenerator_h */ diff --git a/Components/OPx/Implementation/KeyLevelScaler.hpp b/Components/OPx/Implementation/KeyLevelScaler.hpp index a86995bdf..e1dbc66fc 100644 --- a/Components/OPx/Implementation/KeyLevelScaler.hpp +++ b/Components/OPx/Implementation/KeyLevelScaler.hpp @@ -9,8 +9,7 @@ #ifndef KeyLevelScaler_h #define KeyLevelScaler_h -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { template class KeyLevelScaler { public: @@ -51,8 +50,6 @@ template class KeyLevelScaler { int shift_ = 0; }; - -} } #endif /* KeyLevelScaler_h */ diff --git a/Components/OPx/Implementation/LowFrequencyOscillator.hpp b/Components/OPx/Implementation/LowFrequencyOscillator.hpp index a3d852e67..5c53eac29 100644 --- a/Components/OPx/Implementation/LowFrequencyOscillator.hpp +++ b/Components/OPx/Implementation/LowFrequencyOscillator.hpp @@ -11,8 +11,7 @@ #include "../../../Numeric/LFSR.hpp" -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { /*! Models the output of the OPL low-frequency oscillator, which provides a couple of optional fixed-frequency @@ -62,7 +61,6 @@ class LowFrequencyOscillator { Numeric::LFSR noise_source_; }; -} } #endif /* LowFrequencyOscillator_hpp */ diff --git a/Components/OPx/Implementation/OPLBase.hpp b/Components/OPx/Implementation/OPLBase.hpp index 8183d4287..7ed6ca775 100644 --- a/Components/OPx/Implementation/OPLBase.hpp +++ b/Components/OPx/Implementation/OPLBase.hpp @@ -12,8 +12,7 @@ #include "../../../Outputs/Speaker/Implementation/SampleSource.hpp" #include "../../../Concurrency/AsyncTaskQueue.hpp" -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { template class OPLBase: public ::Outputs::Speaker::SampleSource { public: @@ -34,7 +33,6 @@ template class OPLBase: public ::Outputs::Speaker::SampleSource uint8_t selected_register_ = 0; }; -} } #endif /* OPLBase_h */ diff --git a/Components/OPx/Implementation/PhaseGenerator.hpp b/Components/OPx/Implementation/PhaseGenerator.hpp index 89ca27ebd..b5cb3ff73 100644 --- a/Components/OPx/Implementation/PhaseGenerator.hpp +++ b/Components/OPx/Implementation/PhaseGenerator.hpp @@ -13,8 +13,7 @@ #include "LowFrequencyOscillator.hpp" #include "Tables.hpp" -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { /*! Models an OPL-style phase generator of templated precision; having been told its period ('f-num'), octave ('block') and @@ -119,7 +118,6 @@ template class PhaseGenerator { int enable_vibrato_ = 0; }; -} } #endif /* PhaseGenerator_h */ diff --git a/Components/OPx/Implementation/Tables.hpp b/Components/OPx/Implementation/Tables.hpp index d50f2c391..242144ee7 100644 --- a/Components/OPx/Implementation/Tables.hpp +++ b/Components/OPx/Implementation/Tables.hpp @@ -9,8 +9,7 @@ #ifndef Tables_hpp #define Tables_hpp -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { /* These are the OPL's built-in log-sin and exponentiation tables, as recovered by @@ -221,7 +220,6 @@ inline int LogSign::level(int fractional) const { return power_two(*this, fractional); } -} } #endif /* Tables_hpp */ diff --git a/Components/OPx/Implementation/WaveformGenerator.hpp b/Components/OPx/Implementation/WaveformGenerator.hpp index 381fe7eea..f325b1012 100644 --- a/Components/OPx/Implementation/WaveformGenerator.hpp +++ b/Components/OPx/Implementation/WaveformGenerator.hpp @@ -12,8 +12,7 @@ #include "Tables.hpp" #include "LowFrequencyOscillator.hpp" -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { enum class Waveform { Sine, HalfSine, AbsSine, PulseSine @@ -86,7 +85,6 @@ template class WaveformGenerator { } }; -} } #endif /* WaveformGenerator_h */ diff --git a/Components/OPx/OPLL.hpp b/Components/OPx/OPLL.hpp index 530d84e77..5341f40ca 100644 --- a/Components/OPx/OPLL.hpp +++ b/Components/OPx/OPLL.hpp @@ -18,8 +18,7 @@ #include -namespace Yamaha { -namespace OPL { +namespace Yamaha::OPL { class OPLL: public OPLBase { public: @@ -125,7 +124,6 @@ class OPLL: public OPLBase { const uint8_t *instrument_definition(int instrument, int channel); }; -} } #endif /* OPLL_hpp */ diff --git a/Components/RP5C01/RP5C01.hpp b/Components/RP5C01/RP5C01.hpp index ba7e5fe71..5b6914d98 100644 --- a/Components/RP5C01/RP5C01.hpp +++ b/Components/RP5C01/RP5C01.hpp @@ -14,8 +14,7 @@ #include #include -namespace Ricoh { -namespace RP5C01 { +namespace Ricoh::RP5C01 { class RP5C01 { public: @@ -56,8 +55,5 @@ class RP5C01 { }; } -} - -#include #endif /* RP5C01_hpp */ diff --git a/InstructionSets/6809/OperationMapper.hpp b/InstructionSets/6809/OperationMapper.hpp index 8c6fafd45..478c12d84 100644 --- a/InstructionSets/6809/OperationMapper.hpp +++ b/InstructionSets/6809/OperationMapper.hpp @@ -14,8 +14,7 @@ // Subject to corrections: // // * CWAI and the pushes and pulls at 0x3x are immediate, not inherent. -namespace InstructionSet { -namespace M6809 { +namespace InstructionSet::M6809 { enum class AddressingMode { Illegal, @@ -239,7 +238,6 @@ template void OperationMapper::dispatc } } -} } #endif /* InstructionSets_M6809_OperationMapper_hpp */ diff --git a/InstructionSets/AccessType.hpp b/InstructionSets/AccessType.hpp index 196bfc44b..4b5635542 100644 --- a/InstructionSets/AccessType.hpp +++ b/InstructionSets/AccessType.hpp @@ -20,5 +20,4 @@ enum class AccessType { } - #endif /* AccessType_h */ diff --git a/InstructionSets/M50740/Decoder.hpp b/InstructionSets/M50740/Decoder.hpp index 4f3f3d5b2..409d5f535 100644 --- a/InstructionSets/M50740/Decoder.hpp +++ b/InstructionSets/M50740/Decoder.hpp @@ -14,8 +14,7 @@ #include #include -namespace InstructionSet { -namespace M50740 { +namespace InstructionSet::M50740 { class Decoder { public: @@ -33,7 +32,6 @@ class Decoder { Instruction instr_; }; -} } #endif /* InstructionSets_M50740_Decoder_hpp */ diff --git a/InstructionSets/M50740/Executor.hpp b/InstructionSets/M50740/Executor.hpp index 28c83e43d..6ab8bcf55 100644 --- a/InstructionSets/M50740/Executor.hpp +++ b/InstructionSets/M50740/Executor.hpp @@ -18,8 +18,7 @@ #include #include -namespace InstructionSet { -namespace M50740 { +namespace InstructionSet::M50740 { class Executor; using CachingExecutor = CachingExecutor; @@ -174,7 +173,6 @@ class Executor: public CachingExecutor { inline void subtract_duration(int duration); }; -} } #endif /* Executor_h */ diff --git a/InstructionSets/M50740/Instruction.hpp b/InstructionSets/M50740/Instruction.hpp index deafa692f..057a79640 100644 --- a/InstructionSets/M50740/Instruction.hpp +++ b/InstructionSets/M50740/Instruction.hpp @@ -15,8 +15,7 @@ #include #include "../AccessType.hpp" -namespace InstructionSet { -namespace M50740 { +namespace InstructionSet::M50740 { enum class AddressingMode { Implied, Accumulator, Immediate, @@ -236,7 +235,5 @@ inline std::ostream &operator <<(std::ostream &stream, const Instruction &instru } } -} - #endif /* InstructionSets_M50740_Instruction_h */ diff --git a/InstructionSets/M50740/Parser.hpp b/InstructionSets/M50740/Parser.hpp index 9c9937921..dc739048a 100644 --- a/InstructionSets/M50740/Parser.hpp +++ b/InstructionSets/M50740/Parser.hpp @@ -13,8 +13,7 @@ #include "Decoder.hpp" #include "../AccessType.hpp" -namespace InstructionSet { -namespace M50740 { +namespace InstructionSet::M50740 { template struct Parser { void parse(Target &target, const uint8_t *storage, uint16_t start, uint16_t closing_bound) { @@ -119,7 +118,6 @@ template struct Parser { } }; -} } #endif /* InstructionSets_M50740_Parser_hpp */ diff --git a/InstructionSets/M68k/Decoder.hpp b/InstructionSets/M68k/Decoder.hpp index d54cdabfd..2f4413df8 100644 --- a/InstructionSets/M68k/Decoder.hpp +++ b/InstructionSets/M68k/Decoder.hpp @@ -13,8 +13,7 @@ #include "Model.hpp" #include "../../Numeric/Sizes.hpp" -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { /*! A stateless decoder that can map from instruction words to preinstructions @@ -115,7 +114,6 @@ template class Predecoder { static constexpr Operation operation(OpT op); }; -} } #endif /* InstructionSets_M68k_Decoder_hpp */ diff --git a/InstructionSets/M68k/ExceptionVectors.hpp b/InstructionSets/M68k/ExceptionVectors.hpp index e56c71efb..99bab495a 100644 --- a/InstructionSets/M68k/ExceptionVectors.hpp +++ b/InstructionSets/M68k/ExceptionVectors.hpp @@ -9,8 +9,7 @@ #ifndef InstructionSets_M68k_ExceptionVectors_hpp #define InstructionSets_M68k_ExceptionVectors_hpp -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { enum Exception { InitialStackPointer = 0, @@ -44,7 +43,6 @@ enum Exception { MMUAccessLevelViolationError = 58, }; -} } #endif /* InstructionSets_M68k_ExceptionVectors_hpp */ diff --git a/InstructionSets/M68k/Executor.hpp b/InstructionSets/M68k/Executor.hpp index 7d86d8bfe..5c2737bd7 100644 --- a/InstructionSets/M68k/Executor.hpp +++ b/InstructionSets/M68k/Executor.hpp @@ -16,8 +16,7 @@ #include "RegisterSet.hpp" #include "Status.hpp" -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { /// Maps the 68k function codes such that bits 0, 1 and 2 represent /// FC0, FC1 and FC2 respectively. @@ -163,7 +162,6 @@ template class Executor { } state_; }; -} } #include "Implementation/ExecutorImplementation.hpp" diff --git a/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp b/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp index 608f62161..b064237aa 100644 --- a/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp +++ b/InstructionSets/M68k/Implementation/ExecutorImplementation.hpp @@ -15,8 +15,7 @@ #include -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { #define An(x) state_.registers[8 + x] #define Dn(x) state_.registers[x] @@ -749,7 +748,6 @@ void Executor::State::movem_toR(Preinstruction instruction, u #undef An #undef AccessException -} } #endif /* InstructionSets_M68k_ExecutorImplementation_hpp */ diff --git a/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp b/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp index e78aca928..8e6630ef3 100644 --- a/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp +++ b/InstructionSets/M68k/Implementation/InstructionOperandFlags.hpp @@ -9,8 +9,7 @@ #ifndef InstructionSets_68k_InstructionOperandFlags_hpp #define InstructionSets_68k_InstructionOperandFlags_hpp -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { template constexpr uint8_t operand_flags(Operation r_operation) { switch((t_operation != Operation::Undefined) ? t_operation : r_operation) { @@ -168,7 +167,6 @@ template constexpr uint8_t operand_flags(Op } } -} } #endif /* InstructionSets_68k_InstructionOperandFlags_hpp */ diff --git a/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp b/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp index 44e07011e..3d6308dbc 100644 --- a/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp +++ b/InstructionSets/M68k/Implementation/InstructionOperandSize.hpp @@ -9,8 +9,7 @@ #ifndef InstructionSets_68k_InstructionOperandSize_hpp #define InstructionSets_68k_InstructionOperandSize_hpp -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { template constexpr DataSize operand_size(Operation r_operation) { @@ -128,7 +127,6 @@ constexpr DataSize operand_size(Operation r_operation) { } } -} } #endif /* InstructionSets_68k_InstructionOperandSize_hpp */ diff --git a/InstructionSets/M68k/Implementation/PerformImplementation.hpp b/InstructionSets/M68k/Implementation/PerformImplementation.hpp index 2291ef6b1..51c2fc81c 100644 --- a/InstructionSets/M68k/Implementation/PerformImplementation.hpp +++ b/InstructionSets/M68k/Implementation/PerformImplementation.hpp @@ -15,8 +15,7 @@ #include #include -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { /// Sign-extend @c x to 32 bits and return as an unsigned 32-bit int. inline uint32_t u_extend16(uint16_t x) { return uint32_t(int16_t(x)); } @@ -1030,7 +1029,6 @@ template < } -} } #endif /* InstructionSets_M68k_PerformImplementation_h */ diff --git a/InstructionSets/M68k/Instruction.hpp b/InstructionSets/M68k/Instruction.hpp index b7b7ce0ac..5251cf5af 100644 --- a/InstructionSets/M68k/Instruction.hpp +++ b/InstructionSets/M68k/Instruction.hpp @@ -15,8 +15,7 @@ #include #include -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { enum class Operation: uint8_t { Undefined, @@ -494,7 +493,6 @@ class Preinstruction { const char *operation_string() const; }; -} } #include "Implementation/InstructionOperandSize.hpp" diff --git a/InstructionSets/M68k/Model.hpp b/InstructionSets/M68k/Model.hpp index 3de18d405..65572331c 100644 --- a/InstructionSets/M68k/Model.hpp +++ b/InstructionSets/M68k/Model.hpp @@ -9,8 +9,7 @@ #ifndef InstructionSets_M68k_Model_hpp #define InstructionSets_M68k_Model_hpp -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { enum class Model { M68000, @@ -20,7 +19,6 @@ enum class Model { M68040, }; -} } #endif /* InstructionSets_M68k_Model_hpp */ diff --git a/InstructionSets/M68k/Perform.hpp b/InstructionSets/M68k/Perform.hpp index 300706b00..7bba658b3 100644 --- a/InstructionSets/M68k/Perform.hpp +++ b/InstructionSets/M68k/Perform.hpp @@ -14,8 +14,7 @@ #include "Status.hpp" #include "../../Numeric/RegisterSizes.hpp" -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { struct NullFlowController { // @@ -167,7 +166,6 @@ template < Operation operation = Operation::Undefined > void perform(Preinstruction instruction, CPU::RegisterPair32 &source, CPU::RegisterPair32 &dest, Status &status, FlowController &flow_controller); -} } #include "Implementation/PerformImplementation.hpp" diff --git a/InstructionSets/M68k/RegisterSet.hpp b/InstructionSets/M68k/RegisterSet.hpp index 87e98f70b..ee2a66f3b 100644 --- a/InstructionSets/M68k/RegisterSet.hpp +++ b/InstructionSets/M68k/RegisterSet.hpp @@ -9,8 +9,7 @@ #ifndef InstructionSets_M68k_RegisterSet_h #define InstructionSets_M68k_RegisterSet_h -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { struct RegisterSet { uint32_t data[8], address[7]; @@ -25,7 +24,6 @@ struct RegisterSet { } }; -} } #endif /* InstructionSets_M68k_RegisterSet_h */ diff --git a/InstructionSets/M68k/Status.hpp b/InstructionSets/M68k/Status.hpp index 22f15c52d..404eefb24 100644 --- a/InstructionSets/M68k/Status.hpp +++ b/InstructionSets/M68k/Status.hpp @@ -11,8 +11,7 @@ #include "Instruction.hpp" -namespace InstructionSet { -namespace M68k { +namespace InstructionSet::M68k { namespace ConditionCode { @@ -159,7 +158,6 @@ struct Status { } }; -} } #endif /* InstructionSets_M68k_Status_h */ diff --git a/InstructionSets/PowerPC/Decoder.hpp b/InstructionSets/PowerPC/Decoder.hpp index ac763217e..9f2cb6e1d 100644 --- a/InstructionSets/PowerPC/Decoder.hpp +++ b/InstructionSets/PowerPC/Decoder.hpp @@ -11,8 +11,7 @@ #include "Instruction.hpp" -namespace InstructionSet { -namespace PowerPC { +namespace InstructionSet::PowerPC { enum class Model { /// i.e. 32-bit, with POWER carry-over instructions. @@ -50,7 +49,6 @@ template struct Decoder { Instruction decode(uint32_t opcode); }; -} } #endif /* InstructionSets_PowerPC_Decoder_hpp */ diff --git a/InstructionSets/PowerPC/Instruction.hpp b/InstructionSets/PowerPC/Instruction.hpp index 07d9b0175..9348ea08b 100644 --- a/InstructionSets/PowerPC/Instruction.hpp +++ b/InstructionSets/PowerPC/Instruction.hpp @@ -11,8 +11,7 @@ #include -namespace InstructionSet { -namespace PowerPC { +namespace InstructionSet::PowerPC { enum class CacheLine: uint32_t { Instruction = 0b01100, @@ -1530,7 +1529,6 @@ struct Instruction { // Sanity check on Instruction size. static_assert(sizeof(Instruction) <= 8); -} } #endif /* InstructionSets_PowerPC_Instruction_h */ diff --git a/InstructionSets/x86/DataPointerResolver.hpp b/InstructionSets/x86/DataPointerResolver.hpp index 2a2197a25..df7aa53db 100644 --- a/InstructionSets/x86/DataPointerResolver.hpp +++ b/InstructionSets/x86/DataPointerResolver.hpp @@ -14,8 +14,7 @@ #include -namespace InstructionSet { -namespace x86 { +namespace InstructionSet::x86 { /// Unlike source, describes only registers, and breaks /// them down by conventional name — so AL, AH, AX and EAX are all @@ -314,7 +313,6 @@ template void DataPointerResolver #include -namespace InstructionSet { -namespace x86 { +namespace InstructionSet::x86 { /*! Implements Intel x86 instruction decoding. @@ -227,7 +226,6 @@ template class Decoder { } }; -} } #endif /* InstructionSets_x86_Decoder_hpp */ diff --git a/InstructionSets/x86/Instruction.hpp b/InstructionSets/x86/Instruction.hpp index d34acb44c..a3172f911 100644 --- a/InstructionSets/x86/Instruction.hpp +++ b/InstructionSets/x86/Instruction.hpp @@ -13,8 +13,7 @@ #include #include -namespace InstructionSet { -namespace x86 { +namespace InstructionSet::x86 { /* Operations are documented below to establish expectations as to which @@ -796,7 +795,6 @@ template class Instruction { static_assert(sizeof(Instruction) <= 16); static_assert(sizeof(Instruction) <= 10); -} } #endif /* InstructionSets_x86_Instruction_h */ diff --git a/InstructionSets/x86/Model.hpp b/InstructionSets/x86/Model.hpp index 304214475..4a4ac0bdb 100644 --- a/InstructionSets/x86/Model.hpp +++ b/InstructionSets/x86/Model.hpp @@ -9,8 +9,7 @@ #ifndef Model_h #define Model_h -namespace InstructionSet { -namespace x86 { +namespace InstructionSet::x86 { enum class Model { i8086, @@ -21,7 +20,6 @@ enum class Model { static constexpr bool is_32bit(Model model) { return model >= Model::i80386; } -} } #endif /* Model_h */ diff --git a/Machines/Apple/ADB/Bus.hpp b/Machines/Apple/ADB/Bus.hpp index a39f530ef..a6d35099f 100644 --- a/Machines/Apple/ADB/Bus.hpp +++ b/Machines/Apple/ADB/Bus.hpp @@ -16,8 +16,7 @@ #include #include -namespace Apple { -namespace ADB { +namespace Apple::ADB { struct Command { enum class Type { @@ -166,7 +165,6 @@ class Bus { } phase_ = Phase::AttentionCapture; }; -} } #endif /* Bus_hpp */ diff --git a/Machines/Apple/ADB/Keyboard.hpp b/Machines/Apple/ADB/Keyboard.hpp index a8213dd28..7438f6bc6 100644 --- a/Machines/Apple/ADB/Keyboard.hpp +++ b/Machines/Apple/ADB/Keyboard.hpp @@ -18,8 +18,7 @@ #include #include -namespace Apple { -namespace ADB { +namespace Apple::ADB { /*! Defines the keycodes that could be passed directly via set_key_pressed; these @@ -119,7 +118,6 @@ class KeyboardMapper: public MachineTypes::MappedKeyboardMachine::KeyboardMapper uint16_t mapped_key_for_key(Inputs::Keyboard::Key key) const final; }; -} } #endif /* Keyboard_hpp */ diff --git a/Machines/Apple/ADB/Mouse.hpp b/Machines/Apple/ADB/Mouse.hpp index 3e8a4dc1f..a085089e4 100644 --- a/Machines/Apple/ADB/Mouse.hpp +++ b/Machines/Apple/ADB/Mouse.hpp @@ -12,8 +12,7 @@ #include "ReactiveDevice.hpp" #include "../../../Inputs/Mouse.hpp" -namespace Apple { -namespace ADB { +namespace Apple::ADB { class Mouse: public ReactiveDevice, public Inputs::Mouse { public: @@ -32,7 +31,6 @@ class Mouse: public ReactiveDevice, public Inputs::Mouse { uint16_t last_posted_reg0_ = 0; }; -} } #endif /* Mouse_hpp */ diff --git a/Machines/Apple/ADB/ReactiveDevice.hpp b/Machines/Apple/ADB/ReactiveDevice.hpp index 54a3ad53c..215a2123c 100644 --- a/Machines/Apple/ADB/ReactiveDevice.hpp +++ b/Machines/Apple/ADB/ReactiveDevice.hpp @@ -15,8 +15,7 @@ #include #include -namespace Apple { -namespace ADB { +namespace Apple::ADB { class ReactiveDevice: public Bus::Device { protected: @@ -60,7 +59,6 @@ class ReactiveDevice: public Bus::Device { void reset(); }; -} } #endif /* ReactiveDevice_hpp */ diff --git a/Machines/Apple/AppleII/AppleII.hpp b/Machines/Apple/AppleII/AppleII.hpp index 97d348578..2e8733ce4 100644 --- a/Machines/Apple/AppleII/AppleII.hpp +++ b/Machines/Apple/AppleII/AppleII.hpp @@ -16,8 +16,7 @@ #include -namespace Apple { -namespace II { +namespace Apple::II { class Machine { public: @@ -42,7 +41,6 @@ class Machine { }; }; -} } #endif /* AppleII_hpp */ diff --git a/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp b/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp index 389083b95..3c12a5e00 100644 --- a/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp +++ b/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp @@ -11,8 +11,7 @@ #include "MemorySwitches.hpp" -namespace Apple { -namespace II { +namespace Apple::II { /*! Models the auxiliary memory soft switches, added as of the Apple IIe, which allow access to the auxiliary 64kb of RAM and to @@ -271,7 +270,6 @@ template class AuxiliaryMemorySwitches { } }; -} } #endif /* AuxiliaryMemorySwitches_h */ diff --git a/Machines/Apple/AppleII/Card.hpp b/Machines/Apple/AppleII/Card.hpp index 60c3bd519..64f0e9c78 100644 --- a/Machines/Apple/AppleII/Card.hpp +++ b/Machines/Apple/AppleII/Card.hpp @@ -13,8 +13,7 @@ #include "../../../ClockReceiver/ClockReceiver.hpp" #include "../../../Activity/Observer.hpp" -namespace Apple { -namespace II { +namespace Apple::II { /*! This provides a small subset of the interface offered to cards installed in @@ -112,7 +111,6 @@ class Card { } }; -} } #endif /* Card_h */ diff --git a/Machines/Apple/AppleII/DiskIICard.hpp b/Machines/Apple/AppleII/DiskIICard.hpp index 979d31b07..0d3803ba5 100644 --- a/Machines/Apple/AppleII/DiskIICard.hpp +++ b/Machines/Apple/AppleII/DiskIICard.hpp @@ -20,8 +20,7 @@ #include #include -namespace Apple { -namespace II { +namespace Apple::II { class DiskIICard: public Card, public ClockingHint::Observer { public: @@ -43,7 +42,6 @@ class DiskIICard: public Card, public ClockingHint::Observer { ClockingHint::Preference diskii_clocking_preference_ = ClockingHint::Preference::RealTime; }; -} } #endif /* DiskIICard_hpp */ diff --git a/Machines/Apple/AppleII/Joystick.hpp b/Machines/Apple/AppleII/Joystick.hpp index 33f943c54..d76e02f99 100644 --- a/Machines/Apple/AppleII/Joystick.hpp +++ b/Machines/Apple/AppleII/Joystick.hpp @@ -14,8 +14,7 @@ #include #include -namespace Apple { -namespace II { +namespace Apple::II { class JoystickPair { public: @@ -106,7 +105,6 @@ class JoystickPair { } }; -} } #endif /* AppleII_Joystick_hpp */ diff --git a/Machines/Apple/AppleII/LanguageCardSwitches.hpp b/Machines/Apple/AppleII/LanguageCardSwitches.hpp index 873260a36..5efddf526 100644 --- a/Machines/Apple/AppleII/LanguageCardSwitches.hpp +++ b/Machines/Apple/AppleII/LanguageCardSwitches.hpp @@ -11,8 +11,7 @@ #include "MemorySwitches.hpp" -namespace Apple { -namespace II { +namespace Apple::II { /*! Models the language card soft switches, present on any Apple II with a language card and provided built-in from the IIe onwards. @@ -112,7 +111,6 @@ template class LanguageCardSwitches { bool pre_write_ = false; }; -} } #endif /* LanguageCard_h */ diff --git a/Machines/Apple/AppleII/MemorySwitches.hpp b/Machines/Apple/AppleII/MemorySwitches.hpp index c71bd4c1e..5be77517a 100644 --- a/Machines/Apple/AppleII/MemorySwitches.hpp +++ b/Machines/Apple/AppleII/MemorySwitches.hpp @@ -9,8 +9,7 @@ #ifndef MemorySwitches_h #define MemorySwitches_h -namespace Apple { -namespace II { +namespace Apple::II { enum PagingType: int { Main = 1 << 0, @@ -19,7 +18,6 @@ enum PagingType: int { LanguageCard = 1 << 3, }; -} } #endif /* MemorySwitches_h */ diff --git a/Machines/Apple/AppleII/SCSICard.hpp b/Machines/Apple/AppleII/SCSICard.hpp index 0859730b1..d12d12918 100644 --- a/Machines/Apple/AppleII/SCSICard.hpp +++ b/Machines/Apple/AppleII/SCSICard.hpp @@ -21,8 +21,7 @@ #include #include -namespace Apple { -namespace II { +namespace Apple::II { class SCSICard: public Card { public: @@ -51,7 +50,6 @@ class SCSICard: public Card { SCSI::Target::Target storage_; }; -} } #endif /* SCSICard_hpp */ diff --git a/Machines/Apple/AppleII/Video.hpp b/Machines/Apple/AppleII/Video.hpp index 1e66d1cc2..1e84d2c04 100644 --- a/Machines/Apple/AppleII/Video.hpp +++ b/Machines/Apple/AppleII/Video.hpp @@ -18,9 +18,7 @@ #include #include -namespace Apple { -namespace II { -namespace Video { +namespace Apple::II::Video { class BusHandler { public: @@ -439,8 +437,6 @@ template class Video: public VideoBase { BusHandler &bus_handler_; }; -} -} } #endif /* Apple_II_Video_hpp */ diff --git a/Machines/Apple/AppleII/VideoSwitches.hpp b/Machines/Apple/AppleII/VideoSwitches.hpp index 7852516f4..dd4845e2e 100644 --- a/Machines/Apple/AppleII/VideoSwitches.hpp +++ b/Machines/Apple/AppleII/VideoSwitches.hpp @@ -13,8 +13,7 @@ #include "../../../ClockReceiver/DeferredQueue.hpp" #include "../../ROMMachine.hpp" -namespace Apple { -namespace II { +namespace Apple::II { // Enumerates all Apple II and IIe display modes. enum class GraphicsMode { @@ -341,7 +340,6 @@ template class VideoSwitches { std::vector character_rom_; }; -} } #endif /* VideoSwitches_h */ diff --git a/Machines/Apple/AppleIIgs/ADB.hpp b/Machines/Apple/AppleIIgs/ADB.hpp index a57594335..fb055da26 100644 --- a/Machines/Apple/AppleIIgs/ADB.hpp +++ b/Machines/Apple/AppleIIgs/ADB.hpp @@ -17,9 +17,7 @@ #include "../ADB/Mouse.hpp" #include "../ADB/Keyboard.hpp" -namespace Apple { -namespace IIgs { -namespace ADB { +namespace Apple::IIgs::ADB { class GLU: public InstructionSet::M50740::PortHandler { public: @@ -85,8 +83,6 @@ class GLU: public InstructionSet::M50740::PortHandler { Apple::ADB::Keyboard keyboard_; }; -} -} } #endif /* Apple_IIgs_ADB_hpp */ diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.hpp b/Machines/Apple/AppleIIgs/AppleIIgs.hpp index f92bfd11c..1cd1a862a 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.hpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.hpp @@ -16,8 +16,7 @@ #include -namespace Apple { -namespace IIgs { +namespace Apple::IIgs { class Machine { public: @@ -27,7 +26,6 @@ class Machine { static Machine *AppleIIgs(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); }; -} } #endif /* Machines_Apple_AppleIIgs_hpp */ diff --git a/Machines/Apple/AppleIIgs/MemoryMap.hpp b/Machines/Apple/AppleIIgs/MemoryMap.hpp index f52b98dad..ff9ce110c 100644 --- a/Machines/Apple/AppleIIgs/MemoryMap.hpp +++ b/Machines/Apple/AppleIIgs/MemoryMap.hpp @@ -16,8 +16,7 @@ #include "../AppleII/LanguageCardSwitches.hpp" #include "../AppleII/AuxiliaryMemorySwitches.hpp" -namespace Apple { -namespace IIgs { +namespace Apple::IIgs { class MemoryMap { private: @@ -687,7 +686,6 @@ class MemoryMap { // // With a further twist: the modulo and pointer are indexed on ::IsShadowed to eliminate a branch even on that. -} } #endif /* MemoryMap_h */ diff --git a/Machines/Apple/AppleIIgs/Sound.hpp b/Machines/Apple/AppleIIgs/Sound.hpp index 942a94b7d..c9cba701e 100644 --- a/Machines/Apple/AppleIIgs/Sound.hpp +++ b/Machines/Apple/AppleIIgs/Sound.hpp @@ -15,9 +15,7 @@ #include "../../../Concurrency/AsyncTaskQueue.hpp" #include "../../../Outputs/Speaker/Implementation/SampleSource.hpp" -namespace Apple { -namespace IIgs { -namespace Sound { +namespace Apple::IIgs::Sound { class GLU: public Outputs::Speaker::SampleSource { public: @@ -104,8 +102,6 @@ class GLU: public Outputs::Speaker::SampleSource { int16_t output_range_ = 0; }; -} -} } #endif /* SoundGLU_hpp */ diff --git a/Machines/Apple/AppleIIgs/Video.hpp b/Machines/Apple/AppleIIgs/Video.hpp index d02e21d63..6d7ba977c 100644 --- a/Machines/Apple/AppleIIgs/Video.hpp +++ b/Machines/Apple/AppleIIgs/Video.hpp @@ -13,9 +13,7 @@ #include "../../../Outputs/CRT/CRT.hpp" #include "../../../ClockReceiver/ClockReceiver.hpp" -namespace Apple { -namespace IIgs { -namespace Video { +namespace Apple::IIgs::Video { /*! Provides IIgs video output; assumed clocking here is seven times the usual Apple II clock. @@ -205,8 +203,6 @@ class Video: public Apple::II::VideoSwitches { int megaii_frame_counter_ = 0; // To count up to quarter-second interrupts. }; -} -} } #endif /* Video_hpp */ diff --git a/Machines/Apple/Macintosh/Audio.hpp b/Machines/Apple/Macintosh/Audio.hpp index bdf0ebd40..457bec6b0 100644 --- a/Machines/Apple/Macintosh/Audio.hpp +++ b/Machines/Apple/Macintosh/Audio.hpp @@ -16,8 +16,7 @@ #include #include -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { /*! Implements the Macintosh's audio output hardware. @@ -83,7 +82,6 @@ class Audio: public ::Outputs::Speaker::SampleSource { void set_volume_multiplier(); }; -} } #endif /* Audio_hpp */ diff --git a/Machines/Apple/Macintosh/DeferredAudio.hpp b/Machines/Apple/Macintosh/DeferredAudio.hpp index 9277e1569..395632f14 100644 --- a/Machines/Apple/Macintosh/DeferredAudio.hpp +++ b/Machines/Apple/Macintosh/DeferredAudio.hpp @@ -12,8 +12,7 @@ #include "Audio.hpp" #include "../../../Outputs/Speaker/Implementation/LowpassSpeaker.hpp" -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { struct DeferredAudio { Concurrency::AsyncTaskQueue queue; @@ -28,7 +27,6 @@ struct DeferredAudio { } }; -} } #endif /* DeferredAudio_h */ diff --git a/Machines/Apple/Macintosh/DriveSpeedAccumulator.hpp b/Machines/Apple/Macintosh/DriveSpeedAccumulator.hpp index 45568e006..815e354f5 100644 --- a/Machines/Apple/Macintosh/DriveSpeedAccumulator.hpp +++ b/Machines/Apple/Macintosh/DriveSpeedAccumulator.hpp @@ -13,8 +13,7 @@ #include #include -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { class DriveSpeedAccumulator { public: @@ -40,7 +39,6 @@ class DriveSpeedAccumulator { Delegate *delegate_ = nullptr; }; -} } #endif /* DriveSpeedAccumulator_hpp */ diff --git a/Machines/Apple/Macintosh/Keyboard.hpp b/Machines/Apple/Macintosh/Keyboard.hpp index d69af1f56..9f77eb348 100644 --- a/Machines/Apple/Macintosh/Keyboard.hpp +++ b/Machines/Apple/Macintosh/Keyboard.hpp @@ -15,8 +15,7 @@ #include #include -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { constexpr uint16_t KeypadMask = 0x100; @@ -294,7 +293,6 @@ class KeyboardMapper: public MachineTypes::MappedKeyboardMachine::KeyboardMapper uint16_t mapped_key_for_key(Inputs::Keyboard::Key key) const final; }; -} } #endif /* Apple_Macintosh_Keyboard_hpp */ diff --git a/Machines/Apple/Macintosh/Macintosh.hpp b/Machines/Apple/Macintosh/Macintosh.hpp index 5c42b555f..167106ff7 100644 --- a/Machines/Apple/Macintosh/Macintosh.hpp +++ b/Machines/Apple/Macintosh/Macintosh.hpp @@ -14,8 +14,7 @@ #include "../../../Analyser/Static/StaticAnalyser.hpp" #include "../../ROMMachine.hpp" -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { class Machine { public: @@ -36,8 +35,6 @@ class Machine { }; }; - -} } #endif /* Macintosh_hpp */ diff --git a/Machines/Apple/Macintosh/Video.hpp b/Machines/Apple/Macintosh/Video.hpp index 4ade61a19..87aa4b61d 100644 --- a/Machines/Apple/Macintosh/Video.hpp +++ b/Machines/Apple/Macintosh/Video.hpp @@ -14,8 +14,7 @@ #include "DeferredAudio.hpp" #include "DriveSpeedAccumulator.hpp" -namespace Apple { -namespace Macintosh { +namespace Apple::Macintosh { constexpr HalfCycles line_length(704); constexpr int number_of_lines = 370; @@ -102,7 +101,6 @@ class Video { bool use_alternate_audio_buffer_ = false; }; -} } #endif /* Video_hpp */ diff --git a/Machines/Atari/2600/Cartridges/ActivisionStack.hpp b/Machines/Atari/2600/Cartridges/ActivisionStack.hpp index 025a874b4..6fcc46712 100644 --- a/Machines/Atari/2600/Cartridges/ActivisionStack.hpp +++ b/Machines/Atari/2600/Cartridges/ActivisionStack.hpp @@ -9,8 +9,7 @@ #ifndef Atari2600_ActivisionStack_hpp #define Atari2600_ActivisionStack_hpp -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class ActivisionStack: public BusExtender { public: @@ -45,7 +44,6 @@ class ActivisionStack: public BusExtender { uint8_t last_opcode_; }; -} } #endif /* Atari2600_CartridgeActivisionStack_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Atari16k.hpp b/Machines/Atari/2600/Cartridges/Atari16k.hpp index a98ff72fd..b99381305 100644 --- a/Machines/Atari/2600/Cartridges/Atari16k.hpp +++ b/Machines/Atari/2600/Cartridges/Atari16k.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Atari16k: public BusExtender { public: @@ -60,7 +59,6 @@ class Atari16kSuperChip: public BusExtender { uint8_t ram_[128]; }; -} } #endif /* Atari2600_CartridgeAtari16k_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Atari32k.hpp b/Machines/Atari/2600/Cartridges/Atari32k.hpp index eff10e86d..dba8c9a7b 100644 --- a/Machines/Atari/2600/Cartridges/Atari32k.hpp +++ b/Machines/Atari/2600/Cartridges/Atari32k.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Atari32k: public BusExtender { public: @@ -56,7 +55,6 @@ class Atari32kSuperChip: public BusExtender { uint8_t ram_[128]; }; -} } #endif /* Atari2600_CartridgeAtari32k_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Atari8k.hpp b/Machines/Atari/2600/Cartridges/Atari8k.hpp index 9f57527f8..5fe346734 100644 --- a/Machines/Atari/2600/Cartridges/Atari8k.hpp +++ b/Machines/Atari/2600/Cartridges/Atari8k.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Atari8k: public BusExtender { public: @@ -58,7 +57,6 @@ class Atari8kSuperChip: public BusExtender { uint8_t ram_[128]; }; -} } #endif /* Atari2600_CartridgeAtari8k_hpp */ diff --git a/Machines/Atari/2600/Cartridges/CBSRAMPlus.hpp b/Machines/Atari/2600/Cartridges/CBSRAMPlus.hpp index e10a5f287..4c064f3ef 100644 --- a/Machines/Atari/2600/Cartridges/CBSRAMPlus.hpp +++ b/Machines/Atari/2600/Cartridges/CBSRAMPlus.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class CBSRAMPlus: public BusExtender { public: @@ -37,7 +36,6 @@ class CBSRAMPlus: public BusExtender { uint8_t ram_[256]; }; -} } #endif /* Atari2600_CartridgeCBSRAMPlus_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Cartridge.hpp b/Machines/Atari/2600/Cartridges/Cartridge.hpp index 90706fb04..a2c6538da 100644 --- a/Machines/Atari/2600/Cartridges/Cartridge.hpp +++ b/Machines/Atari/2600/Cartridges/Cartridge.hpp @@ -12,8 +12,7 @@ #include "../../../../Processors/6502/6502.hpp" #include "../Bus.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class BusExtender: public CPU::MOS6502::BusHandler { public: @@ -214,7 +213,6 @@ template class Cartridge: }; -} } #endif /* Atari2600_Cartridge_hpp */ diff --git a/Machines/Atari/2600/Cartridges/CommaVid.hpp b/Machines/Atari/2600/Cartridges/CommaVid.hpp index 251abb139..d6c576387 100644 --- a/Machines/Atari/2600/Cartridges/CommaVid.hpp +++ b/Machines/Atari/2600/Cartridges/CommaVid.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class CommaVid: public BusExtender { public: @@ -39,7 +38,6 @@ class CommaVid: public BusExtender { uint8_t ram_[1024]; }; -} } #endif /* Atari2600_CartridgeCommaVid_hpp */ diff --git a/Machines/Atari/2600/Cartridges/MNetwork.hpp b/Machines/Atari/2600/Cartridges/MNetwork.hpp index 9ad5a0faa..c85b854a3 100644 --- a/Machines/Atari/2600/Cartridges/MNetwork.hpp +++ b/Machines/Atari/2600/Cartridges/MNetwork.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class MNetwork: public BusExtender { public: @@ -63,7 +62,6 @@ class MNetwork: public BusExtender { uint8_t low_ram_[1024], high_ram_[1024]; }; -} } #endif /* Atari2600_CartridgeMNetwork_hpp */ diff --git a/Machines/Atari/2600/Cartridges/MegaBoy.hpp b/Machines/Atari/2600/Cartridges/MegaBoy.hpp index a4cc2b91f..b00ab909d 100644 --- a/Machines/Atari/2600/Cartridges/MegaBoy.hpp +++ b/Machines/Atari/2600/Cartridges/MegaBoy.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class MegaBoy: public BusExtender { public: @@ -41,7 +40,6 @@ class MegaBoy: public BusExtender { uint8_t current_page_; }; -} } #endif /* CartridgeMegaBoy_h */ diff --git a/Machines/Atari/2600/Cartridges/ParkerBros.hpp b/Machines/Atari/2600/Cartridges/ParkerBros.hpp index 559491bad..9e3c9ee5d 100644 --- a/Machines/Atari/2600/Cartridges/ParkerBros.hpp +++ b/Machines/Atari/2600/Cartridges/ParkerBros.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class ParkerBros: public BusExtender { public: @@ -42,7 +41,6 @@ class ParkerBros: public BusExtender { uint8_t *rom_ptr_[4]; }; -} } #endif /* Atari2600_CartridgeParkerBros_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Pitfall2.hpp b/Machines/Atari/2600/Cartridges/Pitfall2.hpp index 3cd2dd557..35e7236bf 100644 --- a/Machines/Atari/2600/Cartridges/Pitfall2.hpp +++ b/Machines/Atari/2600/Cartridges/Pitfall2.hpp @@ -9,8 +9,7 @@ #ifndef Atari2600_CartridgePitfall2_hpp #define Atari2600_CartridgePitfall2_hpp -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Pitfall2: public BusExtender { public: @@ -123,7 +122,6 @@ class Pitfall2: public BusExtender { Cycles cycles_since_audio_update_ = 0; }; -} } #endif /* Atari2600_CartridgePitfall2_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Tigervision.hpp b/Machines/Atari/2600/Cartridges/Tigervision.hpp index fa2f46a51..c9fa9856e 100644 --- a/Machines/Atari/2600/Cartridges/Tigervision.hpp +++ b/Machines/Atari/2600/Cartridges/Tigervision.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Tigervision: public BusExtender { public: @@ -36,7 +35,6 @@ class Tigervision: public BusExtender { uint8_t *rom_ptr_[2]; }; -} } #endif /* Atari2600_CartridgeTigervision_hpp */ diff --git a/Machines/Atari/2600/Cartridges/Unpaged.hpp b/Machines/Atari/2600/Cartridges/Unpaged.hpp index 703e127c3..fbf192f78 100644 --- a/Machines/Atari/2600/Cartridges/Unpaged.hpp +++ b/Machines/Atari/2600/Cartridges/Unpaged.hpp @@ -11,8 +11,7 @@ #include "Cartridge.hpp" -namespace Atari2600 { -namespace Cartridge { +namespace Atari2600::Cartridge { class Unpaged: public BusExtender { public: @@ -25,7 +24,6 @@ class Unpaged: public BusExtender { } }; -} } #endif /* Atari2600_CartridgeUnpaged_hpp */ diff --git a/Machines/Atari/ST/AtariST.hpp b/Machines/Atari/ST/AtariST.hpp index 8f3274780..3db975087 100644 --- a/Machines/Atari/ST/AtariST.hpp +++ b/Machines/Atari/ST/AtariST.hpp @@ -16,8 +16,7 @@ #include -namespace Atari { -namespace ST { +namespace Atari::ST { class Machine { public: @@ -39,5 +38,5 @@ class Machine { }; } -} + #endif /* AtariST_hpp */ diff --git a/Machines/Atari/ST/DMAController.hpp b/Machines/Atari/ST/DMAController.hpp index 35d3ade03..8eeb5f202 100644 --- a/Machines/Atari/ST/DMAController.hpp +++ b/Machines/Atari/ST/DMAController.hpp @@ -17,8 +17,7 @@ #include "../../../Components/1770/1770.hpp" #include "../../../Activity/Source.hpp" -namespace Atari { -namespace ST { +namespace Atari::ST { class DMAController: public WD::WD1770::Delegate, public ClockingHint::Source, public ClockingHint::Observer { public: @@ -110,7 +109,6 @@ class DMAController: public WD::WD1770::Delegate, public ClockingHint::Source, p int byte_count_ = 0; }; -} } #endif /* DMAController_hpp */ diff --git a/Machines/Atari/ST/IntelligentKeyboard.hpp b/Machines/Atari/ST/IntelligentKeyboard.hpp index e876e0d88..8599ecf19 100644 --- a/Machines/Atari/ST/IntelligentKeyboard.hpp +++ b/Machines/Atari/ST/IntelligentKeyboard.hpp @@ -21,8 +21,7 @@ #include #include -namespace Atari { -namespace ST { +namespace Atari::ST { enum class Key: uint16_t { Escape = 1, @@ -196,7 +195,6 @@ class IntelligentKeyboard: std::vector> joysticks_; }; -} } #endif /* IntelligentKeyboard_hpp */ diff --git a/Machines/Atari/ST/Video.hpp b/Machines/Atari/ST/Video.hpp index a467c33cc..547c02cbe 100644 --- a/Machines/Atari/ST/Video.hpp +++ b/Machines/Atari/ST/Video.hpp @@ -18,8 +18,7 @@ // Testing hook; not for any other user. class VideoTester; -namespace Atari { -namespace ST { +namespace Atari::ST { struct LineLength { int length = 1024; @@ -249,7 +248,6 @@ class Video { friend class ::VideoTester; }; -} } #endif /* Atari_ST_Video_hpp */ diff --git a/Machines/ColecoVision/ColecoVision.hpp b/Machines/ColecoVision/ColecoVision.hpp index 4e5f0ce2c..1438e48bf 100644 --- a/Machines/ColecoVision/ColecoVision.hpp +++ b/Machines/ColecoVision/ColecoVision.hpp @@ -14,8 +14,7 @@ #include "../../Analyser/Static/StaticAnalyser.hpp" #include "../ROMMachine.hpp" -namespace Coleco { -namespace Vision { +namespace Coleco::Vision { class Machine { public: @@ -35,7 +34,6 @@ class Machine { }; }; -} } #endif /* ColecoVision_hpp */ diff --git a/Machines/Commodore/1540/C1540.hpp b/Machines/Commodore/1540/C1540.hpp index b04334423..52602f9da 100644 --- a/Machines/Commodore/1540/C1540.hpp +++ b/Machines/Commodore/1540/C1540.hpp @@ -9,8 +9,7 @@ #ifndef Commodore1540_hpp #define Commodore1540_hpp -namespace Commodore { -namespace C1540 { +namespace Commodore::C1540 { /// Defines the type of drive this 1540 hardware is configured as. enum class Personality { @@ -25,7 +24,6 @@ enum class Personality { to be to create a single file of public interface. */ -} } #include "../SerialBus.hpp" @@ -33,8 +31,7 @@ enum class Personality { #include "../../../Storage/Disk/Disk.hpp" #include "Implementation/C1540Base.hpp" -namespace Commodore { -namespace C1540 { +namespace Commodore::C1540 { /*! Provides an emulation of the C1540. @@ -56,7 +53,6 @@ class Machine final: public MachineBase { void set_disk(std::shared_ptr disk); }; -} } #endif /* Commodore1540_hpp */ diff --git a/Machines/Commodore/1540/Implementation/C1540Base.hpp b/Machines/Commodore/1540/Implementation/C1540Base.hpp index f0f50f8b3..db295f499 100644 --- a/Machines/Commodore/1540/Implementation/C1540Base.hpp +++ b/Machines/Commodore/1540/Implementation/C1540Base.hpp @@ -21,8 +21,7 @@ #include "../C1540.hpp" -namespace Commodore { -namespace C1540 { +namespace Commodore::C1540 { /*! An implementation of the serial-port VIA in a Commodore 1540: the VIA that facilitates all @@ -160,7 +159,6 @@ class MachineBase: virtual void process_index_hole(); }; -} } #endif /* C1540Base_hpp */ diff --git a/Machines/Commodore/SerialBus.hpp b/Machines/Commodore/SerialBus.hpp index 52b6288b7..f62cc0e75 100644 --- a/Machines/Commodore/SerialBus.hpp +++ b/Machines/Commodore/SerialBus.hpp @@ -13,8 +13,7 @@ #include #include -namespace Commodore { -namespace Serial { +namespace Commodore::Serial { enum Line { ServiceRequest = 0, @@ -128,6 +127,5 @@ namespace Serial { }; } -} #endif /* SerialPort_hpp */ diff --git a/Machines/Commodore/Vic-20/Keyboard.hpp b/Machines/Commodore/Vic-20/Keyboard.hpp index cfe7f8a8b..77145d8f7 100644 --- a/Machines/Commodore/Vic-20/Keyboard.hpp +++ b/Machines/Commodore/Vic-20/Keyboard.hpp @@ -12,8 +12,7 @@ #include "../../KeyboardMachine.hpp" #include "../../Utility/Typer.hpp" -namespace Commodore { -namespace Vic20 { +namespace Commodore::Vic20 { enum Key: uint16_t { #define key(line, mask) (((mask) << 3) | (line)) @@ -55,7 +54,6 @@ struct CharacterMapper: public ::Utility::CharacterMapper { const uint16_t *sequence_for_character(char character) const final; }; -} } #endif /* Keyboard_hpp */ diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index 03d8292e4..02d7b2d10 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -36,8 +36,7 @@ #include #include -namespace Commodore { -namespace Vic20 { +namespace Commodore::Vic20 { enum ROMSlot { Kernel = 0, @@ -755,7 +754,6 @@ class ConcreteMachine: std::shared_ptr<::Commodore::C1540::Machine> c1540_; }; -} } using namespace Commodore::Vic20; diff --git a/Machines/Commodore/Vic-20/Vic20.hpp b/Machines/Commodore/Vic-20/Vic20.hpp index c9583bfa4..51a8db20d 100644 --- a/Machines/Commodore/Vic-20/Vic20.hpp +++ b/Machines/Commodore/Vic-20/Vic20.hpp @@ -16,8 +16,7 @@ #include -namespace Commodore { -namespace Vic20 { +namespace Commodore::Vic20 { /// @returns The options available for a Vic-20. std::unique_ptr get_options(); @@ -45,7 +44,6 @@ class Machine { }; }; -} } #endif /* Vic20_hpp */ diff --git a/Machines/Enterprise/Dave.hpp b/Machines/Enterprise/Dave.hpp index efaa92d2b..88e282a2d 100644 --- a/Machines/Enterprise/Dave.hpp +++ b/Machines/Enterprise/Dave.hpp @@ -16,8 +16,7 @@ #include "../../Numeric/LFSR.hpp" #include "../../Outputs/Speaker/Implementation/SampleSource.hpp" -namespace Enterprise { -namespace Dave { +namespace Enterprise::Dave { enum class Interrupt: uint8_t { VariableFrequency = 0x02, @@ -182,7 +181,6 @@ class TimedInterruptSource { void update_channel(int c, bool is_linked, int decrement); }; -} } #endif /* Dave_hpp */ diff --git a/Machines/MasterSystem/MasterSystem.hpp b/Machines/MasterSystem/MasterSystem.hpp index 348842be9..c3b0fca6b 100644 --- a/Machines/MasterSystem/MasterSystem.hpp +++ b/Machines/MasterSystem/MasterSystem.hpp @@ -16,8 +16,7 @@ #include -namespace Sega { -namespace MasterSystem { +namespace Sega::MasterSystem { class Machine { public: @@ -36,7 +35,6 @@ class Machine { }; }; -} } #endif /* MasterSystem_hpp */ diff --git a/Machines/Sinclair/Keyboard/Keyboard.hpp b/Machines/Sinclair/Keyboard/Keyboard.hpp index 25fac9699..9ba4cfda4 100644 --- a/Machines/Sinclair/Keyboard/Keyboard.hpp +++ b/Machines/Sinclair/Keyboard/Keyboard.hpp @@ -12,9 +12,7 @@ #include "../../KeyboardMachine.hpp" #include "../../Utility/Typer.hpp" -namespace Sinclair { -namespace ZX { -namespace Keyboard { +namespace Sinclair::ZX::Keyboard { enum class Machine { ZX80, ZX81, ZXSpectrum @@ -74,8 +72,6 @@ class CharacterMapper: public ::Utility::CharacterMapper { const Machine machine_; }; -} -} } #endif /* KeyboardMapper_hpp */ diff --git a/Machines/Sinclair/ZX8081/Video.hpp b/Machines/Sinclair/ZX8081/Video.hpp index 555c75603..1b867d06b 100644 --- a/Machines/Sinclair/ZX8081/Video.hpp +++ b/Machines/Sinclair/ZX8081/Video.hpp @@ -12,8 +12,7 @@ #include "../../../Outputs/CRT/CRT.hpp" #include "../../../ClockReceiver/ClockReceiver.hpp" -namespace Sinclair { -namespace ZX8081 { +namespace Sinclair::ZX8081 { /*! Packages a ZX80/81-style video feed into a CRT-compatible waveform. @@ -58,7 +57,6 @@ class Video { void flush(bool next_sync); }; -} } #endif /* Video_hpp */ diff --git a/Machines/Sinclair/ZX8081/ZX8081.hpp b/Machines/Sinclair/ZX8081/ZX8081.hpp index d7ca68734..c755f8c94 100644 --- a/Machines/Sinclair/ZX8081/ZX8081.hpp +++ b/Machines/Sinclair/ZX8081/ZX8081.hpp @@ -16,8 +16,7 @@ #include -namespace Sinclair { -namespace ZX8081 { +namespace Sinclair::ZX8081 { /// The ZX80/81 machine. class Machine { @@ -47,7 +46,6 @@ class Machine { }; }; -} } #endif /* ZX8081_hpp */ diff --git a/Machines/Sinclair/ZXSpectrum/State.hpp b/Machines/Sinclair/ZXSpectrum/State.hpp index 3d3613c19..a65077f9a 100644 --- a/Machines/Sinclair/ZXSpectrum/State.hpp +++ b/Machines/Sinclair/ZXSpectrum/State.hpp @@ -15,9 +15,7 @@ #include "Video.hpp" #include "../../../Components/AY38910/AY38910.hpp" -namespace Sinclair { -namespace ZXSpectrum { - +namespace Sinclair::ZXSpectrum { struct State: public Reflection::StructImpl { CPU::Z80::State z80; @@ -47,7 +45,6 @@ struct State: public Reflection::StructImpl { } }; -} } #endif /* State_h */ diff --git a/Machines/Sinclair/ZXSpectrum/Video.hpp b/Machines/Sinclair/ZXSpectrum/Video.hpp index 805b4c2d3..fb6008297 100644 --- a/Machines/Sinclair/ZXSpectrum/Video.hpp +++ b/Machines/Sinclair/ZXSpectrum/Video.hpp @@ -16,9 +16,7 @@ #include -namespace Sinclair { -namespace ZXSpectrum { -namespace Video { +namespace Sinclair::ZXSpectrum::Video { enum class Timing { FortyEightK, @@ -492,8 +490,6 @@ struct State: public Reflection::StructImpl { } }; -} -} } #endif /* Video_hpp */ diff --git a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.hpp b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.hpp index 7190c46ef..383252c90 100644 --- a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.hpp +++ b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.hpp @@ -16,8 +16,7 @@ #include -namespace Sinclair { -namespace ZXSpectrum { +namespace Sinclair::ZXSpectrum { class Machine { public: @@ -47,8 +46,6 @@ class Machine { }; }; - -} } #endif /* ZXSpectrum_hpp */ diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index 480346c72..95559cccf 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -2372,16 +2372,16 @@ 4B0ACC0E23775819008902D0 /* 2600 */ = { isa = PBXGroup; children = ( - 4B0ACC0F23775819008902D0 /* Cartridges */, + 4B0ACC2223775819008902D0 /* Atari2600.cpp */, 4B0ACC1D23775819008902D0 /* TIA.cpp */, - 4B0ACC1E23775819008902D0 /* TIASound.hpp */, + 4B0ACC2123775819008902D0 /* TIASound.cpp */, 4B0ACC1F23775819008902D0 /* Atari2600Inputs.h */, 4B0ACC2023775819008902D0 /* Atari2600.hpp */, - 4B0ACC2123775819008902D0 /* TIASound.cpp */, - 4B0ACC2223775819008902D0 /* Atari2600.cpp */, 4B0ACC2323775819008902D0 /* Bus.hpp */, 4B0ACC2423775819008902D0 /* PIA.hpp */, 4B0ACC2523775819008902D0 /* TIA.hpp */, + 4B0ACC1E23775819008902D0 /* TIASound.hpp */, + 4B0ACC0F23775819008902D0 /* Cartridges */, ); path = 2600; sourceTree = ""; @@ -2702,13 +2702,13 @@ 4B302181208A550100773308 /* DiskII */ = { isa = PBXGroup; children = ( - 4B80CD6D2568A82600176FCC /* DiskIIDrive.cpp */, - 4B80CD6E2568A82900176FCC /* DiskIIDrive.hpp */, - 4B302182208A550100773308 /* DiskII.hpp */, 4B302183208A550100773308 /* DiskII.cpp */, + 4B80CD6D2568A82600176FCC /* DiskIIDrive.cpp */, 4BEE1498227FC0EA00133682 /* IWM.cpp */, - 4BEE1499227FC0EA00133682 /* IWM.hpp */, 4BCD634722D6756400F567F1 /* MacintoshDoubleDensityDrive.cpp */, + 4B302182208A550100773308 /* DiskII.hpp */, + 4B80CD6E2568A82900176FCC /* DiskIIDrive.hpp */, + 4BEE1499227FC0EA00133682 /* IWM.hpp */, 4BCD634822D6756400F567F1 /* MacintoshDoubleDensityDrive.hpp */, ); path = DiskII; @@ -3558,11 +3558,11 @@ 4B8DD3832634D37E00B3C866 /* State */ = { isa = PBXGroup; children = ( - 4B2B946326377C0200E7097C /* SZX.cpp */, - 4B2B946426377C0200E7097C /* SZX.hpp */, 4B8DD3842634D37E00B3C866 /* SNA.cpp */, - 4B8DD3852634D37E00B3C866 /* SNA.hpp */, + 4B2B946326377C0200E7097C /* SZX.cpp */, 4B8DD39526360DDF00B3C866 /* Z80.cpp */, + 4B8DD3852634D37E00B3C866 /* SNA.hpp */, + 4B2B946426377C0200E7097C /* SZX.hpp */, 4B8DD39626360DDF00B3C866 /* Z80.hpp */, ); path = State; @@ -4543,9 +4543,9 @@ 4BC23A212467600E001A6030 /* OPx */ = { isa = PBXGroup; children = ( + 4BC23A2B2467600E001A6030 /* OPLL.cpp */, 4BC23A222467600E001A6030 /* OPLL.hpp */, 4BC23A232467600E001A6030 /* Implementation */, - 4BC23A2B2467600E001A6030 /* OPLL.cpp */, ); path = OPx; sourceTree = ""; @@ -4553,13 +4553,13 @@ 4BC23A232467600E001A6030 /* Implementation */ = { isa = PBXGroup; children = ( - 4BC23A242467600E001A6030 /* PhaseGenerator.hpp */, + 4BC23A2A2467600E001A6030 /* EnvelopeGenerator.hpp */, 4BC23A252467600E001A6030 /* KeyLevelScaler.hpp */, 4BC23A262467600E001A6030 /* LowFrequencyOscillator.hpp */, - 4BC23A272467600E001A6030 /* WaveformGenerator.hpp */, - 4BC23A282467600E001A6030 /* Tables.hpp */, 4BC23A292467600E001A6030 /* OPLBase.hpp */, - 4BC23A2A2467600E001A6030 /* EnvelopeGenerator.hpp */, + 4BC23A242467600E001A6030 /* PhaseGenerator.hpp */, + 4BC23A282467600E001A6030 /* Tables.hpp */, + 4BC23A272467600E001A6030 /* WaveformGenerator.hpp */, ); path = Implementation; sourceTree = ""; diff --git a/Outputs/CRT/CRT.hpp b/Outputs/CRT/CRT.hpp index 9749d5011..87abbda7f 100644 --- a/Outputs/CRT/CRT.hpp +++ b/Outputs/CRT/CRT.hpp @@ -17,8 +17,7 @@ #include "../ScanTarget.hpp" #include "Internals/Flywheel.hpp" -namespace Outputs { -namespace CRT { +namespace Outputs::CRT { class CRT; @@ -354,7 +353,6 @@ template class CRTFrequencyMismatchWarner: public Outputs::C size_t frame_record_pointer_ = 0; }; -} } #endif /* CRT_cpp */ diff --git a/Outputs/CRT/Internals/Flywheel.hpp b/Outputs/CRT/Internals/Flywheel.hpp index d4dc5655d..04f0c8e49 100644 --- a/Outputs/CRT/Internals/Flywheel.hpp +++ b/Outputs/CRT/Internals/Flywheel.hpp @@ -13,8 +13,7 @@ #include #include -namespace Outputs { -namespace CRT { +namespace Outputs::CRT { /*! Provides timing for a two-phase signal consisting of a retrace phase followed by a scan phase, @@ -259,7 +258,6 @@ struct Flywheel { */ }; -} } #endif /* Flywheel_hpp */ diff --git a/Outputs/DisplayMetrics.hpp b/Outputs/DisplayMetrics.hpp index 1983bdac1..792cbec68 100644 --- a/Outputs/DisplayMetrics.hpp +++ b/Outputs/DisplayMetrics.hpp @@ -15,8 +15,7 @@ #include #include -namespace Outputs { -namespace Display { +namespace Outputs::Display { /*! A class to derive various metrics about the input to a ScanTarget, @@ -56,7 +55,6 @@ class Metrics { std::atomic frames_missed_ = 0; }; -} } #endif /* DisplayMetrics_hpp */ diff --git a/Outputs/OpenGL/Primitives/Rectangle.hpp b/Outputs/OpenGL/Primitives/Rectangle.hpp index 0b15187b4..6e02b60db 100644 --- a/Outputs/OpenGL/Primitives/Rectangle.hpp +++ b/Outputs/OpenGL/Primitives/Rectangle.hpp @@ -13,9 +13,7 @@ #include "Shader.hpp" #include -namespace Outputs { -namespace Display { -namespace OpenGL { +namespace Outputs::Display::OpenGL { /*! Provides a wrapper for drawing a solid, single-colour rectangle. @@ -38,8 +36,6 @@ class Rectangle { GLint colour_uniform_; }; -} -} } #endif /* Rectangle_hpp */ diff --git a/Outputs/OpenGL/Primitives/Shader.hpp b/Outputs/OpenGL/Primitives/Shader.hpp index 221aedc5f..d41f70eb2 100644 --- a/Outputs/OpenGL/Primitives/Shader.hpp +++ b/Outputs/OpenGL/Primitives/Shader.hpp @@ -16,9 +16,7 @@ #include #include -namespace Outputs { -namespace Display { -namespace OpenGL { +namespace Outputs::Display::OpenGL { /*! A @c Shader compiles and holds a shader object, based on a single @@ -130,8 +128,6 @@ protected: void enqueue_function(std::function function); }; -} -} } #endif /* Shader_hpp */ diff --git a/Outputs/OpenGL/Primitives/TextureTarget.hpp b/Outputs/OpenGL/Primitives/TextureTarget.hpp index 39e4174bc..3a1e203b4 100644 --- a/Outputs/OpenGL/Primitives/TextureTarget.hpp +++ b/Outputs/OpenGL/Primitives/TextureTarget.hpp @@ -13,9 +13,7 @@ #include "Shader.hpp" #include -namespace Outputs { -namespace Display { -namespace OpenGL { +namespace Outputs::Display::OpenGL { /*! A @c TextureTarget is a framebuffer that can be bound as a texture. So this class @@ -88,8 +86,6 @@ class TextureTarget { mutable GLint threshold_uniform_; }; -} -} } #endif /* TextureTarget_hpp */ diff --git a/Outputs/OpenGL/ScanTarget.hpp b/Outputs/OpenGL/ScanTarget.hpp index fb7a75db5..2feac17a6 100644 --- a/Outputs/OpenGL/ScanTarget.hpp +++ b/Outputs/OpenGL/ScanTarget.hpp @@ -28,9 +28,7 @@ #include #include -namespace Outputs { -namespace Display { -namespace OpenGL { +namespace Outputs::Display::OpenGL { /*! @@ -156,8 +154,6 @@ class ScanTarget: public Outputs::Display::BufferingScanTarget { // TODO: use pr std::array line_metadata_buffer_; }; -} -} } #endif /* ScanTarget_hpp */ diff --git a/Outputs/OpenGL/Screenshot.hpp b/Outputs/OpenGL/Screenshot.hpp index 88468d392..7b70189ac 100644 --- a/Outputs/OpenGL/Screenshot.hpp +++ b/Outputs/OpenGL/Screenshot.hpp @@ -11,9 +11,7 @@ #include "OpenGL.hpp" -namespace Outputs { -namespace Display { -namespace OpenGL { +namespace Outputs::Display::OpenGL { /*! Upon construction, Screenshot will capture the centre portion of the currently-bound framebuffer, @@ -54,8 +52,6 @@ struct Screenshot { int width, height; }; -} -} } #endif /* Screenshot_h */ diff --git a/Outputs/ScanTarget.hpp b/Outputs/ScanTarget.hpp index 0a32ac346..6b01fe3cc 100644 --- a/Outputs/ScanTarget.hpp +++ b/Outputs/ScanTarget.hpp @@ -14,8 +14,7 @@ #include #include "../ClockReceiver/TimeTypes.hpp" -namespace Outputs { -namespace Display { +namespace Outputs::Display { enum class Type { PAL50, @@ -447,7 +446,6 @@ struct NullScanTarget: public ScanTarget { static NullScanTarget singleton; }; -} } #endif /* Outputs_Display_ScanTarget_h */ diff --git a/Outputs/ScanTargets/BufferingScanTarget.hpp b/Outputs/ScanTargets/BufferingScanTarget.hpp index 83d8a3013..1205aed23 100644 --- a/Outputs/ScanTargets/BufferingScanTarget.hpp +++ b/Outputs/ScanTargets/BufferingScanTarget.hpp @@ -18,8 +18,7 @@ #include #include -namespace Outputs { -namespace Display { +namespace Outputs::Display { /*! Provides basic thread-safe (hopefully) circular queues for any scan target that: @@ -273,8 +272,6 @@ class BufferingScanTarget: public Outputs::Display::ScanTarget { #endif }; - -} } #endif /* BufferingScanTarget_hpp */ diff --git a/Outputs/Speaker/Implementation/CompoundSource.hpp b/Outputs/Speaker/Implementation/CompoundSource.hpp index a236d6aa1..ade6c4e54 100644 --- a/Outputs/Speaker/Implementation/CompoundSource.hpp +++ b/Outputs/Speaker/Implementation/CompoundSource.hpp @@ -15,8 +15,7 @@ #include #include -namespace Outputs { -namespace Speaker { +namespace Outputs::Speaker { /*! A CompoundSource adds together the sound generated by multiple individual SampleSources. @@ -174,7 +173,6 @@ template class CompoundSource: std::atomic average_output_peak_{1.0}; }; -} } #endif /* CompoundSource_h */ diff --git a/Outputs/Speaker/Implementation/LowpassSpeaker.hpp b/Outputs/Speaker/Implementation/LowpassSpeaker.hpp index d94b84d31..2f1961b65 100644 --- a/Outputs/Speaker/Implementation/LowpassSpeaker.hpp +++ b/Outputs/Speaker/Implementation/LowpassSpeaker.hpp @@ -20,8 +20,7 @@ #include #include -namespace Outputs { -namespace Speaker { +namespace Outputs::Speaker { template class LowpassBase: public Speaker { public: @@ -410,7 +409,6 @@ template class PullLowpass: public LowpassBase #include -namespace Outputs { -namespace Speaker { +namespace Outputs::Speaker { /*! A sample source is something that can provide a stream of audio. @@ -71,7 +70,6 @@ class SampleSource { double get_average_output_peak() const { return 1.0; } }; -} } #endif /* SampleSource_hpp */ diff --git a/Outputs/Speaker/Speaker.hpp b/Outputs/Speaker/Speaker.hpp index 511b0e337..075dcd552 100644 --- a/Outputs/Speaker/Speaker.hpp +++ b/Outputs/Speaker/Speaker.hpp @@ -13,8 +13,7 @@ #include #include -namespace Outputs { -namespace Speaker { +namespace Outputs::Speaker { /*! Provides a communication point for sound; machines that have a speaker provide an @@ -145,7 +144,6 @@ class Speaker { std::vector mix_buffer_; }; -} } #endif /* Speaker_hpp */ diff --git a/Processors/6502/6502.hpp b/Processors/6502/6502.hpp index e177c495b..cc0d5b87d 100644 --- a/Processors/6502/6502.hpp +++ b/Processors/6502/6502.hpp @@ -18,8 +18,7 @@ #include "../../Numeric/RegisterSizes.hpp" #include "../../ClockReceiver/ClockReceiver.hpp" -namespace CPU { -namespace MOS6502 { +namespace CPU::MOS6502 { // Adopt a bunch of things from MOS6502Esque. using BusOperation = CPU::MOS6502Esque::BusOperation; @@ -162,7 +161,6 @@ template cl #include "Implementation/6502Implementation.hpp" -} } #endif /* MOS6502_cpp */ diff --git a/Processors/6502/AllRAM/6502AllRAM.hpp b/Processors/6502/AllRAM/6502AllRAM.hpp index 848d4e7de..94d8eda1f 100644 --- a/Processors/6502/AllRAM/6502AllRAM.hpp +++ b/Processors/6502/AllRAM/6502AllRAM.hpp @@ -12,8 +12,7 @@ #include "../../6502Esque/6502Selector.hpp" #include "../../AllRAMProcessor.hpp" -namespace CPU { -namespace MOS6502 { +namespace CPU::MOS6502 { class AllRAMProcessor: public ::CPU::AllRAMProcessor { @@ -35,7 +34,6 @@ class AllRAMProcessor: AllRAMProcessor(size_t memory_size) : ::CPU::AllRAMProcessor(memory_size) {} }; -} } #endif /* MOS6502AllRAM_cpp */ diff --git a/Processors/6502/State/State.hpp b/Processors/6502/State/State.hpp index adde3b761..9d9e7185f 100644 --- a/Processors/6502/State/State.hpp +++ b/Processors/6502/State/State.hpp @@ -13,8 +13,7 @@ #include "../../../Reflection/Struct.hpp" #include "../6502.hpp" -namespace CPU { -namespace MOS6502 { +namespace CPU::MOS6502 { /*! Provides a means for capturing or restoring complete 6502 state. @@ -89,8 +88,6 @@ struct State: public Reflection::StructImpl { void apply(ProcessorBase &target); }; - -} } #endif /* MOS6502_State_hpp */ diff --git a/Processors/6502Esque/6502Esque.hpp b/Processors/6502Esque/6502Esque.hpp index 89227804b..836c9747b 100644 --- a/Processors/6502Esque/6502Esque.hpp +++ b/Processors/6502Esque/6502Esque.hpp @@ -21,8 +21,7 @@ So: this is _very_ provisional stuff. */ -namespace CPU { -namespace MOS6502Esque { +namespace CPU::MOS6502Esque { /* The list of registers that can be accessed via @c set_value_of_register and @c set_value_of_register. @@ -143,7 +142,6 @@ template class BusHandler { } }; -} } #endif /* m6502Esque_h */ diff --git a/Processors/6502Esque/6502Selector.hpp b/Processors/6502Esque/6502Selector.hpp index 6dc1454d1..2b75d33d6 100644 --- a/Processors/6502Esque/6502Selector.hpp +++ b/Processors/6502Esque/6502Selector.hpp @@ -12,8 +12,7 @@ #include "../6502/6502.hpp" #include "../65816/65816.hpp" -namespace CPU { -namespace MOS6502Esque { +namespace CPU::MOS6502Esque { enum class Type { TNES6502, // the NES's 6502, which is like a 6502 but lacks decimal mode (though it retains the decimal flag) @@ -46,7 +45,6 @@ template class Processor class BusHandlerT: public BusHandler {}; template <> class BusHandlerT: public BusHandler {}; -} } #endif /* _502Selector_h */ diff --git a/Processors/6502Esque/Implementation/LazyFlags.hpp b/Processors/6502Esque/Implementation/LazyFlags.hpp index 2169d8c24..0466eb181 100644 --- a/Processors/6502Esque/Implementation/LazyFlags.hpp +++ b/Processors/6502Esque/Implementation/LazyFlags.hpp @@ -11,8 +11,7 @@ #include "../6502Esque.hpp" -namespace CPU { -namespace MOS6502Esque { +namespace CPU::MOS6502Esque { struct LazyFlags { /// Bit 7 is set if the negative flag is set; otherwise it is clear. @@ -76,8 +75,6 @@ struct LazyFlags { } }; - -} } #endif /* LazyFlags_h */ diff --git a/Processors/65816/65816.hpp b/Processors/65816/65816.hpp index d9390113e..20e680943 100644 --- a/Processors/65816/65816.hpp +++ b/Processors/65816/65816.hpp @@ -19,8 +19,7 @@ #include "../6502Esque/6502Esque.hpp" #include "../6502Esque/Implementation/LazyFlags.hpp" -namespace CPU { -namespace WDC65816 { +namespace CPU::WDC65816 { using BusOperation = CPU::MOS6502Esque::BusOperation; using Register = CPU::MOS6502Esque::Register; @@ -92,7 +91,6 @@ template class Processor: public Pro #include "Implementation/65816Implementation.hpp" -} } #endif /* WDC65816_hpp */ diff --git a/Processors/68000Mk2/68000Mk2.hpp b/Processors/68000Mk2/68000Mk2.hpp index be908db02..350f04446 100644 --- a/Processors/68000Mk2/68000Mk2.hpp +++ b/Processors/68000Mk2/68000Mk2.hpp @@ -13,8 +13,7 @@ #include "../../Numeric/RegisterSizes.hpp" #include "../../InstructionSets/M68k/RegisterSet.hpp" -namespace CPU { -namespace MC68000Mk2 { +namespace CPU::MC68000Mk2 { /*! A microcycle is an atomic unit of 68000 bus activity — it is a single item large enough @@ -358,13 +357,11 @@ struct State { InstructionSet::M68k::RegisterSet registers; }; -} } #include "Implementation/68000Mk2Storage.hpp" -namespace CPU { -namespace MC68000Mk2 { +namespace CPU::MC68000Mk2 { /*! Provides an emulation of the 68000 with accurate bus logic via the @c BusHandler, subject to the following template parameters: @@ -447,7 +444,6 @@ class Processor: private ProcessorBase { BusHandler &bus_handler_; }; -} } #include "Implementation/68000Mk2Implementation.hpp" diff --git a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp index df4358df0..425e038d2 100644 --- a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp +++ b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp @@ -14,8 +14,7 @@ #include "../../../InstructionSets/M68k/ExceptionVectors.hpp" -namespace CPU { -namespace MC68000Mk2 { +namespace CPU::MC68000Mk2 { #define AddressingDispatch(x) \ x, x##__end = x + InstructionSet::M68k::AddressingModeCount @@ -3104,7 +3103,6 @@ void Processor -namespace CPU { -namespace MC68000Mk2 { +namespace CPU::MC68000Mk2 { struct ProcessorBase: public InstructionSet::M68k::NullFlowController { ProcessorBase() { @@ -222,7 +221,6 @@ struct ProcessorBase: public InstructionSet::M68k::NullFlowController { Microcycle awaiting_dtack; }; -} } #endif /* _8000Mk2Storage_h */ diff --git a/Processors/Z80/AllRAM/Z80AllRAM.hpp b/Processors/Z80/AllRAM/Z80AllRAM.hpp index 85f4f04dc..713633e98 100644 --- a/Processors/Z80/AllRAM/Z80AllRAM.hpp +++ b/Processors/Z80/AllRAM/Z80AllRAM.hpp @@ -12,8 +12,7 @@ #include "../Z80.hpp" #include "../../AllRAMProcessor.hpp" -namespace CPU { -namespace Z80 { +namespace CPU::Z80 { class AllRAMProcessor: public ::CPU::AllRAMProcessor { @@ -52,7 +51,6 @@ class AllRAMProcessor: AllRAMProcessor() : ::CPU::AllRAMProcessor(65536) {} }; -} } #endif /* Z80AllRAM_hpp */ diff --git a/Processors/Z80/Z80.hpp b/Processors/Z80/Z80.hpp index 921c9d5dc..2d3585b7e 100644 --- a/Processors/Z80/Z80.hpp +++ b/Processors/Z80/Z80.hpp @@ -17,8 +17,7 @@ #include "../../ClockReceiver/ClockReceiver.hpp" #include "../../ClockReceiver/ForceInline.hpp" -namespace CPU { -namespace Z80 { +namespace CPU::Z80 { /* The list of registers that can be accessed via @c set_value_of_register and @c set_value_of_register. @@ -537,7 +536,6 @@ template class Processor: #include "Implementation/Z80Implementation.hpp" -} } #endif /* Z80_hpp */ diff --git a/Storage/Cartridge/Cartridge.hpp b/Storage/Cartridge/Cartridge.hpp index 0cb552811..89784665d 100644 --- a/Storage/Cartridge/Cartridge.hpp +++ b/Storage/Cartridge/Cartridge.hpp @@ -12,8 +12,7 @@ #include #include -namespace Storage { -namespace Cartridge { +namespace Storage::Cartridge { /*! Provides a base class for cartridges; the bus provided to cartridges and therefore @@ -81,7 +80,6 @@ class Cartridge { std::vector segments_; }; -} } #endif /* ROM_hpp */ diff --git a/Storage/Cartridge/Encodings/CommodoreROM.hpp b/Storage/Cartridge/Encodings/CommodoreROM.hpp index ee8f79759..21f0ccc14 100644 --- a/Storage/Cartridge/Encodings/CommodoreROM.hpp +++ b/Storage/Cartridge/Encodings/CommodoreROM.hpp @@ -12,16 +12,10 @@ #include #include -namespace Storage { -namespace Cartridge { -namespace Encodings { -namespace CommodoreROM { +namespace Storage::Cartridge::Encodings::CommodoreROM { bool isROM(const std::vector &); -} -} -} } #endif /* CommodoreROM_hpp */ diff --git a/Storage/Cartridge/Formats/BinaryDump.hpp b/Storage/Cartridge/Formats/BinaryDump.hpp index 2aba3cb25..c1c0281da 100644 --- a/Storage/Cartridge/Formats/BinaryDump.hpp +++ b/Storage/Cartridge/Formats/BinaryDump.hpp @@ -13,8 +13,7 @@ #include -namespace Storage { -namespace Cartridge { +namespace Storage::Cartridge { class BinaryDump : public Cartridge { public: @@ -25,7 +24,6 @@ class BinaryDump : public Cartridge { }; }; -} } #endif /* AcornROM_hpp */ diff --git a/Storage/Cartridge/Formats/PRG.hpp b/Storage/Cartridge/Formats/PRG.hpp index f26286efb..8ca179eb7 100644 --- a/Storage/Cartridge/Formats/PRG.hpp +++ b/Storage/Cartridge/Formats/PRG.hpp @@ -13,8 +13,7 @@ #include -namespace Storage { -namespace Cartridge { +namespace Storage::Cartridge { class PRG : public Cartridge { public: @@ -25,7 +24,6 @@ class PRG : public Cartridge { }; }; -} } #endif /* PRG_hpp */ diff --git a/Storage/Data/BitReverse.hpp b/Storage/Data/BitReverse.hpp index 2454352d0..eb88ba310 100644 --- a/Storage/Data/BitReverse.hpp +++ b/Storage/Data/BitReverse.hpp @@ -12,9 +12,7 @@ #include #include -namespace Storage { -namespace Data { -namespace BitReverse { +namespace Storage::Data::BitReverse { /*! Reverses the order of the bits in every byte of the vector: @@ -23,8 +21,8 @@ namespace BitReverse { */ void reverse(std::vector &vector); -} -} +// TODO: is this substantially different from Numeric/BitReverse.hpp? + } #endif /* BitReverse_hpp */ diff --git a/Storage/Data/Commodore.hpp b/Storage/Data/Commodore.hpp index 5fb10aa91..383fd2391 100644 --- a/Storage/Data/Commodore.hpp +++ b/Storage/Data/Commodore.hpp @@ -11,14 +11,10 @@ #include -namespace Storage { -namespace Data { -namespace Commodore { +namespace Storage::Data::Commodore { std::wstring petscii_from_bytes(const uint8_t *string, int length, bool shifted); -} -} } #endif /* Commodore_hpp */ diff --git a/Storage/Data/ZX8081.hpp b/Storage/Data/ZX8081.hpp index 85649041d..f1a88ce2a 100644 --- a/Storage/Data/ZX8081.hpp +++ b/Storage/Data/ZX8081.hpp @@ -14,9 +14,7 @@ #include #include -namespace Storage { -namespace Data { -namespace ZX8081 { +namespace Storage::Data::ZX8081 { struct File { std::vector data; @@ -29,9 +27,6 @@ std::shared_ptr FileFromData(const std::vector &data); std::wstring StringFromData(const std::vector &data, bool is_zx81); std::vector DataFromString(const std::wstring &string, bool is_zx81); - -} -} } #endif /* ZX8081_hpp */ diff --git a/Storage/Disk/Controller/DiskController.hpp b/Storage/Disk/Controller/DiskController.hpp index 57d574854..aad387a16 100644 --- a/Storage/Disk/Controller/DiskController.hpp +++ b/Storage/Disk/Controller/DiskController.hpp @@ -16,8 +16,7 @@ #include "../../../ClockReceiver/ClockReceiver.hpp" #include "../../../ClockReceiver/ClockingHintSource.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides the shell for emulating a disk controller: something that is connected to a disk drive and uses a @@ -163,7 +162,6 @@ class Controller: void digital_phase_locked_loop_output_bit(int value); }; -} } #endif /* DiskDrive_hpp */ diff --git a/Storage/Disk/Controller/MFMDiskController.hpp b/Storage/Disk/Controller/MFMDiskController.hpp index 34844b631..c802a5917 100644 --- a/Storage/Disk/Controller/MFMDiskController.hpp +++ b/Storage/Disk/Controller/MFMDiskController.hpp @@ -14,8 +14,7 @@ #include "../../../ClockReceiver/ClockReceiver.hpp" #include "../Encodings/MFM/Shifter.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Extends Controller with a built-in shift register and FM/MFM decoding logic, @@ -166,7 +165,6 @@ class MFMController: public Controller { CRC::CCITT crc_generator_; }; -} } #endif /* MFMDiskController_hpp */ diff --git a/Storage/Disk/Disk.hpp b/Storage/Disk/Disk.hpp index 46dac2db8..6677769ed 100644 --- a/Storage/Disk/Disk.hpp +++ b/Storage/Disk/Disk.hpp @@ -18,8 +18,7 @@ #include "Track/Track.hpp" #include "../../Concurrency/AsyncTaskQueue.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Models a flopy disk. @@ -69,7 +68,6 @@ class Disk { virtual bool tracks_differ(Track::Address, Track::Address) = 0; }; -} } #endif /* Disk_hpp */ diff --git a/Storage/Disk/DiskImage/DiskImage.hpp b/Storage/Disk/DiskImage/DiskImage.hpp index def1fbb41..17405f807 100644 --- a/Storage/Disk/DiskImage/DiskImage.hpp +++ b/Storage/Disk/DiskImage/DiskImage.hpp @@ -16,8 +16,7 @@ #include "../Track/Track.hpp" #include "../../TargetPlatforms.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { enum class Error { InvalidFormat = -2, @@ -119,7 +118,6 @@ template class DiskImageHolder: public DiskImageHolderBase, public #include "DiskImageImplementation.hpp" -} } #endif /* DiskImage_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/2MG.hpp b/Storage/Disk/DiskImage/Formats/2MG.hpp index 8b512e189..ca5c1973f 100644 --- a/Storage/Disk/DiskImage/Formats/2MG.hpp +++ b/Storage/Disk/DiskImage/Formats/2MG.hpp @@ -16,8 +16,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! 2MG is slightly special because it's just a container format; there's a brief header and then @@ -34,7 +33,6 @@ class Disk2MG { static DiskOrMassStorageDevice open(const std::string &file_name); }; -} } #endif /* _MG_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/AcornADF.hpp b/Storage/Disk/DiskImage/Formats/AcornADF.hpp index 1988579f1..ed4b529f4 100644 --- a/Storage/Disk/DiskImage/Formats/AcornADF.hpp +++ b/Storage/Disk/DiskImage/Formats/AcornADF.hpp @@ -13,8 +13,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c Disk containing an ADF disk image: a decoded sector dump of an Acorn ADFS disk. @@ -37,7 +36,6 @@ class AcornADF: public MFMSectorDump { int head_count_ = 1; }; -} } #endif /* AcornADF_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/AmigaADF.hpp b/Storage/Disk/DiskImage/Formats/AmigaADF.hpp index 79a9ec6b3..53ae21b4a 100644 --- a/Storage/Disk/DiskImage/Formats/AmigaADF.hpp +++ b/Storage/Disk/DiskImage/Formats/AmigaADF.hpp @@ -13,8 +13,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c DiskImage containing an Amiga ADF, which is an MFM sector contents dump, @@ -41,7 +40,6 @@ class AmigaADF: public DiskImage { }; -} } #endif /* AmigaADF_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/AppleDSK.hpp b/Storage/Disk/DiskImage/Formats/AppleDSK.hpp index 5a4f73062..59f3aeb41 100644 --- a/Storage/Disk/DiskImage/Formats/AppleDSK.hpp +++ b/Storage/Disk/DiskImage/Formats/AppleDSK.hpp @@ -14,8 +14,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c DiskImage containing an Apple DSK disk image: a representation of sector contents, @@ -47,7 +46,5 @@ class AppleDSK: public DiskImage { }; } -} - #endif /* AppleDSK_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/CPCDSK.hpp b/Storage/Disk/DiskImage/Formats/CPCDSK.hpp index 15129dd86..566cb2300 100644 --- a/Storage/Disk/DiskImage/Formats/CPCDSK.hpp +++ b/Storage/Disk/DiskImage/Formats/CPCDSK.hpp @@ -16,8 +16,7 @@ #include #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c Disk containing an Amstrad CPC-type disk image: some arrangement of sectors with status bits. @@ -72,7 +71,5 @@ class CPCDSK: public DiskImage { }; } -} - #endif /* CPCDSK_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/D64.hpp b/Storage/Disk/DiskImage/Formats/D64.hpp index 25a4718f2..a3624709e 100644 --- a/Storage/Disk/DiskImage/Formats/D64.hpp +++ b/Storage/Disk/DiskImage/Formats/D64.hpp @@ -12,8 +12,7 @@ #include "../DiskImage.hpp" #include "../../../FileHolder.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c Disk containing a D64 disk image: a decoded sector dump of a C1540-format disk. @@ -39,7 +38,6 @@ class D64: public DiskImage { uint16_t disk_id_; }; -} } #endif /* D64_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/DMK.hpp b/Storage/Disk/DiskImage/Formats/DMK.hpp index c1962e03c..e836148c9 100644 --- a/Storage/Disk/DiskImage/Formats/DMK.hpp +++ b/Storage/Disk/DiskImage/Formats/DMK.hpp @@ -14,8 +14,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c DiskImage containing a DMK disk image: mostly a decoded byte stream, but with @@ -49,7 +48,6 @@ class DMK: public DiskImage { bool is_purely_single_density_; }; -} } #endif /* DMK_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/FAT12.hpp b/Storage/Disk/DiskImage/Formats/FAT12.hpp index 044612466..b3a91ffa0 100644 --- a/Storage/Disk/DiskImage/Formats/FAT12.hpp +++ b/Storage/Disk/DiskImage/Formats/FAT12.hpp @@ -13,8 +13,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c DiskImage holding an MSDOS-style FAT12 disk image: @@ -35,7 +34,6 @@ class FAT12: public MFMSectorDump { int sector_size_; }; -} } #endif /* MSXDSK_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/G64.hpp b/Storage/Disk/DiskImage/Formats/G64.hpp index b1d6ea978..e62a9c4ec 100644 --- a/Storage/Disk/DiskImage/Formats/G64.hpp +++ b/Storage/Disk/DiskImage/Formats/G64.hpp @@ -14,8 +14,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c Disk containing a G64 disk image: a raw but perfectly-clocked GCR stream. @@ -42,7 +41,6 @@ class G64: public DiskImage { uint16_t maximum_track_size_; }; -} } #endif /* G64_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/HFE.hpp b/Storage/Disk/DiskImage/Formats/HFE.hpp index 7fcbc25e7..ee0b503d9 100644 --- a/Storage/Disk/DiskImage/Formats/HFE.hpp +++ b/Storage/Disk/DiskImage/Formats/HFE.hpp @@ -14,8 +14,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c DiskImage containing an HFE: a bit stream representation of a floppy. @@ -48,7 +47,5 @@ class HFE: public DiskImage { }; } -} - #endif /* HFE_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/IPF.hpp b/Storage/Disk/DiskImage/Formats/IPF.hpp index fa29aafa8..9aa06689b 100644 --- a/Storage/Disk/DiskImage/Formats/IPF.hpp +++ b/Storage/Disk/DiskImage/Formats/IPF.hpp @@ -17,8 +17,7 @@ #include #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c DiskImage containing an IPF, which is a mixed stream of raw flux windows and @@ -85,7 +84,6 @@ class IPF: public DiskImage, public TargetPlatform::TypeDistinguisher { void add_raw_data(std::vector &, Time bit_length, size_t num_bits); }; -} } #endif /* IPF_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/MFMSectorDump.hpp b/Storage/Disk/DiskImage/Formats/MFMSectorDump.hpp index c8914614f..0c8982da1 100644 --- a/Storage/Disk/DiskImage/Formats/MFMSectorDump.hpp +++ b/Storage/Disk/DiskImage/Formats/MFMSectorDump.hpp @@ -14,8 +14,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides the base for writeable [M]FM disk images that just contain contiguous sector content dumps. @@ -41,7 +40,6 @@ class MFMSectorDump: public DiskImage { uint8_t first_sector_ = 0; }; -} } #endif /* SectorDump_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/MSA.hpp b/Storage/Disk/DiskImage/Formats/MSA.hpp index eb28fc9fb..e78b912f7 100644 --- a/Storage/Disk/DiskImage/Formats/MSA.hpp +++ b/Storage/Disk/DiskImage/Formats/MSA.hpp @@ -14,8 +14,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c DiskImage describing an Atari ST MSA disk image: @@ -41,8 +40,6 @@ class MSA final: public DiskImage { std::vector> uncompressed_tracks_; }; - -} } #endif /* MSA_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/MacintoshIMG.hpp b/Storage/Disk/DiskImage/Formats/MacintoshIMG.hpp index dc95f89bc..54c71e8f7 100644 --- a/Storage/Disk/DiskImage/Formats/MacintoshIMG.hpp +++ b/Storage/Disk/DiskImage/Formats/MacintoshIMG.hpp @@ -12,8 +12,7 @@ #include "../DiskImage.hpp" #include "../../../FileHolder.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c DiskImage containing either: @@ -73,7 +72,6 @@ class MacintoshIMG: public DiskImage { long raw_offset_ = 0; }; -} } #endif /* DiskCopy42_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/NIB.hpp b/Storage/Disk/DiskImage/Formats/NIB.hpp index 8f4f71d9c..960729519 100644 --- a/Storage/Disk/DiskImage/Formats/NIB.hpp +++ b/Storage/Disk/DiskImage/Formats/NIB.hpp @@ -12,8 +12,7 @@ #include "../DiskImage.hpp" #include "../../../FileHolder.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c DiskImage describing an Apple NIB disk image: @@ -36,7 +35,6 @@ class NIB: public DiskImage { long file_offset(Track::Address address); }; -} } #endif /* NIB_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/OricMFMDSK.hpp b/Storage/Disk/DiskImage/Formats/OricMFMDSK.hpp index 7bbd1f01d..75ab277c0 100644 --- a/Storage/Disk/DiskImage/Formats/OricMFMDSK.hpp +++ b/Storage/Disk/DiskImage/Formats/OricMFMDSK.hpp @@ -14,8 +14,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c Disk containing an Oric MFM-stype disk image: a stream of the MFM data bits with clocks omitted. @@ -46,7 +45,6 @@ class OricMFMDSK: public DiskImage { uint32_t geometry_type_; }; -} } #endif /* OricMFMDSK_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/SSD.hpp b/Storage/Disk/DiskImage/Formats/SSD.hpp index d3df2abc8..6158227cf 100644 --- a/Storage/Disk/DiskImage/Formats/SSD.hpp +++ b/Storage/Disk/DiskImage/Formats/SSD.hpp @@ -11,8 +11,7 @@ #include "MFMSectorDump.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c Disk containing a DSD or SSD disk image: a decoded sector dump of an Acorn DFS disk. @@ -37,7 +36,6 @@ class SSD: public MFMSectorDump { int track_count_; }; -} } #endif /* SSD_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/STX.hpp b/Storage/Disk/DiskImage/Formats/STX.hpp index c7aba86d8..15e3bbc11 100644 --- a/Storage/Disk/DiskImage/Formats/STX.hpp +++ b/Storage/Disk/DiskImage/Formats/STX.hpp @@ -12,8 +12,7 @@ #include "../DiskImage.hpp" #include "../../../FileHolder.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c Disk containing an STX disk image: sector contents plus a bunch of annotations as to sizing, @@ -44,7 +43,6 @@ class STX: public DiskImage { long offset_by_track_[256]; }; -} } #endif /* STX_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/Utility/ImplicitSectors.hpp b/Storage/Disk/DiskImage/Formats/Utility/ImplicitSectors.hpp index 8db583ee6..3714837d8 100644 --- a/Storage/Disk/DiskImage/Formats/Utility/ImplicitSectors.hpp +++ b/Storage/Disk/DiskImage/Formats/Utility/ImplicitSectors.hpp @@ -13,13 +13,11 @@ #include #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { std::shared_ptr track_for_sectors(const uint8_t *source, int number_of_sectors, uint8_t track, uint8_t side, uint8_t first_sector, uint8_t size, bool is_double_density); void decode_sectors(Track &track, uint8_t *destination, uint8_t first_sector, uint8_t last_sector, uint8_t sector_size, bool is_double_density); -} } #endif /* ImplicitSectors_hpp */ diff --git a/Storage/Disk/DiskImage/Formats/WOZ.hpp b/Storage/Disk/DiskImage/Formats/WOZ.hpp index cf2d2e5a6..ce091bc21 100644 --- a/Storage/Disk/DiskImage/Formats/WOZ.hpp +++ b/Storage/Disk/DiskImage/Formats/WOZ.hpp @@ -15,8 +15,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Provides a @c DiskImage containing a WOZ: a bit stream representation of a floppy. @@ -56,7 +55,6 @@ class WOZ: public DiskImage { constexpr static long NoSuchTrack = 0; // This is an offset a track definitely can't lie at. }; -} } #endif /* WOZ_hpp */ diff --git a/Storage/Disk/Drive.hpp b/Storage/Disk/Drive.hpp index accf4e4e0..660544f69 100644 --- a/Storage/Disk/Drive.hpp +++ b/Storage/Disk/Drive.hpp @@ -19,8 +19,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { class Drive: public ClockingHint::Source, public TimedEventLoop { public: @@ -296,8 +295,6 @@ class Drive: public ClockingHint::Source, public TimedEventLoop { float random_interval_; }; - -} } #endif /* Drive_hpp */ diff --git a/Storage/Disk/Encodings/AppleGCR/Encoder.hpp b/Storage/Disk/Encodings/AppleGCR/Encoder.hpp index 1dffc0bb0..2f775967d 100644 --- a/Storage/Disk/Encodings/AppleGCR/Encoder.hpp +++ b/Storage/Disk/Encodings/AppleGCR/Encoder.hpp @@ -12,9 +12,7 @@ #include #include "../../../Disk/Track/PCMSegment.hpp" -namespace Storage { -namespace Encodings { -namespace AppleGCR { +namespace Storage::Encodings::AppleGCR { /// Describes the standard three-byte prologue that begins a header on both the Macintosh and the Apple II from DOS 3.3. constexpr uint8_t header_prologue[3] = {0xd5, 0xaa, 0x96}; @@ -93,8 +91,6 @@ Storage::Disk::PCMSegment five_and_three_data(const uint8_t *source); */ Storage::Disk::PCMSegment five_and_three_sync(int length); -} -} } #endif /* AppleGCR_hpp */ diff --git a/Storage/Disk/Encodings/AppleGCR/Sector.hpp b/Storage/Disk/Encodings/AppleGCR/Sector.hpp index 315ee7459..b096782b9 100644 --- a/Storage/Disk/Encodings/AppleGCR/Sector.hpp +++ b/Storage/Disk/Encodings/AppleGCR/Sector.hpp @@ -12,9 +12,7 @@ #include #include -namespace Storage { -namespace Encodings { -namespace AppleGCR { +namespace Storage::Encodings::AppleGCR { struct Sector { /*! @@ -76,8 +74,6 @@ struct Sector { encoding(rhs.encoding) {} }; -} -} } #endif /* Sector_h */ diff --git a/Storage/Disk/Encodings/AppleGCR/SegmentParser.hpp b/Storage/Disk/Encodings/AppleGCR/SegmentParser.hpp index ca6e12291..4c4d0c06f 100644 --- a/Storage/Disk/Encodings/AppleGCR/SegmentParser.hpp +++ b/Storage/Disk/Encodings/AppleGCR/SegmentParser.hpp @@ -13,9 +13,7 @@ #include "../../Track/PCMSegment.hpp" #include -namespace Storage { -namespace Encodings { -namespace AppleGCR { +namespace Storage::Encodings::AppleGCR { /*! Scans @c segment for all included sectors, returning a set that maps from location within @@ -23,8 +21,6 @@ namespace AppleGCR { */ std::map sectors_from_segment(const Disk::PCMSegment &segment); -} -} } #endif /* TrackParser_hpp */ diff --git a/Storage/Disk/Encodings/CommodoreGCR.hpp b/Storage/Disk/Encodings/CommodoreGCR.hpp index ed6420c83..7d1acc201 100644 --- a/Storage/Disk/Encodings/CommodoreGCR.hpp +++ b/Storage/Disk/Encodings/CommodoreGCR.hpp @@ -12,8 +12,7 @@ #include "../../Storage.hpp" #include -namespace Storage { -namespace Encodings { +namespace Storage::Encodings { namespace CommodoreGCR { /*! @@ -48,7 +47,6 @@ namespace CommodoreGCR { unsigned int decoding_from_dectet(unsigned int dectet); } -} } #endif /* CommodoreGCR_hpp */ diff --git a/Storage/Disk/Encodings/MFM/Constants.hpp b/Storage/Disk/Encodings/MFM/Constants.hpp index 5db0f0bd2..011af4dc9 100644 --- a/Storage/Disk/Encodings/MFM/Constants.hpp +++ b/Storage/Disk/Encodings/MFM/Constants.hpp @@ -11,9 +11,7 @@ #include "../../../Storage.hpp" -namespace Storage { -namespace Encodings { -namespace MFM { +namespace Storage::Encodings::MFM { const uint8_t IndexAddressByte = 0xfc; const uint8_t IDAddressByte = 0xfe; @@ -35,8 +33,6 @@ const uint8_t MFMSyncByteValue = 0xa1; const Time MFMBitLength = Time(1, 100000); const Time FMBitLength = Time(1, 50000); -} -} } #endif /* Constants_h */ diff --git a/Storage/Disk/Encodings/MFM/Encoder.hpp b/Storage/Disk/Encodings/MFM/Encoder.hpp index 71a48661b..babec8b35 100644 --- a/Storage/Disk/Encodings/MFM/Encoder.hpp +++ b/Storage/Disk/Encodings/MFM/Encoder.hpp @@ -17,9 +17,7 @@ #include "../../Track/Track.hpp" #include "../../../../Numeric/CRC.hpp" -namespace Storage { -namespace Encodings { -namespace MFM { +namespace Storage::Encodings::MFM { extern const std::size_t DefaultSectorGapLength; /*! @@ -80,8 +78,6 @@ class Encoder { std::unique_ptr GetMFMEncoder(std::vector &target, std::vector *fuzzy_target = nullptr); std::unique_ptr GetFMEncoder(std::vector &target, std::vector *fuzzy_target = nullptr); -} -} } #endif /* MFM_hpp */ diff --git a/Storage/Disk/Encodings/MFM/Parser.hpp b/Storage/Disk/Encodings/MFM/Parser.hpp index 7e7a1e74f..cdf0dd034 100644 --- a/Storage/Disk/Encodings/MFM/Parser.hpp +++ b/Storage/Disk/Encodings/MFM/Parser.hpp @@ -13,9 +13,7 @@ #include "../../Track/Track.hpp" #include "../../Drive.hpp" -namespace Storage { -namespace Encodings { -namespace MFM { +namespace Storage::Encodings::MFM { /*! Provides a mechanism for collecting sectors from a disk. @@ -40,8 +38,6 @@ class Parser { std::map> sectors_by_address_by_track_; }; -} -} } #endif /* Parser_hpp */ diff --git a/Storage/Disk/Encodings/MFM/Sector.hpp b/Storage/Disk/Encodings/MFM/Sector.hpp index 2818b5b1e..ae4da862e 100644 --- a/Storage/Disk/Encodings/MFM/Sector.hpp +++ b/Storage/Disk/Encodings/MFM/Sector.hpp @@ -12,9 +12,7 @@ #include #include -namespace Storage { -namespace Encodings { -namespace MFM { +namespace Storage::Encodings::MFM { /*! Represents a single [M]FM sector, identified by its track, side and sector records, a blob of data @@ -54,8 +52,6 @@ struct Sector { is_deleted(rhs.is_deleted ){} }; -} -} } #endif /* Sector_h */ diff --git a/Storage/Disk/Encodings/MFM/SegmentParser.hpp b/Storage/Disk/Encodings/MFM/SegmentParser.hpp index 0bf428eab..d5b37f181 100644 --- a/Storage/Disk/Encodings/MFM/SegmentParser.hpp +++ b/Storage/Disk/Encodings/MFM/SegmentParser.hpp @@ -13,9 +13,7 @@ #include "../../Track/PCMSegment.hpp" #include -namespace Storage { -namespace Encodings { -namespace MFM { +namespace Storage::Encodings::MFM { /*! Scans @c segment for all included sectors, returning a set that maps from location within @@ -24,8 +22,6 @@ namespace MFM { */ std::map sectors_from_segment(const Disk::PCMSegment &&segment, bool is_double_density); -} -} } #endif /* SegmentParser_hpp */ diff --git a/Storage/Disk/Encodings/MFM/Shifter.hpp b/Storage/Disk/Encodings/MFM/Shifter.hpp index f55b8d417..a53689652 100644 --- a/Storage/Disk/Encodings/MFM/Shifter.hpp +++ b/Storage/Disk/Encodings/MFM/Shifter.hpp @@ -13,9 +13,7 @@ #include #include "../../../../Numeric/CRC.hpp" -namespace Storage { -namespace Encodings { -namespace MFM { +namespace Storage::Encodings::MFM { /*! The MFM shifter parses a stream of bits as input in order to produce @@ -80,8 +78,6 @@ class Shifter { CRC::CCITT *crc_generator_; }; -} -} } #endif /* Shifter_hpp */ diff --git a/Storage/Disk/Parsers/CPM.hpp b/Storage/Disk/Parsers/CPM.hpp index d7140c738..a34fea46f 100644 --- a/Storage/Disk/Parsers/CPM.hpp +++ b/Storage/Disk/Parsers/CPM.hpp @@ -16,9 +16,7 @@ #include #include -namespace Storage { -namespace Disk { -namespace CPM { +namespace Storage::Disk::CPM { struct ParameterBlock { int sectors_per_track; @@ -44,8 +42,6 @@ struct Catalogue { std::unique_ptr GetCatalogue(const std::shared_ptr &disk, const ParameterBlock ¶meters); -} -} } #endif /* Storage_Disk_Parsers_CPM_hpp */ diff --git a/Storage/Disk/Parsers/FAT.hpp b/Storage/Disk/Parsers/FAT.hpp index 3ede18518..f9d1d4866 100644 --- a/Storage/Disk/Parsers/FAT.hpp +++ b/Storage/Disk/Parsers/FAT.hpp @@ -16,9 +16,7 @@ #include #include -namespace Storage { -namespace Disk { -namespace FAT { +namespace Storage::Disk::FAT { struct File { std::string name; @@ -72,8 +70,6 @@ std::optional GetVolume(const std::shared_ptr &disk std::optional> GetFile(const std::shared_ptr &disk, const Volume &volume, const File &file); std::optional GetDirectory(const std::shared_ptr &disk, const Volume &volume, const File &file); -} -} } #endif /* FAT_hpp */ diff --git a/Storage/Disk/Track/PCMSegment.hpp b/Storage/Disk/Track/PCMSegment.hpp index 38389eb96..a53f72a79 100644 --- a/Storage/Disk/Track/PCMSegment.hpp +++ b/Storage/Disk/Track/PCMSegment.hpp @@ -17,8 +17,7 @@ #include "../../../Numeric/LFSR.hpp" #include "Track.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! A segment of PCM-sampled data. @@ -203,7 +202,6 @@ class PCMSegmentEventSource { Numeric::LFSR lfsr_; }; -} } #endif /* PCMSegment_hpp */ diff --git a/Storage/Disk/Track/PCMTrack.hpp b/Storage/Disk/Track/PCMTrack.hpp index 888dc1688..0fc26f0e2 100644 --- a/Storage/Disk/Track/PCMTrack.hpp +++ b/Storage/Disk/Track/PCMTrack.hpp @@ -15,8 +15,7 @@ #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! A subclass of @c Track that provides its @c Events by querying a pulse-code modulated record of original @@ -89,7 +88,6 @@ class PCMTrack: public Track { bool is_resampled_clone_ = false; }; -} } #endif /* PCMTrack_hpp */ diff --git a/Storage/Disk/Track/Track.hpp b/Storage/Disk/Track/Track.hpp index bb4ae83e1..c482a74c6 100644 --- a/Storage/Disk/Track/Track.hpp +++ b/Storage/Disk/Track/Track.hpp @@ -12,8 +12,7 @@ #include "../../Storage.hpp" #include -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Contains a head position, with some degree of sub-integral precision. @@ -126,7 +125,6 @@ class Track { virtual Track *clone() const = 0; }; -} } #endif /* Track_h */ diff --git a/Storage/Disk/Track/TrackSerialiser.hpp b/Storage/Disk/Track/TrackSerialiser.hpp index 85b025cfb..668a3498d 100644 --- a/Storage/Disk/Track/TrackSerialiser.hpp +++ b/Storage/Disk/Track/TrackSerialiser.hpp @@ -13,8 +13,7 @@ #include "PCMSegment.hpp" #include "Track.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! Instantiates a PLL with a target bit length of @c length_of_a_bit and provides a complete @@ -32,7 +31,6 @@ namespace Disk { */ PCMSegment track_serialisation(const Track &track, Time length_of_a_bit); -} } #endif /* TrackSerialiser_h */ diff --git a/Storage/Disk/Track/UnformattedTrack.hpp b/Storage/Disk/Track/UnformattedTrack.hpp index 91d84fa74..613f3fba9 100644 --- a/Storage/Disk/Track/UnformattedTrack.hpp +++ b/Storage/Disk/Track/UnformattedTrack.hpp @@ -11,8 +11,7 @@ #include "Track.hpp" -namespace Storage { -namespace Disk { +namespace Storage::Disk { /*! A subclass of @c Track with no contents. Just an index hole. @@ -24,7 +23,6 @@ class UnformattedTrack: public Track { Track *clone() const final; }; -} } #endif /* UnformattedTrack_hpp */ diff --git a/Storage/MassStorage/Encodings/AppleIIVolume.hpp b/Storage/MassStorage/Encodings/AppleIIVolume.hpp index 10d921d03..ea82734c9 100644 --- a/Storage/MassStorage/Encodings/AppleIIVolume.hpp +++ b/Storage/MassStorage/Encodings/AppleIIVolume.hpp @@ -11,10 +11,7 @@ #include "ApplePartitionMap.hpp" -namespace Storage { -namespace MassStorage { -namespace Encodings { -namespace AppleII { +namespace Storage::MassStorage::Encodings::AppleII { struct VolumeProvider { static constexpr bool HasDriver = false; @@ -30,9 +27,6 @@ struct VolumeProvider { using Mapper = Storage::MassStorage::Encodings::Apple::PartitionMap; -} -} -} } #endif /* AppleIIVolume_h */ diff --git a/Storage/MassStorage/Encodings/ApplePartitionMap.hpp b/Storage/MassStorage/Encodings/ApplePartitionMap.hpp index 846ddba28..a8acb2a33 100644 --- a/Storage/MassStorage/Encodings/ApplePartitionMap.hpp +++ b/Storage/MassStorage/Encodings/ApplePartitionMap.hpp @@ -15,10 +15,7 @@ #include #include -namespace Storage { -namespace MassStorage { -namespace Encodings { -namespace Apple { +namespace Storage::MassStorage::Encodings::Apple { enum class DriveType { SCSI @@ -249,9 +246,6 @@ template class PartitionMap { } }; -} -} -} } #endif /* ApplePartitionMap_hpp */ diff --git a/Storage/MassStorage/Encodings/MacintoshVolume.hpp b/Storage/MassStorage/Encodings/MacintoshVolume.hpp index 930c03c84..15bc77477 100644 --- a/Storage/MassStorage/Encodings/MacintoshVolume.hpp +++ b/Storage/MassStorage/Encodings/MacintoshVolume.hpp @@ -15,10 +15,7 @@ #include "ApplePartitionMap.hpp" -namespace Storage { -namespace MassStorage { -namespace Encodings { -namespace Macintosh { +namespace Storage::MassStorage::Encodings::Macintosh { using DriveType = Storage::MassStorage::Encodings::Apple::DriveType; @@ -56,9 +53,6 @@ struct VolumeProvider { */ using Mapper = Storage::MassStorage::Encodings::Apple::PartitionMap; -} -} -} } #endif /* MacintoshVolume_hpp */ diff --git a/Storage/MassStorage/Formats/DAT.hpp b/Storage/MassStorage/Formats/DAT.hpp index a47a537c5..d5dfeb31d 100644 --- a/Storage/MassStorage/Formats/DAT.hpp +++ b/Storage/MassStorage/Formats/DAT.hpp @@ -11,8 +11,7 @@ #include "RawSectorDump.hpp" -namespace Storage { -namespace MassStorage { +namespace Storage::MassStorage { /*! Provides a @c MassStorageDevice containing an Acorn ADFS image, which is just a @@ -24,7 +23,6 @@ class DAT: public RawSectorDump<256> { DAT(const std::string &file_name); }; -} } #endif /* MassStorage_DAT_hpp */ diff --git a/Storage/MassStorage/Formats/DSK.hpp b/Storage/MassStorage/Formats/DSK.hpp index bdf1b53cc..507501e87 100644 --- a/Storage/MassStorage/Formats/DSK.hpp +++ b/Storage/MassStorage/Formats/DSK.hpp @@ -11,8 +11,7 @@ #include "RawSectorDump.hpp" -namespace Storage { -namespace MassStorage { +namespace Storage::MassStorage { /*! Provides a @c MassStorageDevice containing a Macintosh DSK image, which is just a @@ -24,7 +23,6 @@ class DSK: public RawSectorDump<512> { DSK(const std::string &file_name); }; -} } #endif /* MassStorage_DSK_hpp */ diff --git a/Storage/MassStorage/Formats/HDV.hpp b/Storage/MassStorage/Formats/HDV.hpp index b891ddfc3..8b9b059b1 100644 --- a/Storage/MassStorage/Formats/HDV.hpp +++ b/Storage/MassStorage/Formats/HDV.hpp @@ -16,8 +16,7 @@ #include #include -namespace Storage { -namespace MassStorage { +namespace Storage::MassStorage { /*! Provides a @c MassStorageDevice containing an HDV image, which is a sector dump of @@ -50,7 +49,6 @@ class HDV: public MassStorageDevice { void set_block(size_t address, const std::vector &) final; }; -} } #endif /* HDV_hpp */ diff --git a/Storage/MassStorage/Formats/HFV.hpp b/Storage/MassStorage/Formats/HFV.hpp index ed1db3179..377385ad8 100644 --- a/Storage/MassStorage/Formats/HFV.hpp +++ b/Storage/MassStorage/Formats/HFV.hpp @@ -16,8 +16,7 @@ #include #include -namespace Storage { -namespace MassStorage { +namespace Storage::MassStorage { /*! Provides a @c MassStorageDevice containing an HFV image, which is a sector dump of @@ -48,7 +47,6 @@ class HFV: public MassStorageDevice, public Encodings::Macintosh::Volume { std::map> writes_; }; -} } #endif /* HFV_hpp */ diff --git a/Storage/MassStorage/Formats/RawSectorDump.hpp b/Storage/MassStorage/Formats/RawSectorDump.hpp index cb7fc19d6..107a9fa8a 100644 --- a/Storage/MassStorage/Formats/RawSectorDump.hpp +++ b/Storage/MassStorage/Formats/RawSectorDump.hpp @@ -14,8 +14,7 @@ #include -namespace Storage { -namespace MassStorage { +namespace Storage::MassStorage { template class RawSectorDump: public MassStorageDevice { public: @@ -53,7 +52,6 @@ template class RawSectorDump: public MassStorageDevice { const long file_size_, file_start_; }; -} } #endif /* RawSectorDump_h */ diff --git a/Storage/MassStorage/MassStorageDevice.hpp b/Storage/MassStorage/MassStorageDevice.hpp index 61e48859c..c0d7c1758 100644 --- a/Storage/MassStorage/MassStorageDevice.hpp +++ b/Storage/MassStorage/MassStorageDevice.hpp @@ -13,8 +13,7 @@ #include #include -namespace Storage { -namespace MassStorage { +namespace Storage::MassStorage { /*! A mass storage device is usually: @@ -55,7 +54,6 @@ class MassStorageDevice { virtual void set_block([[maybe_unused]] size_t address, const std::vector &) {} }; -} } #endif /* MassStorageDevice_hpp */ diff --git a/Storage/MassStorage/SCSI/Target.hpp b/Storage/MassStorage/SCSI/Target.hpp index 4f34fa65f..7ca91d680 100644 --- a/Storage/MassStorage/SCSI/Target.hpp +++ b/Storage/MassStorage/SCSI/Target.hpp @@ -16,8 +16,7 @@ #include #include -namespace SCSI { -namespace Target { +namespace SCSI::Target { /*! Encapsulates the arguments supplied for a target SCSI command during @@ -396,7 +395,6 @@ template class Target: public Bus::Observer, public Responde #include "TargetImplementation.hpp" -} } #endif /* SCSI_Target_hpp */ diff --git a/Storage/State/SNA.hpp b/Storage/State/SNA.hpp index 2f2811d93..d312e8701 100644 --- a/Storage/State/SNA.hpp +++ b/Storage/State/SNA.hpp @@ -11,14 +11,12 @@ #include "../../Analyser/Static/StaticAnalyser.hpp" -namespace Storage { -namespace State { +namespace Storage::State { struct SNA { static std::unique_ptr load(const std::string &file_name); }; -} } #endif /* Storage_State_SNA_hpp */ diff --git a/Storage/State/SZX.hpp b/Storage/State/SZX.hpp index 56d8b0146..a7b813f7e 100644 --- a/Storage/State/SZX.hpp +++ b/Storage/State/SZX.hpp @@ -11,14 +11,12 @@ #include "../../Analyser/Static/StaticAnalyser.hpp" -namespace Storage { -namespace State { +namespace Storage::State { struct SZX { static std::unique_ptr load(const std::string &file_name); }; -} } #endif /* Storage_State_SZX_hpp */ diff --git a/Storage/State/Z80.hpp b/Storage/State/Z80.hpp index ef5a9af1e..f37000669 100644 --- a/Storage/State/Z80.hpp +++ b/Storage/State/Z80.hpp @@ -11,14 +11,12 @@ #include "../../Analyser/Static/StaticAnalyser.hpp" -namespace Storage { -namespace State { +namespace Storage::State { struct Z80 { static std::unique_ptr load(const std::string &file_name); }; -} } #endif /* Storage_State_Z80_hpp */ diff --git a/Storage/Tape/Formats/CAS.hpp b/Storage/Tape/Formats/CAS.hpp index e47ad3ab9..d9c0c9106 100644 --- a/Storage/Tape/Formats/CAS.hpp +++ b/Storage/Tape/Formats/CAS.hpp @@ -16,8 +16,7 @@ #include #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Provides a @c Tape containing a CAS tape image, which is an MSX byte stream. @@ -67,7 +66,6 @@ class CAS: public Tape { std::size_t distance_into_bit_ = 0; }; -} } #endif /* CAS_hpp */ diff --git a/Storage/Tape/Formats/CSW.hpp b/Storage/Tape/Formats/CSW.hpp index 3c9d38369..aaa0d88d8 100644 --- a/Storage/Tape/Formats/CSW.hpp +++ b/Storage/Tape/Formats/CSW.hpp @@ -15,8 +15,7 @@ #include #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Provides a @c Tape containing a CSW tape image, which is a compressed 1-bit sampling. @@ -62,7 +61,6 @@ class CSW: public Tape { std::size_t source_data_pointer_; }; -} } #endif /* CSW_hpp */ diff --git a/Storage/Tape/Formats/CommodoreTAP.hpp b/Storage/Tape/Formats/CommodoreTAP.hpp index 0d884eb08..8ed9ab6c8 100644 --- a/Storage/Tape/Formats/CommodoreTAP.hpp +++ b/Storage/Tape/Formats/CommodoreTAP.hpp @@ -15,8 +15,7 @@ #include #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Provides a @c Tape containing a Commodore-format tape image, which is simply a timed list of downward-going zero crossings. @@ -49,7 +48,6 @@ class CommodoreTAP: public Tape { bool is_at_end_ = false; }; -} } #endif /* CommodoreTAP_hpp */ diff --git a/Storage/Tape/Formats/OricTAP.hpp b/Storage/Tape/Formats/OricTAP.hpp index f40734abc..da5937705 100644 --- a/Storage/Tape/Formats/OricTAP.hpp +++ b/Storage/Tape/Formats/OricTAP.hpp @@ -15,8 +15,7 @@ #include #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Provides a @c Tape containing an Oric-format tape image, which is a byte stream capture. @@ -54,7 +53,6 @@ class OricTAP: public Tape { uint16_t data_end_address_, data_start_address_; }; -} } #endif /* OricTAP_hpp */ diff --git a/Storage/Tape/Formats/TZX.hpp b/Storage/Tape/Formats/TZX.hpp index 277cd2464..b036aee11 100644 --- a/Storage/Tape/Formats/TZX.hpp +++ b/Storage/Tape/Formats/TZX.hpp @@ -14,8 +14,7 @@ #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Provides a @c Tape containing a CSW tape image, which is a compressed 1-bit sampling. @@ -100,5 +99,5 @@ class TZX: public PulseQueuedTape { }; } -} + #endif /* TZX_hpp */ diff --git a/Storage/Tape/Formats/TapePRG.hpp b/Storage/Tape/Formats/TapePRG.hpp index 31d7c4447..18a1117ba 100644 --- a/Storage/Tape/Formats/TapePRG.hpp +++ b/Storage/Tape/Formats/TapePRG.hpp @@ -15,8 +15,7 @@ #include #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Provides a @c Tape containing a .PRG, which is a direct local file. @@ -70,7 +69,6 @@ class PRG: public Tape { uint8_t copy_mask_ = 0x80; }; -} } #endif /* T64_hpp */ diff --git a/Storage/Tape/Formats/TapeUEF.hpp b/Storage/Tape/Formats/TapeUEF.hpp index 1016722cc..29325271e 100644 --- a/Storage/Tape/Formats/TapeUEF.hpp +++ b/Storage/Tape/Formats/TapeUEF.hpp @@ -17,8 +17,7 @@ #include #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Provides a @c Tape containing a UEF tape image, a slightly-convoluted description of pulses. @@ -73,7 +72,6 @@ class UEF : public PulseQueuedTape, public TargetPlatform::TypeDistinguisher { void queue_implicit_byte(uint8_t byte); }; -} } #endif /* TapeUEF_hpp */ diff --git a/Storage/Tape/Formats/ZX80O81P.hpp b/Storage/Tape/Formats/ZX80O81P.hpp index 5f0d9006c..e1033e402 100644 --- a/Storage/Tape/Formats/ZX80O81P.hpp +++ b/Storage/Tape/Formats/ZX80O81P.hpp @@ -18,8 +18,7 @@ #include #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Provides a @c Tape containing a ZX80-format .O tape image, which is a byte stream capture. @@ -59,7 +58,6 @@ class ZX80O81P: public Tape, public TargetPlatform::TypeDistinguisher { std::size_t data_pointer_; }; -} } #endif /* ZX80O_hpp */ diff --git a/Storage/Tape/Formats/ZXSpectrumTAP.hpp b/Storage/Tape/Formats/ZXSpectrumTAP.hpp index ec1cc035c..cbb113178 100644 --- a/Storage/Tape/Formats/ZXSpectrumTAP.hpp +++ b/Storage/Tape/Formats/ZXSpectrumTAP.hpp @@ -15,8 +15,7 @@ #include #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Provides a @c Tape containing an Spectrum-format tape image, which contains a series of @@ -55,8 +54,6 @@ class ZXSpectrumTAP: public Tape { Pulse virtual_get_next_pulse() override; }; - -} } #endif /* SpectrumTAP_hpp */ diff --git a/Storage/Tape/Parsers/Acorn.hpp b/Storage/Tape/Parsers/Acorn.hpp index 8fd762f2e..4e6f0b4c9 100644 --- a/Storage/Tape/Parsers/Acorn.hpp +++ b/Storage/Tape/Parsers/Acorn.hpp @@ -13,9 +13,7 @@ #include "../../../Numeric/CRC.hpp" #include "../../Disk/DPLL/DigitalPhaseLockedLoop.hpp" -namespace Storage { -namespace Tape { -namespace Acorn { +namespace Storage::Tape::Acorn { class Shifter { public: @@ -66,8 +64,6 @@ class Parser: public Storage::Tape::Parser, public Shifter::Delegate Shifter shifter_; }; -} -} } #endif /* Acorn_hpp */ diff --git a/Storage/Tape/Parsers/Commodore.hpp b/Storage/Tape/Parsers/Commodore.hpp index 8a5040dc7..6d49b1a8f 100644 --- a/Storage/Tape/Parsers/Commodore.hpp +++ b/Storage/Tape/Parsers/Commodore.hpp @@ -13,9 +13,7 @@ #include #include -namespace Storage { -namespace Tape { -namespace Commodore { +namespace Storage::Tape::Commodore { enum class WaveType { Short, Medium, Long, Unrecognised @@ -131,8 +129,6 @@ class Parser: public Storage::Tape::PulseClassificationParser &waves) override; }; -} -} } #endif /* Commodore_hpp */ diff --git a/Storage/Tape/Parsers/MSX.hpp b/Storage/Tape/Parsers/MSX.hpp index 227b81efc..ddd146902 100644 --- a/Storage/Tape/Parsers/MSX.hpp +++ b/Storage/Tape/Parsers/MSX.hpp @@ -14,9 +14,7 @@ #include #include -namespace Storage { -namespace Tape { -namespace MSX { +namespace Storage::Tape::MSX { class Parser { public: @@ -49,8 +47,6 @@ class Parser { static int get_byte(const FileSpeed &speed, Storage::Tape::BinaryTapePlayer &tape_player); }; -} -} } #endif /* Storage_Tape_Parsers_MSX_hpp */ diff --git a/Storage/Tape/Parsers/Oric.hpp b/Storage/Tape/Parsers/Oric.hpp index bfbad1b86..34713a595 100644 --- a/Storage/Tape/Parsers/Oric.hpp +++ b/Storage/Tape/Parsers/Oric.hpp @@ -11,9 +11,7 @@ #include "TapeParser.hpp" -namespace Storage { -namespace Tape { -namespace Oric { +namespace Storage::Tape::Oric { enum class WaveType { Short, // i.e. 416 microseconds @@ -52,9 +50,6 @@ class Parser: public Storage::Tape::PulseClassificationParser &waves, const Pattern *pattern); }; - -} -} } #endif /* Oric_hpp */ diff --git a/Storage/Tape/Parsers/Spectrum.hpp b/Storage/Tape/Parsers/Spectrum.hpp index db51c8f1b..a0a6b6048 100644 --- a/Storage/Tape/Parsers/Spectrum.hpp +++ b/Storage/Tape/Parsers/Spectrum.hpp @@ -15,9 +15,7 @@ #include #include -namespace Storage { -namespace Tape { -namespace ZXSpectrum { +namespace Storage::Tape::ZXSpectrum { enum class WaveType { // All references to 't-states' below are cycles relative to the @@ -131,8 +129,6 @@ class Parser: public Storage::Tape::PulseClassificationParser #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { template class Parser { public: @@ -156,7 +155,6 @@ template class PulseClassificationParse std::vector wave_queue_; }; -} } #endif /* TapeParser_hpp */ diff --git a/Storage/Tape/Parsers/ZX8081.hpp b/Storage/Tape/Parsers/ZX8081.hpp index a3f3b8de7..88a25cc1d 100644 --- a/Storage/Tape/Parsers/ZX8081.hpp +++ b/Storage/Tape/Parsers/ZX8081.hpp @@ -17,9 +17,7 @@ #include #include -namespace Storage { -namespace Tape { -namespace ZX8081 { +namespace Storage::Tape::ZX8081 { enum class WaveType { Pulse, Gap, LongGap, Unrecognised @@ -57,8 +55,6 @@ class Parser: public Storage::Tape::PulseClassificationParser> get_next_file_data(const std::shared_ptr &tape); }; -} -} } #endif /* ZX8081_hpp */ diff --git a/Storage/Tape/PulseQueuedTape.hpp b/Storage/Tape/PulseQueuedTape.hpp index a55e717be..f050becb8 100644 --- a/Storage/Tape/PulseQueuedTape.hpp +++ b/Storage/Tape/PulseQueuedTape.hpp @@ -12,8 +12,7 @@ #include "Tape.hpp" #include -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Provides a @c Tape with a queue of upcoming pulses and an is-at-end flag. @@ -48,7 +47,6 @@ class PulseQueuedTape: public Tape { bool is_at_end_; }; -} } #endif /* PulseQueuedTape_hpp */ diff --git a/Storage/Tape/Tape.hpp b/Storage/Tape/Tape.hpp index 19e5bffbb..2fd566bda 100644 --- a/Storage/Tape/Tape.hpp +++ b/Storage/Tape/Tape.hpp @@ -18,8 +18,7 @@ #include "../../Activity/Source.hpp" -namespace Storage { -namespace Tape { +namespace Storage::Tape { /*! Models a tape as a sequence of pulses, each pulse being of arbitrary length and described @@ -164,7 +163,6 @@ class BinaryTapePlayer : public TapePlayer { Activity::Observer *observer_ = nullptr; }; -} } #endif /* Tape_hpp */