[core/hle/service] remove duplicate Core::System& from some ServiceFramework (#4171)

services inheriting from ServiceFramework already have an accessible
system pointer from the inheritance
adding an extra pointer (m_system, often) isn't required and tis
entirely redundant.

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4171
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
lizzie 2026-07-07 19:59:58 +02:00 • committed by crueter
parent 1643d8766f
commit ce043aceb9
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
16 changed files with 87 additions and 72 deletions

View file

@ -23,11 +23,13 @@ TimeZoneService::TimeZoneService(
Core::System& system_, FileTimestampWorker& file_timestamp_worker,
bool can_write_timezone_device_location, TimeZoneBinary& time_zone_binary,
std::shared_ptr<Service::PSC::Time::TimeZoneService> time_zone_service)
: ServiceFramework{system_, "ITimeZoneService"}, m_system{system},
m_can_write_timezone_device_location{can_write_timezone_device_location},
m_file_timestamp_worker{file_timestamp_worker}, m_wrapped_service{std::move(
time_zone_service)},
m_operation_event{m_system}, m_time_zone_binary{time_zone_binary} {
: ServiceFramework{system_, "ITimeZoneService"}
, m_can_write_timezone_device_location{can_write_timezone_device_location}
, m_file_timestamp_worker{file_timestamp_worker}
, m_wrapped_service{std::move(time_zone_service)}
, m_operation_event{system}
, m_time_zone_binary{time_zone_binary}
{
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&TimeZoneService::GetDeviceLocationName>, "GetDeviceLocationName"},
@ -48,8 +50,7 @@ TimeZoneService::TimeZoneService(
// clang-format on
RegisterHandlers(functions);
m_set_sys =
m_system.ServiceManager().GetService<Service::Set::ISystemSettingsServer>("set:sys", true);
m_set_sys = system.ServiceManager().GetService<Service::Set::ISystemSettingsServer>("set:sys", true);
}
TimeZoneService::~TimeZoneService() = default;
@ -89,7 +90,7 @@ Result TimeZoneService::SetDeviceLocationName(
std::scoped_lock m{m_list_mutex};
for (auto& operation_event : m_list_nodes) {
operation_event.m_event->Signal(m_system.Kernel());
operation_event.m_event->Signal(system.Kernel());
}
R_SUCCEED();
}

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -77,9 +80,7 @@ public:
const Service::PSC::Time::CalendarTime& calendar_time);
private:
Core::System& m_system;
std::shared_ptr<Service::Set::ISystemSettingsServer> m_set_sys;
bool m_can_write_timezone_device_location;
FileTimestampWorker& m_file_timestamp_worker;
std::shared_ptr<Service::PSC::Time::TimeZoneService> m_wrapped_service;