From 1b565f9879eb2a203f1ed09721d99c963fbfc5ae Mon Sep 17 00:00:00 2001 From: scribam Date: Sat, 22 Jul 2023 16:59:15 +0200 Subject: [PATCH] clang-tidy: run modernize-concat-nested-namespaces --- core/hw/aica/dsp.cpp | 8 ++------ core/hw/aica/dsp.h | 8 ++------ core/hw/aica/dsp_x64.cpp | 8 ++------ core/hw/aica/sgc_if.cpp | 8 ++------ core/hw/aica/sgc_if.h | 8 ++------ core/hw/arm7/arm7.cpp | 8 ++------ core/hw/arm7/arm7.h | 8 ++------ core/hw/arm7/arm7_rec.cpp | 8 ++------ core/hw/arm7/arm7_rec.h | 8 ++------ core/hw/arm7/arm7_rec_x64.cpp | 7 ++----- core/hw/arm7/arm_mem.cpp | 8 ++------ core/hw/arm7/arm_mem.h | 8 ++------ 12 files changed, 24 insertions(+), 71 deletions(-) diff --git a/core/hw/aica/dsp.cpp b/core/hw/aica/dsp.cpp index 66e7bc298..7cbbfc393 100644 --- a/core/hw/aica/dsp.cpp +++ b/core/hw/aica/dsp.cpp @@ -16,10 +16,7 @@ Initial code by skmp, now part of the reicast project. See LICENSE & COPYRIGHT files further details */ -namespace aica -{ - -namespace dsp +namespace aica::dsp { DSPState state; @@ -152,5 +149,4 @@ void step() runStep(); } -} // namespace dsp -} // namespace aica +} // namespace aica::dsp diff --git a/core/hw/aica/dsp.h b/core/hw/aica/dsp.h index a37a48523..3f6f37e3c 100644 --- a/core/hw/aica/dsp.h +++ b/core/hw/aica/dsp.h @@ -2,10 +2,7 @@ #include "types.h" #include "serialize.h" -namespace aica -{ - -namespace dsp +namespace aica::dsp { struct DSPState @@ -104,5 +101,4 @@ void DecodeInst(const u32 *IPtr, Instruction *i); u16 DYNACALL PACK(s32 val); s32 DYNACALL UNPACK(u16 val); -} // namespace dsp -} // namespace aica +} // namespace aica::dsp diff --git a/core/hw/aica/dsp_x64.cpp b/core/hw/aica/dsp_x64.cpp index 07c4a1498..b65d7ddf1 100644 --- a/core/hw/aica/dsp_x64.cpp +++ b/core/hw/aica/dsp_x64.cpp @@ -27,10 +27,7 @@ #include "aica_if.h" #include "oslib/virtmem.h" -namespace aica -{ - -namespace dsp +namespace aica::dsp { constexpr size_t CodeBufferSize = 32_KB; @@ -450,6 +447,5 @@ void runStep() ((void (*)())&pCodeBuffer[0])(); } -} // namespace dsp -} // namespace aica +} // namespace aica::dsp #endif diff --git a/core/hw/aica/sgc_if.cpp b/core/hw/aica/sgc_if.cpp index 3e4d03882..a92e71770 100755 --- a/core/hw/aica/sgc_if.cpp +++ b/core/hw/aica/sgc_if.cpp @@ -45,10 +45,7 @@ #define clip_verify(x) #endif -namespace aica -{ - -namespace sgc +namespace aica::sgc { //Sound generation, mixin, and channel regs emulation //x.15 @@ -1622,5 +1619,4 @@ void deserialize(Deserializer& deser) } } -} // namespace sgc -} // namespace aica +} // namespace aica::sgc diff --git a/core/hw/aica/sgc_if.h b/core/hw/aica/sgc_if.h index 83a1a633c..a7c065bb9 100644 --- a/core/hw/aica/sgc_if.h +++ b/core/hw/aica/sgc_if.h @@ -1,10 +1,7 @@ #pragma once #include "types.h" -namespace aica -{ - -namespace sgc +namespace aica::sgc { void AICA_Sample(); @@ -62,5 +59,4 @@ void serialize(Serializer& ctx); void deserialize(Deserializer& ctx); void vmuBeep(int on, int period); -} // namespace sgc -} // namespace aica +} // namespace aica::sgc diff --git a/core/hw/arm7/arm7.cpp b/core/hw/arm7/arm7.cpp index 8c874d29e..351aeaeff 100644 --- a/core/hw/arm7/arm7.cpp +++ b/core/hw/arm7/arm7.cpp @@ -2,10 +2,7 @@ #include "arm_mem.h" #include "arm7_rec.h" -namespace aica -{ - -namespace arm +namespace aica::arm { #define CPUReadMemoryQuick(addr) (*(u32*)&aica_ram[(addr) & ARAM_MASK]) @@ -409,5 +406,4 @@ template void DYNACALL MSR_do<1>(u32 v); } // namespace recompiler #endif // FEAT_AREC != DYNAREC_NONE -} // namespace arm -} // namespace aica +} // namespace aica::arm diff --git a/core/hw/arm7/arm7.h b/core/hw/arm7/arm7.h index 3fcba34f6..5d9efe065 100644 --- a/core/hw/arm7/arm7.h +++ b/core/hw/arm7/arm7.h @@ -1,10 +1,7 @@ #pragma once #include "types.h" -namespace aica -{ - -namespace arm +namespace aica::arm { void init(); @@ -114,5 +111,4 @@ extern bool Arm7Enabled; void CPUFiq(); void CPUUpdateCPSR(); -} // namespace arm -} // namespace aica +} // namespace aica::arm diff --git a/core/hw/arm7/arm7_rec.cpp b/core/hw/arm7/arm7_rec.cpp index 508a4e306..d785ebbeb 100644 --- a/core/hw/arm7/arm7_rec.cpp +++ b/core/hw/arm7/arm7_rec.cpp @@ -34,10 +34,7 @@ #include #endif -namespace aica -{ - -namespace arm +namespace aica::arm { #define arm_printf(...) DEBUG_LOG(AICA_ARM, __VA_ARGS__) @@ -770,6 +767,5 @@ void avoidRaceCondition() arm_Reg[CYCL_CNT].I = std::max((int)arm_Reg[CYCL_CNT].I, 50); } -} // namespace arm -} // namespace aica +} // namespace aica::arm #endif // FEAT_AREC != DYNAREC_NONE diff --git a/core/hw/arm7/arm7_rec.h b/core/hw/arm7/arm7_rec.h index 5a827af10..6bc147459 100644 --- a/core/hw/arm7/arm7_rec.h +++ b/core/hw/arm7/arm7_rec.h @@ -23,10 +23,7 @@ #include #include -namespace aica -{ - -namespace arm +namespace aica::arm { struct ArmOp @@ -468,5 +465,4 @@ extern void (*arm_compilecode)(); using arm_mainloop_t = void (*)(reg_pair *arm_regs, void (*entrypoints[])()); extern arm_mainloop_t arm_mainloop; -} // namespace arm -} // namespace aica +} // namespace aica::arm diff --git a/core/hw/arm7/arm7_rec_x64.cpp b/core/hw/arm7/arm7_rec_x64.cpp index 4064ab2b4..cfe83723f 100644 --- a/core/hw/arm7/arm7_rec_x64.cpp +++ b/core/hw/arm7/arm7_rec_x64.cpp @@ -29,9 +29,7 @@ using namespace Xbyak::util; #include "oslib/oslib.h" #include "oslib/virtmem.h" -namespace aica -{ -namespace arm +namespace aica::arm { static void (*arm_dispatch)(); @@ -1022,6 +1020,5 @@ void arm7backend_flush() virtmem::jit_set_exec(protStart, protSize, true); } -} // namespace arm -} // namespace aica +} // namespace aica::arm #endif // X64 && DYNAREC_JIT diff --git a/core/hw/arm7/arm_mem.cpp b/core/hw/arm7/arm_mem.cpp index 423d1231e..180d53385 100644 --- a/core/hw/arm7/arm_mem.cpp +++ b/core/hw/arm7/arm_mem.cpp @@ -1,10 +1,7 @@ #include "arm_mem.h" #include "hw/aica/aica_mem.h" -namespace aica -{ - -namespace arm +namespace aica::arm { #define REG_L (0x2D00) @@ -97,5 +94,4 @@ template void writeReg<>(u32 adr, u8 data); template void writeReg<>(u32 adr, u16 data); template void writeReg<>(u32 adr, u32 data); -} // namespace arm -} // namespace aica +} // namespace aica::arm diff --git a/core/hw/arm7/arm_mem.h b/core/hw/arm7/arm_mem.h index 8936828c8..366b9b82b 100644 --- a/core/hw/arm7/arm_mem.h +++ b/core/hw/arm7/arm_mem.h @@ -2,10 +2,7 @@ #include "types.h" #include "hw/aica/aica_if.h" -namespace aica -{ - -namespace arm +namespace aica::arm { template T readReg(u32 addr); @@ -56,5 +53,4 @@ extern u32 e68k_reg_M; void update_armintc(); void interruptChange(u32 bits, u32 L); -} // namespace arm -} // namespace aica +} // namespace aica::arm