summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2021-04-26 09:11:33 -0400
committerGravatar Lioncash2021-04-26 09:39:49 -0400
commitdcb91ca4a4a97d279d01ebe010e07298acca1ba9 (patch)
tree873cdb75aadc3be02c833c205d8e37c375fa49dd /src
parentMerge pull request #6198 from Kewlan/favorite-games (diff)
downloadyuzu-dcb91ca4a4a97d279d01ebe010e07298acca1ba9.tar.gz
yuzu-dcb91ca4a4a97d279d01ebe010e07298acca1ba9.tar.xz
yuzu-dcb91ca4a4a97d279d01ebe010e07298acca1ba9.zip
service: Eliminate cases of member shadowing
Resolves a few localized instances of member variable shadowing. Brings us a little closer to turning shadowing warnings into errors.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/applets/error.cpp6
-rw-r--r--src/core/hle/service/am/applets/general_backend.cpp2
-rw-r--r--src/core/hle/service/bcat/backend/boxcat.cpp4
-rw-r--r--src/core/hle/service/bcat/module.cpp22
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp21
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp14
-rw-r--r--src/core/hle/service/time/standard_user_system_clock_core.cpp4
-rw-r--r--src/core/hle/service/time/standard_user_system_clock_core.h2
-rw-r--r--src/core/hle/service/time/system_clock_core.cpp10
-rw-r--r--src/core/hle/service/time/system_clock_core.h2
-rw-r--r--src/core/hle/service/time/time_manager.cpp22
-rw-r--r--src/core/hle/service/time/time_sharedmemory.cpp3
-rw-r--r--src/core/hle/service/time/time_sharedmemory.h4
-rw-r--r--src/core/hle/service/vi/display/vi_display.cpp25
-rw-r--r--src/core/hle/service/vi/display/vi_display.h16
15 files changed, 81 insertions, 76 deletions
diff --git a/src/core/hle/service/am/applets/error.cpp b/src/core/hle/service/am/applets/error.cpp
index 23e30aa45..0dd6ec68e 100644
--- a/src/core/hle/service/am/applets/error.cpp
+++ b/src/core/hle/service/am/applets/error.cpp
@@ -158,11 +158,11 @@ void Error::Execute() {
158 break; 158 break;
159 case ErrorAppletMode::ShowSystemError: 159 case ErrorAppletMode::ShowSystemError:
160 case ErrorAppletMode::ShowApplicationError: { 160 case ErrorAppletMode::ShowApplicationError: {
161 const auto system = mode == ErrorAppletMode::ShowSystemError; 161 const auto is_system = mode == ErrorAppletMode::ShowSystemError;
162 const auto& main_text = 162 const auto& main_text =
163 system ? args->system_error.main_text : args->application_error.main_text; 163 is_system ? args->system_error.main_text : args->application_error.main_text;
164 const auto& detail_text = 164 const auto& detail_text =
165 system ? args->system_error.detail_text : args->application_error.detail_text; 165 is_system ? args->system_error.detail_text : args->application_error.detail_text;
166 166
167 const auto main_text_string = 167 const auto main_text_string =
168 Common::StringFromFixedZeroTerminatedBuffer(main_text.data(), main_text.size()); 168 Common::StringFromFixedZeroTerminatedBuffer(main_text.data(), main_text.size());
diff --git a/src/core/hle/service/am/applets/general_backend.cpp b/src/core/hle/service/am/applets/general_backend.cpp
index b26abad36..b7483261e 100644
--- a/src/core/hle/service/am/applets/general_backend.cpp
+++ b/src/core/hle/service/am/applets/general_backend.cpp
@@ -96,7 +96,7 @@ void Auth::Execute() {
96 96
97 switch (type) { 97 switch (type) {
98 case AuthAppletType::ShowParentalAuthentication: { 98 case AuthAppletType::ShowParentalAuthentication: {
99 const auto callback = [this](bool successful) { AuthFinished(successful); }; 99 const auto callback = [this](bool is_successful) { AuthFinished(is_successful); };
100 100
101 if (arg0 == 1 && arg1 == 0 && arg2 == 1) { 101 if (arg0 == 1 && arg1 == 0 && arg2 == 1) {
102 // ShowAuthenticatorForConfiguration 102 // ShowAuthenticatorForConfiguration
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp
index 78c047bd2..cee1774d1 100644
--- a/src/core/hle/service/bcat/backend/boxcat.cpp
+++ b/src/core/hle/service/bcat/backend/boxcat.cpp
@@ -415,9 +415,9 @@ std::optional<std::vector<u8>> Boxcat::GetLaunchParameter(TitleIDVersion title)
415 if (Settings::values.bcat_boxcat_local) { 415 if (Settings::values.bcat_boxcat_local) {
416 LOG_INFO(Service_BCAT, "Boxcat using local data by override, skipping download."); 416 LOG_INFO(Service_BCAT, "Boxcat using local data by override, skipping download.");
417 } else { 417 } else {
418 Boxcat::Client client{path, title.title_id, title.build_id}; 418 Client launch_client{path, title.title_id, title.build_id};
419 419
420 const auto res = client.DownloadLaunchParam(); 420 const auto res = launch_client.DownloadLaunchParam();
421 if (res != DownloadResult::Success) { 421 if (res != DownloadResult::Success) {
422 LOG_ERROR(Service_BCAT, "Boxcat synchronization failed with error '{}'!", res); 422 LOG_ERROR(Service_BCAT, "Boxcat synchronization failed with error '{}'!", res);
423 423
diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp
index c7dd04a6e..285085f2a 100644
--- a/src/core/hle/service/bcat/module.cpp
+++ b/src/core/hle/service/bcat/module.cpp
@@ -174,9 +174,9 @@ private:
174 }; 174 };
175 175
176 std::shared_ptr<IDeliveryCacheProgressService> CreateProgressService(SyncType type) { 176 std::shared_ptr<IDeliveryCacheProgressService> CreateProgressService(SyncType type) {
177 auto& backend{progress.at(static_cast<std::size_t>(type))}; 177 auto& progress_backend{GetProgressBackend(type)};
178 return std::make_shared<IDeliveryCacheProgressService>(system, backend.GetEvent(), 178 return std::make_shared<IDeliveryCacheProgressService>(system, progress_backend.GetEvent(),
179 backend.GetImpl()); 179 progress_backend.GetImpl());
180 } 180 }
181 181
182 void RequestSyncDeliveryCache(Kernel::HLERequestContext& ctx) { 182 void RequestSyncDeliveryCache(Kernel::HLERequestContext& ctx) {
@@ -184,7 +184,7 @@ private:
184 184
185 backend.Synchronize({system.CurrentProcess()->GetTitleID(), 185 backend.Synchronize({system.CurrentProcess()->GetTitleID(),
186 GetCurrentBuildID(system.GetCurrentProcessBuildID())}, 186 GetCurrentBuildID(system.GetCurrentProcessBuildID())},
187 progress.at(static_cast<std::size_t>(SyncType::Normal))); 187 GetProgressBackend(SyncType::Normal));
188 188
189 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 189 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
190 rb.Push(RESULT_SUCCESS); 190 rb.Push(RESULT_SUCCESS);
@@ -201,8 +201,7 @@ private:
201 201
202 backend.SynchronizeDirectory({system.CurrentProcess()->GetTitleID(), 202 backend.SynchronizeDirectory({system.CurrentProcess()->GetTitleID(),
203 GetCurrentBuildID(system.GetCurrentProcessBuildID())}, 203 GetCurrentBuildID(system.GetCurrentProcessBuildID())},
204 name, 204 name, GetProgressBackend(SyncType::Directory));
205 progress.at(static_cast<std::size_t>(SyncType::Directory)));
206 205
207 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 206 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
208 rb.Push(RESULT_SUCCESS); 207 rb.Push(RESULT_SUCCESS);
@@ -265,9 +264,16 @@ private:
265 rb.Push(RESULT_SUCCESS); 264 rb.Push(RESULT_SUCCESS);
266 } 265 }
267 266
268 Backend& backend; 267 ProgressServiceBackend& GetProgressBackend(SyncType type) {
268 return progress.at(static_cast<size_t>(type));
269 }
269 270
270 std::array<ProgressServiceBackend, static_cast<std::size_t>(SyncType::Count)> progress; 271 const ProgressServiceBackend& GetProgressBackend(SyncType type) const {
272 return progress.at(static_cast<size_t>(type));
273 }
274
275 Backend& backend;
276 std::array<ProgressServiceBackend, static_cast<size_t>(SyncType::Count)> progress;
271}; 277};
272 278
273void Module::Interface::CreateBcatService(Kernel::HLERequestContext& ctx) { 279void Module::Interface::CreateBcatService(Kernel::HLERequestContext& ctx) {
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index a0215c4d7..7dc487e48 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -337,13 +337,14 @@ public:
337 const auto file_buffer = ctx.ReadBuffer(); 337 const auto file_buffer = ctx.ReadBuffer();
338 const std::string name = Common::StringFromBuffer(file_buffer); 338 const std::string name = Common::StringFromBuffer(file_buffer);
339 339
340 const u64 mode = rp.Pop<u64>(); 340 const u64 file_mode = rp.Pop<u64>();
341 const u32 size = rp.Pop<u32>(); 341 const u32 file_size = rp.Pop<u32>();
342 342
343 LOG_DEBUG(Service_FS, "called. file={}, mode=0x{:X}, size=0x{:08X}", name, mode, size); 343 LOG_DEBUG(Service_FS, "called. file={}, mode=0x{:X}, size=0x{:08X}", name, file_mode,
344 file_size);
344 345
345 IPC::ResponseBuilder rb{ctx, 2}; 346 IPC::ResponseBuilder rb{ctx, 2};
346 rb.Push(backend.CreateFile(name, size)); 347 rb.Push(backend.CreateFile(name, file_size));
347 } 348 }
348 349
349 void DeleteFile(Kernel::HLERequestContext& ctx) { 350 void DeleteFile(Kernel::HLERequestContext& ctx) {
@@ -935,8 +936,8 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
935void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { 936void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) {
936 LOG_DEBUG(Service_FS, "called"); 937 LOG_DEBUG(Service_FS, "called");
937 938
938 auto romfs = fsc.OpenRomFSCurrentProcess(); 939 auto current_romfs = fsc.OpenRomFSCurrentProcess();
939 if (romfs.Failed()) { 940 if (current_romfs.Failed()) {
940 // TODO (bunnei): Find the right error code to use here 941 // TODO (bunnei): Find the right error code to use here
941 LOG_CRITICAL(Service_FS, "no file system interface available!"); 942 LOG_CRITICAL(Service_FS, "no file system interface available!");
942 IPC::ResponseBuilder rb{ctx, 2}; 943 IPC::ResponseBuilder rb{ctx, 2};
@@ -944,7 +945,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) {
944 return; 945 return;
945 } 946 }
946 947
947 auto storage = std::make_shared<IStorage>(system, std::move(romfs.Unwrap())); 948 auto storage = std::make_shared<IStorage>(system, std::move(current_romfs.Unwrap()));
948 949
949 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 950 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
950 rb.Push(RESULT_SUCCESS); 951 rb.Push(RESULT_SUCCESS);
@@ -1010,10 +1011,10 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) {
1010 1011
1011 LOG_DEBUG(Service_FS, "called, program_index={}", program_index); 1012 LOG_DEBUG(Service_FS, "called, program_index={}", program_index);
1012 1013
1013 auto romfs = fsc.OpenPatchedRomFSWithProgramIndex( 1014 auto patched_romfs = fsc.OpenPatchedRomFSWithProgramIndex(
1014 system.CurrentProcess()->GetTitleID(), program_index, FileSys::ContentRecordType::Program); 1015 system.CurrentProcess()->GetTitleID(), program_index, FileSys::ContentRecordType::Program);
1015 1016
1016 if (romfs.Failed()) { 1017 if (patched_romfs.Failed()) {
1017 // TODO: Find the right error code to use here 1018 // TODO: Find the right error code to use here
1018 LOG_ERROR(Service_FS, "could not open storage with program_index={}", program_index); 1019 LOG_ERROR(Service_FS, "could not open storage with program_index={}", program_index);
1019 1020
@@ -1022,7 +1023,7 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) {
1022 return; 1023 return;
1023 } 1024 }
1024 1025
1025 auto storage = std::make_shared<IStorage>(system, std::move(romfs.Unwrap())); 1026 auto storage = std::make_shared<IStorage>(system, std::move(patched_romfs.Unwrap()));
1026 1027
1027 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 1028 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
1028 rb.Push(RESULT_SUCCESS); 1029 rb.Push(RESULT_SUCCESS);
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index 539b02bc4..c43593e7f 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -72,7 +72,7 @@ NVFlinger::NVFlinger(Core::System& system) : system(system) {
72 // Schedule the screen composition events 72 // Schedule the screen composition events
73 composition_event = Core::Timing::CreateEvent( 73 composition_event = Core::Timing::CreateEvent(
74 "ScreenComposition", [this](std::uintptr_t, std::chrono::nanoseconds ns_late) { 74 "ScreenComposition", [this](std::uintptr_t, std::chrono::nanoseconds ns_late) {
75 const auto guard = Lock(); 75 const auto lock_guard = Lock();
76 Compose(); 76 Compose();
77 77
78 const auto ticks = std::chrono::nanoseconds{GetNextTicks()}; 78 const auto ticks = std::chrono::nanoseconds{GetNextTicks()};
@@ -112,7 +112,7 @@ void NVFlinger::SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance) {
112} 112}
113 113
114std::optional<u64> NVFlinger::OpenDisplay(std::string_view name) { 114std::optional<u64> NVFlinger::OpenDisplay(std::string_view name) {
115 const auto guard = Lock(); 115 const auto lock_guard = Lock();
116 116
117 LOG_DEBUG(Service, "Opening \"{}\" display", name); 117 LOG_DEBUG(Service, "Opening \"{}\" display", name);
118 118
@@ -131,7 +131,7 @@ std::optional<u64> NVFlinger::OpenDisplay(std::string_view name) {
131} 131}
132 132
133std::optional<u64> NVFlinger::CreateLayer(u64 display_id) { 133std::optional<u64> NVFlinger::CreateLayer(u64 display_id) {
134 const auto guard = Lock(); 134 const auto lock_guard = Lock();
135 auto* const display = FindDisplay(display_id); 135 auto* const display = FindDisplay(display_id);
136 136
137 if (display == nullptr) { 137 if (display == nullptr) {
@@ -147,7 +147,7 @@ std::optional<u64> NVFlinger::CreateLayer(u64 display_id) {
147} 147}
148 148
149void NVFlinger::CloseLayer(u64 layer_id) { 149void NVFlinger::CloseLayer(u64 layer_id) {
150 const auto guard = Lock(); 150 const auto lock_guard = Lock();
151 151
152 for (auto& display : displays) { 152 for (auto& display : displays) {
153 display.CloseLayer(layer_id); 153 display.CloseLayer(layer_id);
@@ -155,7 +155,7 @@ void NVFlinger::CloseLayer(u64 layer_id) {
155} 155}
156 156
157std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) const { 157std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) const {
158 const auto guard = Lock(); 158 const auto lock_guard = Lock();
159 const auto* const layer = FindLayer(display_id, layer_id); 159 const auto* const layer = FindLayer(display_id, layer_id);
160 160
161 if (layer == nullptr) { 161 if (layer == nullptr) {
@@ -166,7 +166,7 @@ std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) co
166} 166}
167 167
168std::shared_ptr<Kernel::KReadableEvent> NVFlinger::FindVsyncEvent(u64 display_id) const { 168std::shared_ptr<Kernel::KReadableEvent> NVFlinger::FindVsyncEvent(u64 display_id) const {
169 const auto guard = Lock(); 169 const auto lock_guard = Lock();
170 auto* const display = FindDisplay(display_id); 170 auto* const display = FindDisplay(display_id);
171 171
172 if (display == nullptr) { 172 if (display == nullptr) {
@@ -177,7 +177,7 @@ std::shared_ptr<Kernel::KReadableEvent> NVFlinger::FindVsyncEvent(u64 display_id
177} 177}
178 178
179BufferQueue* NVFlinger::FindBufferQueue(u32 id) { 179BufferQueue* NVFlinger::FindBufferQueue(u32 id) {
180 const auto guard = Lock(); 180 const auto lock_guard = Lock();
181 const auto itr = std::find_if(buffer_queues.begin(), buffer_queues.end(), 181 const auto itr = std::find_if(buffer_queues.begin(), buffer_queues.end(),
182 [id](const auto& queue) { return queue->GetId() == id; }); 182 [id](const auto& queue) { return queue->GetId() == id; });
183 183
diff --git a/src/core/hle/service/time/standard_user_system_clock_core.cpp b/src/core/hle/service/time/standard_user_system_clock_core.cpp
index b9faa474e..3172acc5a 100644
--- a/src/core/hle/service/time/standard_user_system_clock_core.cpp
+++ b/src/core/hle/service/time/standard_user_system_clock_core.cpp
@@ -45,12 +45,12 @@ ResultCode StandardUserSystemClockCore::GetClockContext(Core::System& system,
45 return local_system_clock_core.GetClockContext(system, context); 45 return local_system_clock_core.GetClockContext(system, context);
46} 46}
47 47
48ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext& context) { 48ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext&) {
49 UNREACHABLE(); 49 UNREACHABLE();
50 return ERROR_NOT_IMPLEMENTED; 50 return ERROR_NOT_IMPLEMENTED;
51} 51}
52 52
53ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext& context) { 53ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext&) {
54 UNREACHABLE(); 54 UNREACHABLE();
55 return ERROR_NOT_IMPLEMENTED; 55 return ERROR_NOT_IMPLEMENTED;
56} 56}
diff --git a/src/core/hle/service/time/standard_user_system_clock_core.h b/src/core/hle/service/time/standard_user_system_clock_core.h
index aac44d72f..5bc8bf5c2 100644
--- a/src/core/hle/service/time/standard_user_system_clock_core.h
+++ b/src/core/hle/service/time/standard_user_system_clock_core.h
@@ -39,7 +39,7 @@ public:
39 } 39 }
40 40
41protected: 41protected:
42 ResultCode Flush(const SystemClockContext& context) override; 42 ResultCode Flush(const SystemClockContext&) override;
43 43
44 ResultCode SetClockContext(const SystemClockContext&) override; 44 ResultCode SetClockContext(const SystemClockContext&) override;
45 45
diff --git a/src/core/hle/service/time/system_clock_core.cpp b/src/core/hle/service/time/system_clock_core.cpp
index d31d4e2ca..46fc8c6c3 100644
--- a/src/core/hle/service/time/system_clock_core.cpp
+++ b/src/core/hle/service/time/system_clock_core.cpp
@@ -45,18 +45,18 @@ ResultCode SystemClockCore::SetCurrentTime(Core::System& system, s64 posix_time)
45 return Flush(clock_context); 45 return Flush(clock_context);
46} 46}
47 47
48ResultCode SystemClockCore::Flush(const SystemClockContext& context) { 48ResultCode SystemClockCore::Flush(const SystemClockContext& clock_context) {
49 if (!system_clock_context_update_callback) { 49 if (!system_clock_context_update_callback) {
50 return RESULT_SUCCESS; 50 return RESULT_SUCCESS;
51 } 51 }
52 return system_clock_context_update_callback->Update(context); 52 return system_clock_context_update_callback->Update(clock_context);
53} 53}
54 54
55ResultCode SystemClockCore::SetSystemClockContext(const SystemClockContext& context) { 55ResultCode SystemClockCore::SetSystemClockContext(const SystemClockContext& clock_context) {
56 if (const ResultCode result{SetClockContext(context)}; result != RESULT_SUCCESS) { 56 if (const ResultCode result{SetClockContext(clock_context)}; result != RESULT_SUCCESS) {
57 return result; 57 return result;
58 } 58 }
59 return Flush(context); 59 return Flush(clock_context);
60} 60}
61 61
62bool SystemClockCore::IsClockSetup(Core::System& system) const { 62bool SystemClockCore::IsClockSetup(Core::System& system) const {
diff --git a/src/core/hle/service/time/system_clock_core.h b/src/core/hle/service/time/system_clock_core.h
index 608dd3b2e..82a8b79ff 100644
--- a/src/core/hle/service/time/system_clock_core.h
+++ b/src/core/hle/service/time/system_clock_core.h
@@ -43,7 +43,7 @@ public:
43 return RESULT_SUCCESS; 43 return RESULT_SUCCESS;
44 } 44 }
45 45
46 virtual ResultCode Flush(const SystemClockContext& context); 46 virtual ResultCode Flush(const SystemClockContext& clock_context);
47 47
48 void SetUpdateCallbackInstance(std::shared_ptr<SystemClockContextUpdateCallback> callback) { 48 void SetUpdateCallbackInstance(std::shared_ptr<SystemClockContextUpdateCallback> callback) {
49 system_clock_context_update_callback = std::move(callback); 49 system_clock_context_update_callback = std::move(callback);
diff --git a/src/core/hle/service/time/time_manager.cpp b/src/core/hle/service/time/time_manager.cpp
index f89c5aaad..fe01a3739 100644
--- a/src/core/hle/service/time/time_manager.cpp
+++ b/src/core/hle/service/time/time_manager.cpp
@@ -129,7 +129,7 @@ struct TimeManager::Impl final {
129 return 0; 129 return 0;
130 } 130 }
131 131
132 void SetupStandardSteadyClock(Core::System& system, Common::UUID clock_source_id, 132 void SetupStandardSteadyClock(Core::System& system_, Common::UUID clock_source_id,
133 Clock::TimeSpanType setup_value, 133 Clock::TimeSpanType setup_value,
134 Clock::TimeSpanType internal_offset, bool is_rtc_reset_detected) { 134 Clock::TimeSpanType internal_offset, bool is_rtc_reset_detected) {
135 standard_steady_clock_core.SetClockSourceId(clock_source_id); 135 standard_steady_clock_core.SetClockSourceId(clock_source_id);
@@ -137,21 +137,21 @@ struct TimeManager::Impl final {
137 standard_steady_clock_core.SetInternalOffset(internal_offset); 137 standard_steady_clock_core.SetInternalOffset(internal_offset);
138 standard_steady_clock_core.MarkAsInitialized(); 138 standard_steady_clock_core.MarkAsInitialized();
139 139
140 const auto current_time_point{standard_steady_clock_core.GetCurrentRawTimePoint(system)}; 140 const auto current_time_point{standard_steady_clock_core.GetCurrentRawTimePoint(system_)};
141 shared_memory.SetupStandardSteadyClock(system, clock_source_id, current_time_point); 141 shared_memory.SetupStandardSteadyClock(clock_source_id, current_time_point);
142 } 142 }
143 143
144 void SetupStandardLocalSystemClock(Core::System& system, 144 void SetupStandardLocalSystemClock(Core::System& system_,
145 Clock::SystemClockContext clock_context, s64 posix_time) { 145 Clock::SystemClockContext clock_context, s64 posix_time) {
146 standard_local_system_clock_core.SetUpdateCallbackInstance( 146 standard_local_system_clock_core.SetUpdateCallbackInstance(
147 local_system_clock_context_writer); 147 local_system_clock_context_writer);
148 148
149 const auto current_time_point{ 149 const auto current_time_point{
150 standard_local_system_clock_core.GetSteadyClockCore().GetCurrentTimePoint(system)}; 150 standard_local_system_clock_core.GetSteadyClockCore().GetCurrentTimePoint(system_)};
151 if (current_time_point.clock_source_id == clock_context.steady_time_point.clock_source_id) { 151 if (current_time_point.clock_source_id == clock_context.steady_time_point.clock_source_id) {
152 standard_local_system_clock_core.SetSystemClockContext(clock_context); 152 standard_local_system_clock_core.SetSystemClockContext(clock_context);
153 } else { 153 } else {
154 if (standard_local_system_clock_core.SetCurrentTime(system, posix_time) != 154 if (standard_local_system_clock_core.SetCurrentTime(system_, posix_time) !=
155 RESULT_SUCCESS) { 155 RESULT_SUCCESS) {
156 UNREACHABLE(); 156 UNREACHABLE();
157 return; 157 return;
@@ -177,10 +177,10 @@ struct TimeManager::Impl final {
177 standard_network_system_clock_core.MarkAsInitialized(); 177 standard_network_system_clock_core.MarkAsInitialized();
178 } 178 }
179 179
180 void SetupStandardUserSystemClock(Core::System& system, bool is_automatic_correction_enabled, 180 void SetupStandardUserSystemClock(Core::System& system_, bool is_automatic_correction_enabled,
181 Clock::SteadyClockTimePoint steady_clock_time_point) { 181 Clock::SteadyClockTimePoint steady_clock_time_point) {
182 if (standard_user_system_clock_core.SetAutomaticCorrectionEnabled( 182 if (standard_user_system_clock_core.SetAutomaticCorrectionEnabled(
183 system, is_automatic_correction_enabled) != RESULT_SUCCESS) { 183 system_, is_automatic_correction_enabled) != RESULT_SUCCESS) {
184 UNREACHABLE(); 184 UNREACHABLE();
185 return; 185 return;
186 } 186 }
@@ -196,10 +196,10 @@ struct TimeManager::Impl final {
196 ephemeral_network_system_clock_core.MarkAsInitialized(); 196 ephemeral_network_system_clock_core.MarkAsInitialized();
197 } 197 }
198 198
199 void UpdateLocalSystemClockTime(Core::System& system, s64 posix_time) { 199 void UpdateLocalSystemClockTime(Core::System& system_, s64 posix_time) {
200 const auto timespan{Service::Time::Clock::TimeSpanType::FromSeconds(posix_time)}; 200 const auto timespan{Clock::TimeSpanType::FromSeconds(posix_time)};
201 if (GetStandardLocalSystemClockCore() 201 if (GetStandardLocalSystemClockCore()
202 .SetCurrentTime(system, timespan.ToSeconds()) 202 .SetCurrentTime(system_, timespan.ToSeconds())
203 .IsError()) { 203 .IsError()) {
204 UNREACHABLE(); 204 UNREACHABLE();
205 return; 205 return;
diff --git a/src/core/hle/service/time/time_sharedmemory.cpp b/src/core/hle/service/time/time_sharedmemory.cpp
index 4d8de81be..018ce94ed 100644
--- a/src/core/hle/service/time/time_sharedmemory.cpp
+++ b/src/core/hle/service/time/time_sharedmemory.cpp
@@ -26,8 +26,7 @@ std::shared_ptr<Kernel::KSharedMemory> SharedMemory::GetSharedMemoryHolder() con
26 return shared_memory_holder; 26 return shared_memory_holder;
27} 27}
28 28
29void SharedMemory::SetupStandardSteadyClock(Core::System& system, 29void SharedMemory::SetupStandardSteadyClock(const Common::UUID& clock_source_id,
30 const Common::UUID& clock_source_id,
31 Clock::TimeSpanType current_time_point) { 30 Clock::TimeSpanType current_time_point) {
32 const Clock::TimeSpanType ticks_time_span{Clock::TimeSpanType::FromTicks( 31 const Clock::TimeSpanType ticks_time_span{Clock::TimeSpanType::FromTicks(
33 system.CoreTiming().GetClockTicks(), Core::Hardware::CNTFREQ)}; 32 system.CoreTiming().GetClockTicks(), Core::Hardware::CNTFREQ)};
diff --git a/src/core/hle/service/time/time_sharedmemory.h b/src/core/hle/service/time/time_sharedmemory.h
index 299680517..3bc749114 100644
--- a/src/core/hle/service/time/time_sharedmemory.h
+++ b/src/core/hle/service/time/time_sharedmemory.h
@@ -56,8 +56,8 @@ public:
56 }; 56 };
57 static_assert(sizeof(Format) == 0xd8, "Format is an invalid size"); 57 static_assert(sizeof(Format) == 0xd8, "Format is an invalid size");
58 58
59 void SetupStandardSteadyClock(Core::System& system, const Common::UUID& clock_source_id, 59 void SetupStandardSteadyClock(const Common::UUID& clock_source_id,
60 Clock::TimeSpanType currentTimePoint); 60 Clock::TimeSpanType current_time_point);
61 void UpdateLocalSystemClockContext(const Clock::SystemClockContext& context); 61 void UpdateLocalSystemClockContext(const Clock::SystemClockContext& context);
62 void UpdateNetworkSystemClockContext(const Clock::SystemClockContext& context); 62 void UpdateNetworkSystemClockContext(const Clock::SystemClockContext& context);
63 void SetAutomaticCorrectionEnabled(bool is_enabled); 63 void SetAutomaticCorrectionEnabled(bool is_enabled);
diff --git a/src/core/hle/service/vi/display/vi_display.cpp b/src/core/hle/service/vi/display/vi_display.cpp
index 7f42aa4a0..ac9e87338 100644
--- a/src/core/hle/service/vi/display/vi_display.cpp
+++ b/src/core/hle/service/vi/display/vi_display.cpp
@@ -41,24 +41,22 @@ void Display::SignalVSyncEvent() {
41 vsync_event->GetWritableEvent()->Signal(); 41 vsync_event->GetWritableEvent()->Signal();
42} 42}
43 43
44void Display::CreateLayer(u64 id, NVFlinger::BufferQueue& buffer_queue) { 44void Display::CreateLayer(u64 layer_id, NVFlinger::BufferQueue& buffer_queue) {
45 // TODO(Subv): Support more than 1 layer. 45 // TODO(Subv): Support more than 1 layer.
46 ASSERT_MSG(layers.empty(), "Only one layer is supported per display at the moment"); 46 ASSERT_MSG(layers.empty(), "Only one layer is supported per display at the moment");
47 47
48 layers.emplace_back(std::make_shared<Layer>(id, buffer_queue)); 48 layers.emplace_back(std::make_shared<Layer>(layer_id, buffer_queue));
49} 49}
50 50
51void Display::CloseLayer(u64 id) { 51void Display::CloseLayer(u64 layer_id) {
52 layers.erase( 52 std::erase_if(layers, [layer_id](const auto& layer) { return layer->GetID() == layer_id; });
53 std::remove_if(layers.begin(), layers.end(),
54 [id](const std::shared_ptr<Layer>& layer) { return layer->GetID() == id; }),
55 layers.end());
56} 53}
57 54
58Layer* Display::FindLayer(u64 id) { 55Layer* Display::FindLayer(u64 layer_id) {
59 const auto itr = 56 const auto itr =
60 std::find_if(layers.begin(), layers.end(), 57 std::find_if(layers.begin(), layers.end(), [layer_id](const std::shared_ptr<Layer>& layer) {
61 [id](const std::shared_ptr<Layer>& layer) { return layer->GetID() == id; }); 58 return layer->GetID() == layer_id;
59 });
62 60
63 if (itr == layers.end()) { 61 if (itr == layers.end()) {
64 return nullptr; 62 return nullptr;
@@ -67,10 +65,11 @@ Layer* Display::FindLayer(u64 id) {
67 return itr->get(); 65 return itr->get();
68} 66}
69 67
70const Layer* Display::FindLayer(u64 id) const { 68const Layer* Display::FindLayer(u64 layer_id) const {
71 const auto itr = 69 const auto itr =
72 std::find_if(layers.begin(), layers.end(), 70 std::find_if(layers.begin(), layers.end(), [layer_id](const std::shared_ptr<Layer>& layer) {
73 [id](const std::shared_ptr<Layer>& layer) { return layer->GetID() == id; }); 71 return layer->GetID() == layer_id;
72 });
74 73
75 if (itr == layers.end()) { 74 if (itr == layers.end()) {
76 return nullptr; 75 return nullptr;
diff --git a/src/core/hle/service/vi/display/vi_display.h b/src/core/hle/service/vi/display/vi_display.h
index 931c898f6..8340059de 100644
--- a/src/core/hle/service/vi/display/vi_display.h
+++ b/src/core/hle/service/vi/display/vi_display.h
@@ -68,34 +68,34 @@ public:
68 68
69 /// Creates and adds a layer to this display with the given ID. 69 /// Creates and adds a layer to this display with the given ID.
70 /// 70 ///
71 /// @param id The ID to assign to the created layer. 71 /// @param layer_id The ID to assign to the created layer.
72 /// @param buffer_queue The buffer queue for the layer instance to use. 72 /// @param buffer_queue The buffer queue for the layer instance to use.
73 /// 73 ///
74 void CreateLayer(u64 id, NVFlinger::BufferQueue& buffer_queue); 74 void CreateLayer(u64 layer_id, NVFlinger::BufferQueue& buffer_queue);
75 75
76 /// Closes and removes a layer from this display with the given ID. 76 /// Closes and removes a layer from this display with the given ID.
77 /// 77 ///
78 /// @param id The ID assigned to the layer to close. 78 /// @param layer_id The ID assigned to the layer to close.
79 /// 79 ///
80 void CloseLayer(u64 id); 80 void CloseLayer(u64 layer_id);
81 81
82 /// Attempts to find a layer with the given ID. 82 /// Attempts to find a layer with the given ID.
83 /// 83 ///
84 /// @param id The layer ID. 84 /// @param layer_id The layer ID.
85 /// 85 ///
86 /// @returns If found, the Layer instance with the given ID. 86 /// @returns If found, the Layer instance with the given ID.
87 /// If not found, then nullptr is returned. 87 /// If not found, then nullptr is returned.
88 /// 88 ///
89 Layer* FindLayer(u64 id); 89 Layer* FindLayer(u64 layer_id);
90 90
91 /// Attempts to find a layer with the given ID. 91 /// Attempts to find a layer with the given ID.
92 /// 92 ///
93 /// @param id The layer ID. 93 /// @param layer_id The layer ID.
94 /// 94 ///
95 /// @returns If found, the Layer instance with the given ID. 95 /// @returns If found, the Layer instance with the given ID.
96 /// If not found, then nullptr is returned. 96 /// If not found, then nullptr is returned.
97 /// 97 ///
98 const Layer* FindLayer(u64 id) const; 98 const Layer* FindLayer(u64 layer_id) const;
99 99
100private: 100private:
101 u64 id; 101 u64 id;