From ccca5e7c2872d477cc7bef73ed141dc093b106ef Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 19 Apr 2018 21:41:44 -0400 Subject: service: Use nested namespace specifiers where applicable Tidies up namespace declarations --- src/core/hle/service/nvdrv/devices/nvdevice.h | 8 ++------ src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp | 8 ++------ src/core/hle/service/nvdrv/devices/nvdisp_disp0.h | 8 ++------ src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | 8 ++------ src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h | 8 ++------ src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 8 ++------ src/core/hle/service/nvdrv/devices/nvhost_ctrl.h | 8 ++------ src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 8 ++------ src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h | 9 +++------ src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 8 ++------ src/core/hle/service/nvdrv/devices/nvhost_gpu.h | 8 ++------ src/core/hle/service/nvdrv/devices/nvmap.cpp | 8 ++------ src/core/hle/service/nvdrv/devices/nvmap.h | 8 ++------ 13 files changed, 27 insertions(+), 78 deletions(-) (limited to 'src/core/hle/service/nvdrv/devices') diff --git a/src/core/hle/service/nvdrv/devices/nvdevice.h b/src/core/hle/service/nvdrv/devices/nvdevice.h index cdc25b059..0f02a1a18 100644 --- a/src/core/hle/service/nvdrv/devices/nvdevice.h +++ b/src/core/hle/service/nvdrv/devices/nvdevice.h @@ -9,9 +9,7 @@ #include "common/common_types.h" #include "common/swap.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { /// Represents an abstract nvidia device node. It is to be subclassed by concrete device nodes to /// implement the ioctl interface. @@ -38,6 +36,4 @@ public: virtual u32 ioctl(Ioctl command, const std::vector& input, std::vector& output) = 0; }; -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp index 87b3a2d74..61f22b1a5 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp @@ -10,9 +10,7 @@ #include "video_core/renderer_base.h" #include "video_core/video_core.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { u32 nvdisp_disp0::ioctl(Ioctl command, const std::vector& input, std::vector& output) { UNIMPLEMENTED(); @@ -35,6 +33,4 @@ void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u3 VideoCore::g_renderer->SwapBuffers(framebuffer); } -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h index 66f56f23d..3d3979723 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h @@ -10,9 +10,7 @@ #include "core/hle/service/nvdrv/devices/nvdevice.h" #include "core/hle/service/nvflinger/buffer_queue.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { class nvmap; @@ -31,6 +29,4 @@ private: std::shared_ptr nvmap_dev; }; -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 9892402fa..71e844959 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp @@ -9,9 +9,7 @@ #include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h" #include "core/hle/service/nvdrv/devices/nvmap.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { u32 nvhost_as_gpu::ioctl(Ioctl command, const std::vector& input, std::vector& output) { LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", @@ -115,6 +113,4 @@ u32 nvhost_as_gpu::GetVARegions(const std::vector& input, std::vector& o return 0; } -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h index f8a60cce7..d86c3ebd9 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h @@ -11,9 +11,7 @@ #include "common/swap.h" #include "core/hle/service/nvdrv/devices/nvdevice.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { class nvmap; @@ -100,6 +98,4 @@ private: std::shared_ptr nvmap_dev; }; -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index 45711d686..660a0f665 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -6,9 +6,7 @@ #include "common/logging/log.h" #include "core/hle/service/nvdrv/devices/nvhost_ctrl.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector& input, std::vector& output) { LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", @@ -59,6 +57,4 @@ u32 nvhost_ctrl::IocCtrlEventWait(const std::vector& input, std::vector& return 0; } -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h index 0ca01aa6d..76a8b33c2 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h @@ -11,9 +11,7 @@ #include "common/common_types.h" #include "core/hle/service/nvdrv/devices/nvdevice.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { class nvhost_ctrl final : public nvdevice { public: @@ -55,6 +53,4 @@ private: u32 IocCtrlEventWait(const std::vector& input, std::vector& output); }; -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index 3b353d742..18ea12ef5 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp @@ -7,9 +7,7 @@ #include "common/logging/log.h" #include "core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector& input, std::vector& output) { LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", @@ -122,6 +120,4 @@ u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector& input, std::vector& return 0; } -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h index dc0476993..31040cdbe 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h @@ -9,9 +9,7 @@ #include "common/swap.h" #include "core/hle/service/nvdrv/devices/nvdevice.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { class nvhost_ctrl_gpu final : public nvdevice { public: @@ -125,6 +123,5 @@ private: u32 ZCullGetCtxSize(const std::vector& input, std::vector& output); u32 ZCullGetInfo(const std::vector& input, std::vector& output); }; -} // namespace Devices -} // namespace Nvidia -} // namespace Service + +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index da44c65f3..a16e90457 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -9,9 +9,7 @@ #include "core/core.h" #include "core/hle/service/nvdrv/devices/nvhost_gpu.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { u32 nvhost_gpu::ioctl(Ioctl command, const std::vector& input, std::vector& output) { LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", @@ -142,6 +140,4 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector& input, std::vector& outp return 0; } -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h index e7e9a0088..703c36bbb 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -10,9 +10,7 @@ #include "common/swap.h" #include "core/hle/service/nvdrv/devices/nvdevice.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { class nvmap; constexpr u32 NVGPU_IOCTL_MAGIC('H'); @@ -139,6 +137,4 @@ private: std::shared_ptr nvmap_dev; }; -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index b3842eb4c..4bb1f57f6 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp @@ -9,9 +9,7 @@ #include "common/logging/log.h" #include "core/hle/service/nvdrv/devices/nvmap.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { VAddr nvmap::GetObjectAddress(u32 handle) const { auto object = GetObject(handle); @@ -144,6 +142,4 @@ u32 nvmap::IocParam(const std::vector& input, std::vector& output) { return 0; } -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvmap.h b/src/core/hle/service/nvdrv/devices/nvmap.h index 4681e438b..431eb3773 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.h +++ b/src/core/hle/service/nvdrv/devices/nvmap.h @@ -12,9 +12,7 @@ #include "common/swap.h" #include "core/hle/service/nvdrv/devices/nvdevice.h" -namespace Service { -namespace Nvidia { -namespace Devices { +namespace Service::Nvidia::Devices { class nvmap final : public nvdevice { public: @@ -111,6 +109,4 @@ private: u32 IocParam(const std::vector& input, std::vector& output); }; -} // namespace Devices -} // namespace Nvidia -} // namespace Service +} // namespace Service::Nvidia::Devices -- cgit v1.2.3