mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-30 13:58:03 -05:00
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.
This commit is contained in:
@ -17,8 +17,8 @@
|
||||
|
||||
namespace Service::VI {
|
||||
|
||||
Display::Display(u64 id, std::string name, Core::System& system)
|
||||
: id{id}, name{std::move(name)}, vsync_event{system.Kernel()} {
|
||||
Display::Display(u64 id, std::string name_, Core::System& system)
|
||||
: display_id{id}, name{std::move(name_)}, vsync_event{system.Kernel()} {
|
||||
Kernel::KAutoObject::Create(std::addressof(vsync_event));
|
||||
vsync_event.Initialize(fmt::format("Display VSync Event {}", id));
|
||||
}
|
||||
|
@ -32,14 +32,14 @@ public:
|
||||
/// Constructs a display with a given unique ID and name.
|
||||
///
|
||||
/// @param id The unique ID for this display.
|
||||
/// @param name The name for this display.
|
||||
/// @param name_ The name for this display.
|
||||
///
|
||||
Display(u64 id, std::string name, Core::System& system);
|
||||
Display(u64 id, std::string name_, Core::System& system);
|
||||
~Display();
|
||||
|
||||
/// Gets the unique ID assigned to this display.
|
||||
u64 GetID() const {
|
||||
return id;
|
||||
return display_id;
|
||||
}
|
||||
|
||||
/// Gets the name of this display
|
||||
@ -96,7 +96,7 @@ public:
|
||||
const Layer* FindLayer(u64 layer_id) const;
|
||||
|
||||
private:
|
||||
u64 id;
|
||||
u64 display_id;
|
||||
std::string name;
|
||||
|
||||
std::vector<std::shared_ptr<Layer>> layers;
|
||||
|
Reference in New Issue
Block a user