aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/nvdrv
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2021-05-16 01:46:30 -0400
committerLioncash <mathew1800@gmail.com>2021-05-16 03:43:16 -0400
commit9a07ed53ebe4e27ef1a14e0469037cab9fb7b1e7 (patch)
tree54d6c5a6b319a10522b068caf2b0600c8f27876a /src/core/hle/service/nvdrv
parent06c410ee882885e67260b963c3b86f4cf3c7de98 (diff)
core: Make variable shadowing a compile-time error
Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
Diffstat (limited to 'src/core/hle/service/nvdrv')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvdevice.h2
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h12
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h12
-rw-r--r--src/core/hle/service/nvdrv/syncpoint_manager.cpp2
-rw-r--r--src/core/hle/service/nvdrv/syncpoint_manager.h2
5 files changed, 15 insertions, 15 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvdevice.h b/src/core/hle/service/nvdrv/devices/nvdevice.h
index b37f023df..5b73a5a34 100644
--- a/src/core/hle/service/nvdrv/devices/nvdevice.h
+++ b/src/core/hle/service/nvdrv/devices/nvdevice.h
@@ -21,7 +21,7 @@ namespace Service::Nvidia::Devices {
/// implement the ioctl interface.
class nvdevice {
public:
- explicit nvdevice(Core::System& system) : system{system} {}
+ explicit nvdevice(Core::System& system_) : system{system_} {}
virtual ~nvdevice() = default;
/**
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 229bf6350..24e3151cb 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
@@ -48,13 +48,13 @@ private:
public:
constexpr BufferMap() = default;
- constexpr BufferMap(GPUVAddr start_addr, std::size_t size)
- : start_addr{start_addr}, end_addr{start_addr + size} {}
+ constexpr BufferMap(GPUVAddr start_addr_, std::size_t size_)
+ : start_addr{start_addr_}, end_addr{start_addr_ + size_} {}
- constexpr BufferMap(GPUVAddr start_addr, std::size_t size, VAddr cpu_addr,
- bool is_allocated)
- : start_addr{start_addr}, end_addr{start_addr + size}, cpu_addr{cpu_addr},
- is_allocated{is_allocated} {}
+ constexpr BufferMap(GPUVAddr start_addr_, std::size_t size_, VAddr cpu_addr_,
+ bool is_allocated_)
+ : start_addr{start_addr_}, end_addr{start_addr_ + size_}, cpu_addr{cpu_addr_},
+ is_allocated{is_allocated_} {}
constexpr VAddr StartAddr() const {
return start_addr;
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h
index 14d0d210a..da10f5f41 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h
@@ -27,13 +27,13 @@ protected:
public:
constexpr BufferMap() = default;
- constexpr BufferMap(GPUVAddr start_addr, std::size_t size)
- : start_addr{start_addr}, end_addr{start_addr + size} {}
+ constexpr BufferMap(GPUVAddr start_addr_, std::size_t size_)
+ : start_addr{start_addr_}, end_addr{start_addr_ + size_} {}
- constexpr BufferMap(GPUVAddr start_addr, std::size_t size, VAddr cpu_addr,
- bool is_allocated)
- : start_addr{start_addr}, end_addr{start_addr + size}, cpu_addr{cpu_addr},
- is_allocated{is_allocated} {}
+ constexpr BufferMap(GPUVAddr start_addr_, std::size_t size_, VAddr cpu_addr_,
+ bool is_allocated_)
+ : start_addr{start_addr_}, end_addr{start_addr_ + size_}, cpu_addr{cpu_addr_},
+ is_allocated{is_allocated_} {}
constexpr VAddr StartAddr() const {
return start_addr;
diff --git a/src/core/hle/service/nvdrv/syncpoint_manager.cpp b/src/core/hle/service/nvdrv/syncpoint_manager.cpp
index 0151a03b7..3b6f55526 100644
--- a/src/core/hle/service/nvdrv/syncpoint_manager.cpp
+++ b/src/core/hle/service/nvdrv/syncpoint_manager.cpp
@@ -8,7 +8,7 @@
namespace Service::Nvidia {
-SyncpointManager::SyncpointManager(Tegra::GPU& gpu) : gpu{gpu} {}
+SyncpointManager::SyncpointManager(Tegra::GPU& gpu_) : gpu{gpu_} {}
SyncpointManager::~SyncpointManager() = default;
diff --git a/src/core/hle/service/nvdrv/syncpoint_manager.h b/src/core/hle/service/nvdrv/syncpoint_manager.h
index d395c5d0b..99f286474 100644
--- a/src/core/hle/service/nvdrv/syncpoint_manager.h
+++ b/src/core/hle/service/nvdrv/syncpoint_manager.h
@@ -18,7 +18,7 @@ namespace Service::Nvidia {
class SyncpointManager final {
public:
- explicit SyncpointManager(Tegra::GPU& gpu);
+ explicit SyncpointManager(Tegra::GPU& gpu_);
~SyncpointManager();
/**