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.
This commit is contained in:
parent
7412f314e4
commit
dcb91ca4a4
15 changed files with 81 additions and 76 deletions
|
@ -45,12 +45,12 @@ ResultCode StandardUserSystemClockCore::GetClockContext(Core::System& system,
|
|||
return local_system_clock_core.GetClockContext(system, context);
|
||||
}
|
||||
|
||||
ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext& context) {
|
||||
ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext&) {
|
||||
UNREACHABLE();
|
||||
return ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext& context) {
|
||||
ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext&) {
|
||||
UNREACHABLE();
|
||||
return ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
ResultCode Flush(const SystemClockContext& context) override;
|
||||
ResultCode Flush(const SystemClockContext&) override;
|
||||
|
||||
ResultCode SetClockContext(const SystemClockContext&) override;
|
||||
|
||||
|
|
|
@ -45,18 +45,18 @@ ResultCode SystemClockCore::SetCurrentTime(Core::System& system, s64 posix_time)
|
|||
return Flush(clock_context);
|
||||
}
|
||||
|
||||
ResultCode SystemClockCore::Flush(const SystemClockContext& context) {
|
||||
ResultCode SystemClockCore::Flush(const SystemClockContext& clock_context) {
|
||||
if (!system_clock_context_update_callback) {
|
||||
return RESULT_SUCCESS;
|
||||
}
|
||||
return system_clock_context_update_callback->Update(context);
|
||||
return system_clock_context_update_callback->Update(clock_context);
|
||||
}
|
||||
|
||||
ResultCode SystemClockCore::SetSystemClockContext(const SystemClockContext& context) {
|
||||
if (const ResultCode result{SetClockContext(context)}; result != RESULT_SUCCESS) {
|
||||
ResultCode SystemClockCore::SetSystemClockContext(const SystemClockContext& clock_context) {
|
||||
if (const ResultCode result{SetClockContext(clock_context)}; result != RESULT_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
return Flush(context);
|
||||
return Flush(clock_context);
|
||||
}
|
||||
|
||||
bool SystemClockCore::IsClockSetup(Core::System& system) const {
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
return RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
virtual ResultCode Flush(const SystemClockContext& context);
|
||||
virtual ResultCode Flush(const SystemClockContext& clock_context);
|
||||
|
||||
void SetUpdateCallbackInstance(std::shared_ptr<SystemClockContextUpdateCallback> callback) {
|
||||
system_clock_context_update_callback = std::move(callback);
|
||||
|
|
|
@ -129,7 +129,7 @@ struct TimeManager::Impl final {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void SetupStandardSteadyClock(Core::System& system, Common::UUID clock_source_id,
|
||||
void SetupStandardSteadyClock(Core::System& system_, Common::UUID clock_source_id,
|
||||
Clock::TimeSpanType setup_value,
|
||||
Clock::TimeSpanType internal_offset, bool is_rtc_reset_detected) {
|
||||
standard_steady_clock_core.SetClockSourceId(clock_source_id);
|
||||
|
@ -137,21 +137,21 @@ struct TimeManager::Impl final {
|
|||
standard_steady_clock_core.SetInternalOffset(internal_offset);
|
||||
standard_steady_clock_core.MarkAsInitialized();
|
||||
|
||||
const auto current_time_point{standard_steady_clock_core.GetCurrentRawTimePoint(system)};
|
||||
shared_memory.SetupStandardSteadyClock(system, clock_source_id, current_time_point);
|
||||
const auto current_time_point{standard_steady_clock_core.GetCurrentRawTimePoint(system_)};
|
||||
shared_memory.SetupStandardSteadyClock(clock_source_id, current_time_point);
|
||||
}
|
||||
|
||||
void SetupStandardLocalSystemClock(Core::System& system,
|
||||
void SetupStandardLocalSystemClock(Core::System& system_,
|
||||
Clock::SystemClockContext clock_context, s64 posix_time) {
|
||||
standard_local_system_clock_core.SetUpdateCallbackInstance(
|
||||
local_system_clock_context_writer);
|
||||
|
||||
const auto current_time_point{
|
||||
standard_local_system_clock_core.GetSteadyClockCore().GetCurrentTimePoint(system)};
|
||||
standard_local_system_clock_core.GetSteadyClockCore().GetCurrentTimePoint(system_)};
|
||||
if (current_time_point.clock_source_id == clock_context.steady_time_point.clock_source_id) {
|
||||
standard_local_system_clock_core.SetSystemClockContext(clock_context);
|
||||
} else {
|
||||
if (standard_local_system_clock_core.SetCurrentTime(system, posix_time) !=
|
||||
if (standard_local_system_clock_core.SetCurrentTime(system_, posix_time) !=
|
||||
RESULT_SUCCESS) {
|
||||
UNREACHABLE();
|
||||
return;
|
||||
|
@ -177,10 +177,10 @@ struct TimeManager::Impl final {
|
|||
standard_network_system_clock_core.MarkAsInitialized();
|
||||
}
|
||||
|
||||
void SetupStandardUserSystemClock(Core::System& system, bool is_automatic_correction_enabled,
|
||||
void SetupStandardUserSystemClock(Core::System& system_, bool is_automatic_correction_enabled,
|
||||
Clock::SteadyClockTimePoint steady_clock_time_point) {
|
||||
if (standard_user_system_clock_core.SetAutomaticCorrectionEnabled(
|
||||
system, is_automatic_correction_enabled) != RESULT_SUCCESS) {
|
||||
system_, is_automatic_correction_enabled) != RESULT_SUCCESS) {
|
||||
UNREACHABLE();
|
||||
return;
|
||||
}
|
||||
|
@ -196,10 +196,10 @@ struct TimeManager::Impl final {
|
|||
ephemeral_network_system_clock_core.MarkAsInitialized();
|
||||
}
|
||||
|
||||
void UpdateLocalSystemClockTime(Core::System& system, s64 posix_time) {
|
||||
const auto timespan{Service::Time::Clock::TimeSpanType::FromSeconds(posix_time)};
|
||||
void UpdateLocalSystemClockTime(Core::System& system_, s64 posix_time) {
|
||||
const auto timespan{Clock::TimeSpanType::FromSeconds(posix_time)};
|
||||
if (GetStandardLocalSystemClockCore()
|
||||
.SetCurrentTime(system, timespan.ToSeconds())
|
||||
.SetCurrentTime(system_, timespan.ToSeconds())
|
||||
.IsError()) {
|
||||
UNREACHABLE();
|
||||
return;
|
||||
|
|
|
@ -26,8 +26,7 @@ std::shared_ptr<Kernel::KSharedMemory> SharedMemory::GetSharedMemoryHolder() con
|
|||
return shared_memory_holder;
|
||||
}
|
||||
|
||||
void SharedMemory::SetupStandardSteadyClock(Core::System& system,
|
||||
const Common::UUID& clock_source_id,
|
||||
void SharedMemory::SetupStandardSteadyClock(const Common::UUID& clock_source_id,
|
||||
Clock::TimeSpanType current_time_point) {
|
||||
const Clock::TimeSpanType ticks_time_span{Clock::TimeSpanType::FromTicks(
|
||||
system.CoreTiming().GetClockTicks(), Core::Hardware::CNTFREQ)};
|
||||
|
|
|
@ -56,8 +56,8 @@ public:
|
|||
};
|
||||
static_assert(sizeof(Format) == 0xd8, "Format is an invalid size");
|
||||
|
||||
void SetupStandardSteadyClock(Core::System& system, const Common::UUID& clock_source_id,
|
||||
Clock::TimeSpanType currentTimePoint);
|
||||
void SetupStandardSteadyClock(const Common::UUID& clock_source_id,
|
||||
Clock::TimeSpanType current_time_point);
|
||||
void UpdateLocalSystemClockContext(const Clock::SystemClockContext& context);
|
||||
void UpdateNetworkSystemClockContext(const Clock::SystemClockContext& context);
|
||||
void SetAutomaticCorrectionEnabled(bool is_enabled);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue