diff options
Diffstat (limited to 'src/core/hle/service/psc/time/clocks')
10 files changed, 17 insertions, 17 deletions
diff --git a/src/core/hle/service/psc/time/clocks/context_writers.cpp b/src/core/hle/service/psc/time/clocks/context_writers.cpp index ac8700f76..a44486b43 100644 --- a/src/core/hle/service/psc/time/clocks/context_writers.cpp +++ b/src/core/hle/service/psc/time/clocks/context_writers.cpp @@ -22,7 +22,7 @@ LocalSystemClockContextWriter::LocalSystemClockContextWriter(Core::System& syste SharedMemory& shared_memory) : m_system{system}, m_shared_memory{shared_memory} {} -Result LocalSystemClockContextWriter::Write(SystemClockContext& context) { +Result LocalSystemClockContextWriter::Write(const SystemClockContext& context) { if (m_in_use) { R_SUCCEED_IF(context == m_context); m_context = context; @@ -43,7 +43,7 @@ NetworkSystemClockContextWriter::NetworkSystemClockContextWriter(Core::System& s SystemClockCore& system_clock) : m_system{system}, m_shared_memory{shared_memory}, m_system_clock{system_clock} {} -Result NetworkSystemClockContextWriter::Write(SystemClockContext& context) { +Result NetworkSystemClockContextWriter::Write(const SystemClockContext& context) { s64 time{}; [[maybe_unused]] auto res = m_system_clock.GetCurrentTime(&time); @@ -66,7 +66,7 @@ EphemeralNetworkSystemClockContextWriter::EphemeralNetworkSystemClockContextWrit Core::System& system) : m_system{system} {} -Result EphemeralNetworkSystemClockContextWriter::Write(SystemClockContext& context) { +Result EphemeralNetworkSystemClockContextWriter::Write(const SystemClockContext& context) { if (m_in_use) { R_SUCCEED_IF(context == m_context); m_context = context; diff --git a/src/core/hle/service/psc/time/clocks/context_writers.h b/src/core/hle/service/psc/time/clocks/context_writers.h index afd3725d4..6643fc9f2 100644 --- a/src/core/hle/service/psc/time/clocks/context_writers.h +++ b/src/core/hle/service/psc/time/clocks/context_writers.h @@ -24,7 +24,7 @@ private: public: virtual ~ContextWriter() = default; - virtual Result Write(SystemClockContext& context) = 0; + virtual Result Write(const SystemClockContext& context) = 0; void SignalAllNodes(); void Link(OperationEvent& operation_event); @@ -37,7 +37,7 @@ class LocalSystemClockContextWriter : public ContextWriter { public: explicit LocalSystemClockContextWriter(Core::System& system, SharedMemory& shared_memory); - Result Write(SystemClockContext& context) override; + Result Write(const SystemClockContext& context) override; private: Core::System& m_system; @@ -52,7 +52,7 @@ public: explicit NetworkSystemClockContextWriter(Core::System& system, SharedMemory& shared_memory, SystemClockCore& system_clock); - Result Write(SystemClockContext& context) override; + Result Write(const SystemClockContext& context) override; private: Core::System& m_system; @@ -67,7 +67,7 @@ class EphemeralNetworkSystemClockContextWriter : public ContextWriter { public: EphemeralNetworkSystemClockContextWriter(Core::System& system); - Result Write(SystemClockContext& context) override; + Result Write(const SystemClockContext& context) override; private: Core::System& m_system; diff --git a/src/core/hle/service/psc/time/clocks/standard_local_system_clock_core.cpp b/src/core/hle/service/psc/time/clocks/standard_local_system_clock_core.cpp index 36dca6689..6a74d4594 100644 --- a/src/core/hle/service/psc/time/clocks/standard_local_system_clock_core.cpp +++ b/src/core/hle/service/psc/time/clocks/standard_local_system_clock_core.cpp @@ -5,7 +5,7 @@ namespace Service::PSC::Time { -void StandardLocalSystemClockCore::Initialize(SystemClockContext& context, s64 time) { +void StandardLocalSystemClockCore::Initialize(const SystemClockContext& context, s64 time) { SteadyClockTimePoint time_point{}; if (GetCurrentTimePoint(time_point) == ResultSuccess && context.steady_time_point.IdMatches(time_point)) { diff --git a/src/core/hle/service/psc/time/clocks/standard_local_system_clock_core.h b/src/core/hle/service/psc/time/clocks/standard_local_system_clock_core.h index 176ba3e94..5722d8e96 100644 --- a/src/core/hle/service/psc/time/clocks/standard_local_system_clock_core.h +++ b/src/core/hle/service/psc/time/clocks/standard_local_system_clock_core.h @@ -17,7 +17,7 @@ public: : SystemClockCore{steady_clock} {} ~StandardLocalSystemClockCore() override = default; - void Initialize(SystemClockContext& context, s64 time); + void Initialize(const SystemClockContext& context, s64 time); }; } // namespace Service::PSC::Time diff --git a/src/core/hle/service/psc/time/clocks/standard_network_system_clock_core.cpp b/src/core/hle/service/psc/time/clocks/standard_network_system_clock_core.cpp index 8d6cb7db1..6938d369f 100644 --- a/src/core/hle/service/psc/time/clocks/standard_network_system_clock_core.cpp +++ b/src/core/hle/service/psc/time/clocks/standard_network_system_clock_core.cpp @@ -5,7 +5,7 @@ namespace Service::PSC::Time { -void StandardNetworkSystemClockCore::Initialize(SystemClockContext& context, s64 accuracy) { +void StandardNetworkSystemClockCore::Initialize(const SystemClockContext& context, s64 accuracy) { if (SetContextAndWrite(context) != ResultSuccess) { LOG_ERROR(Service_Time, "Failed to SetContext"); } diff --git a/src/core/hle/service/psc/time/clocks/standard_network_system_clock_core.h b/src/core/hle/service/psc/time/clocks/standard_network_system_clock_core.h index 933d2c8e3..bfafc7d71 100644 --- a/src/core/hle/service/psc/time/clocks/standard_network_system_clock_core.h +++ b/src/core/hle/service/psc/time/clocks/standard_network_system_clock_core.h @@ -19,7 +19,7 @@ public: : SystemClockCore{steady_clock} {} ~StandardNetworkSystemClockCore() override = default; - void Initialize(SystemClockContext& context, s64 accuracy); + void Initialize(const SystemClockContext& context, s64 accuracy); bool IsAccuracySufficient(); private: diff --git a/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.cpp b/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.cpp index 9e9be05d6..31ed27396 100644 --- a/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.cpp +++ b/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.cpp @@ -46,7 +46,7 @@ Result StandardUserSystemClockCore::GetContext(SystemClockContext& out_context) R_RETURN(m_local_system_clock.GetContext(out_context)); } -Result StandardUserSystemClockCore::SetContext(SystemClockContext& context) { +Result StandardUserSystemClockCore::SetContext(const SystemClockContext& context) { R_RETURN(ResultNotImplemented); } diff --git a/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.h b/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.h index a7fe7648d..32b8bc3bc 100644 --- a/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.h +++ b/src/core/hle/service/psc/time/clocks/standard_user_system_clock_core.h @@ -36,7 +36,7 @@ public: Result SetAutomaticCorrection(bool automatic_correction); Result GetContext(SystemClockContext& out_context) const override; - Result SetContext(SystemClockContext& context) override; + Result SetContext(const SystemClockContext& context) override; Result GetTimePoint(SteadyClockTimePoint& out_time_point); void SetTimePointAndSignal(SteadyClockTimePoint& time_point); diff --git a/src/core/hle/service/psc/time/clocks/system_clock_core.cpp b/src/core/hle/service/psc/time/clocks/system_clock_core.cpp index c507ef517..2b7466831 100644 --- a/src/core/hle/service/psc/time/clocks/system_clock_core.cpp +++ b/src/core/hle/service/psc/time/clocks/system_clock_core.cpp @@ -51,12 +51,12 @@ Result SystemClockCore::GetContext(SystemClockContext& out_context) const { R_SUCCEED(); } -Result SystemClockCore::SetContext(SystemClockContext& context) { +Result SystemClockCore::SetContext(const SystemClockContext& context) { m_context = context; R_SUCCEED(); } -Result SystemClockCore::SetContextAndWrite(SystemClockContext& context) { +Result SystemClockCore::SetContextAndWrite(const SystemClockContext& context) { R_TRY(SetContext(context)); if (m_context_writer) { diff --git a/src/core/hle/service/psc/time/clocks/system_clock_core.h b/src/core/hle/service/psc/time/clocks/system_clock_core.h index 73811712e..0b928432f 100644 --- a/src/core/hle/service/psc/time/clocks/system_clock_core.h +++ b/src/core/hle/service/psc/time/clocks/system_clock_core.h @@ -41,8 +41,8 @@ public: } virtual Result GetContext(SystemClockContext& out_context) const; - virtual Result SetContext(SystemClockContext& context); - Result SetContextAndWrite(SystemClockContext& context); + virtual Result SetContext(const SystemClockContext& context); + Result SetContextAndWrite(const SystemClockContext& context); void LinkOperationEvent(OperationEvent& operation_event); |