diff options
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/am/applet_data_broker.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/am/process.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/glue/time/static.cpp | 41 | ||||
-rw-r--r-- | src/core/hle/service/glue/time/time_zone.cpp | 36 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv_interface.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/psc/time/static.cpp | 33 | ||||
-rw-r--r-- | src/core/hle/service/psc/time/steady_clock.cpp | 25 | ||||
-rw-r--r-- | src/core/hle/service/psc/time/system_clock.cpp | 8 | ||||
-rw-r--r-- | src/core/hle/service/psc/time/time_zone_service.cpp | 32 | ||||
-rw-r--r-- | src/core/hle/service/server_manager.cpp | 8 |
11 files changed, 128 insertions, 71 deletions
diff --git a/src/core/hle/service/am/applet_data_broker.cpp b/src/core/hle/service/am/applet_data_broker.cpp index 4d58c4db5..9057244a9 100644 --- a/src/core/hle/service/am/applet_data_broker.cpp +++ b/src/core/hle/service/am/applet_data_broker.cpp @@ -24,11 +24,11 @@ void AppletStorageChannel::Push(std::shared_ptr<IStorage> storage) { Result AppletStorageChannel::Pop(std::shared_ptr<IStorage>* out_storage) { std::scoped_lock lk{m_lock}; - SCOPE_EXIT({ + SCOPE_EXIT { if (m_data.empty()) { m_event.Clear(); } - }); + }; R_UNLESS(!m_data.empty(), AM::ResultNoDataInChannel); diff --git a/src/core/hle/service/am/process.cpp b/src/core/hle/service/am/process.cpp index 992c50713..388d2045c 100644 --- a/src/core/hle/service/am/process.cpp +++ b/src/core/hle/service/am/process.cpp @@ -68,7 +68,9 @@ bool Process::Initialize(u64 program_id, u8 minimum_key_generation, u8 maximum_k Kernel::KProcess::Register(m_system.Kernel(), process); // On exit, ensure we free the additional reference to the process. - SCOPE_EXIT({ process->Close(); }); + SCOPE_EXIT { + process->Close(); + }; // Insert process modules into memory. const auto [load_result, load_parameters] = app_loader->Load(*process, m_system); diff --git a/src/core/hle/service/glue/time/static.cpp b/src/core/hle/service/glue/time/static.cpp index ec9b0efb1..b801faef2 100644 --- a/src/core/hle/service/glue/time/static.cpp +++ b/src/core/hle/service/glue/time/static.cpp @@ -142,16 +142,18 @@ Result StaticService::SetStandardSteadyClockInternalOffset(s64 offset_ns) { } Result StaticService::GetStandardSteadyClockRtcValue(Out<s64> out_rtc_value) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_rtc_value={}", *out_rtc_value); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_rtc_value={}", *out_rtc_value); + }; R_RETURN(m_standard_steady_clock_resource.GetRtcTimeInSeconds(*out_rtc_value)); } Result StaticService::IsStandardUserSystemClockAutomaticCorrectionEnabled( Out<bool> out_automatic_correction) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. out_automatic_correction={}", *out_automatic_correction); - }); + }; R_RETURN(m_wrapped_service->IsStandardUserSystemClockAutomaticCorrectionEnabled( out_automatic_correction)); @@ -166,21 +168,27 @@ Result StaticService::SetStandardUserSystemClockAutomaticCorrectionEnabled( } Result StaticService::GetStandardUserSystemClockInitialYear(Out<s32> out_year) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_year={}", *out_year); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_year={}", *out_year); + }; R_RETURN(m_set_sys->GetSettingsItemValueImpl<s32>(*out_year, "time", "standard_user_clock_initial_year")); } Result StaticService::IsStandardNetworkSystemClockAccuracySufficient(Out<bool> out_is_sufficient) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_is_sufficient={}", *out_is_sufficient); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_is_sufficient={}", *out_is_sufficient); + }; R_RETURN(m_wrapped_service->IsStandardNetworkSystemClockAccuracySufficient(out_is_sufficient)); } Result StaticService::GetStandardUserSystemClockAutomaticCorrectionUpdatedTime( Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_time_point={}", *out_time_point); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_time_point={}", *out_time_point); + }; R_RETURN(m_wrapped_service->GetStandardUserSystemClockAutomaticCorrectionUpdatedTime( out_time_point)); @@ -188,15 +196,18 @@ Result StaticService::GetStandardUserSystemClockAutomaticCorrectionUpdatedTime( Result StaticService::CalculateMonotonicSystemClockBaseTimePoint( Out<s64> out_time, const Service::PSC::Time::SystemClockContext& context) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. context={} out_time={}", context, *out_time); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. context={} out_time={}", context, *out_time); + }; R_RETURN(m_wrapped_service->CalculateMonotonicSystemClockBaseTimePoint(out_time, context)); } Result StaticService::GetClockSnapshot(OutClockSnapshot out_snapshot, Service::PSC::Time::TimeType type) { - SCOPE_EXIT( - { LOG_DEBUG(Service_Time, "called. type={} out_snapshot={}", type, *out_snapshot); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. type={} out_snapshot={}", type, *out_snapshot); + }; R_RETURN(m_wrapped_service->GetClockSnapshot(out_snapshot, type)); } @@ -205,11 +216,11 @@ Result StaticService::GetClockSnapshotFromSystemClockContext( Service::PSC::Time::TimeType type, OutClockSnapshot out_snapshot, const Service::PSC::Time::SystemClockContext& user_context, const Service::PSC::Time::SystemClockContext& network_context) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. type={} out_snapshot={} user_context={} network_context={}", type, *out_snapshot, user_context, network_context); - }); + }; R_RETURN(m_wrapped_service->GetClockSnapshotFromSystemClockContext( type, out_snapshot, user_context, network_context)); @@ -218,14 +229,18 @@ Result StaticService::GetClockSnapshotFromSystemClockContext( Result StaticService::CalculateStandardUserSystemClockDifferenceByUser(Out<s64> out_time, InClockSnapshot a, InClockSnapshot b) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. a={} b={} out_time={}", *a, *b, *out_time); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. a={} b={} out_time={}", *a, *b, *out_time); + }; R_RETURN(m_wrapped_service->CalculateStandardUserSystemClockDifferenceByUser(out_time, a, b)); } Result StaticService::CalculateSpanBetween(Out<s64> out_time, InClockSnapshot a, InClockSnapshot b) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. a={} b={} out_time={}", *a, *b, *out_time); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. a={} b={} out_time={}", *a, *b, *out_time); + }; R_RETURN(m_wrapped_service->CalculateSpanBetween(out_time, a, b)); } diff --git a/src/core/hle/service/glue/time/time_zone.cpp b/src/core/hle/service/glue/time/time_zone.cpp index 36f163419..f4d0c87d5 100644 --- a/src/core/hle/service/glue/time/time_zone.cpp +++ b/src/core/hle/service/glue/time/time_zone.cpp @@ -57,7 +57,9 @@ TimeZoneService::~TimeZoneService() = default; Result TimeZoneService::GetDeviceLocationName( Out<Service::PSC::Time::LocationName> out_location_name) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_location_name={}", *out_location_name); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_location_name={}", *out_location_name); + }; R_RETURN(m_wrapped_service->GetDeviceLocationName(out_location_name)); } @@ -94,7 +96,9 @@ Result TimeZoneService::SetDeviceLocationName( } Result TimeZoneService::GetTotalLocationNameCount(Out<u32> out_count) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_count={}", *out_count); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_count={}", *out_count); + }; R_RETURN(m_wrapped_service->GetTotalLocationNameCount(out_count)); } @@ -102,10 +106,10 @@ Result TimeZoneService::GetTotalLocationNameCount(Out<u32> out_count) { Result TimeZoneService::LoadLocationNameList( Out<u32> out_count, OutArray<Service::PSC::Time::LocationName, BufferAttr_HipcMapAlias> out_names, u32 index) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. index={} out_count={} out_names[0]={} out_names[1]={}", index, *out_count, out_names[0], out_names[1]); - }); + }; std::scoped_lock l{m_mutex}; R_RETURN(GetTimeZoneLocationList(*out_count, out_names, out_names.size(), index)); @@ -124,7 +128,9 @@ Result TimeZoneService::LoadTimeZoneRule(OutRule out_rule, Result TimeZoneService::GetTimeZoneRuleVersion( Out<Service::PSC::Time::RuleVersion> out_rule_version) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_rule_version={}", *out_rule_version); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_rule_version={}", *out_rule_version); + }; R_RETURN(m_wrapped_service->GetTimeZoneRuleVersion(out_rule_version)); } @@ -132,10 +138,10 @@ Result TimeZoneService::GetTimeZoneRuleVersion( Result TimeZoneService::GetDeviceLocationNameAndUpdatedTime( Out<Service::PSC::Time::LocationName> location_name, Out<Service::PSC::Time::SteadyClockTimePoint> out_time_point) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. location_name={} out_time_point={}", *location_name, *out_time_point); - }); + }; R_RETURN(m_wrapped_service->GetDeviceLocationNameAndUpdatedTime(location_name, out_time_point)); } @@ -178,10 +184,10 @@ Result TimeZoneService::GetDeviceLocationNameOperationEventReadableHandle( Result TimeZoneService::ToCalendarTime( Out<Service::PSC::Time::CalendarTime> out_calendar_time, Out<Service::PSC::Time::CalendarAdditionalInfo> out_additional_info, s64 time, InRule rule) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. time={} out_calendar_time={} out_additional_info={}", time, *out_calendar_time, *out_additional_info); - }); + }; R_RETURN(m_wrapped_service->ToCalendarTime(out_calendar_time, out_additional_info, time, rule)); } @@ -189,10 +195,10 @@ Result TimeZoneService::ToCalendarTime( Result TimeZoneService::ToCalendarTimeWithMyRule( Out<Service::PSC::Time::CalendarTime> out_calendar_time, Out<Service::PSC::Time::CalendarAdditionalInfo> out_additional_info, s64 time) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. time={} out_calendar_time={} out_additional_info={}", time, *out_calendar_time, *out_additional_info); - }); + }; R_RETURN( m_wrapped_service->ToCalendarTimeWithMyRule(out_calendar_time, out_additional_info, time)); @@ -202,11 +208,11 @@ Result TimeZoneService::ToPosixTime(Out<u32> out_count, OutArray<s64, BufferAttr_HipcPointer> out_times, const Service::PSC::Time::CalendarTime& calendar_time, InRule rule) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. calendar_time={} out_count={} out_times[0]={} out_times[1]={}", calendar_time, *out_count, out_times[0], out_times[1]); - }); + }; R_RETURN(m_wrapped_service->ToPosixTime(out_count, out_times, calendar_time, rule)); } @@ -214,11 +220,11 @@ Result TimeZoneService::ToPosixTime(Out<u32> out_count, Result TimeZoneService::ToPosixTimeWithMyRule( Out<u32> out_count, OutArray<s64, BufferAttr_HipcPointer> out_times, const Service::PSC::Time::CalendarTime& calendar_time) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. calendar_time={} out_count={} out_times[0]={} out_times[1]={}", calendar_time, *out_count, out_times[0], out_times[1]); - }); + }; R_RETURN(m_wrapped_service->ToPosixTimeWithMyRule(out_count, out_times, calendar_time)); } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index 250d01de3..0265d55f2 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -92,11 +92,11 @@ NvResult nvhost_ctrl::IocCtrlEventWait(IocCtrlEventWaitParams& params, bool is_a bool must_unmark_fail = !is_allocation; const u32 event_id = params.value.raw; - SCOPE_EXIT({ + SCOPE_EXIT { if (must_unmark_fail) { events[event_id].fails = 0; } - }); + }; const u32 fence_id = static_cast<u32>(params.fence.id); diff --git a/src/core/hle/service/nvdrv/nvdrv_interface.cpp b/src/core/hle/service/nvdrv/nvdrv_interface.cpp index 241006cc8..258970fd5 100644 --- a/src/core/hle/service/nvdrv/nvdrv_interface.cpp +++ b/src/core/hle/service/nvdrv/nvdrv_interface.cpp @@ -154,10 +154,10 @@ void NVDRV::Close(HLERequestContext& ctx) { void NVDRV::Initialize(HLERequestContext& ctx) { LOG_WARNING(Service_NVDRV, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 3}; - SCOPE_EXIT({ + SCOPE_EXIT { rb.Push(ResultSuccess); rb.PushEnum(NvResult::Success); - }); + }; if (is_initialized) { // No need to initialize again diff --git a/src/core/hle/service/psc/time/static.cpp b/src/core/hle/service/psc/time/static.cpp index 24b85cc61..9a0adb295 100644 --- a/src/core/hle/service/psc/time/static.cpp +++ b/src/core/hle/service/psc/time/static.cpp @@ -144,7 +144,9 @@ Result StaticService::GetStandardSteadyClockRtcValue(Out<s64> out_rtc_value) { Result StaticService::IsStandardUserSystemClockAutomaticCorrectionEnabled( Out<bool> out_is_enabled) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_is_enabled={}", *out_is_enabled); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_is_enabled={}", *out_is_enabled); + }; R_UNLESS(m_user_system_clock.IsInitialized(), ResultClockUninitialized); @@ -180,7 +182,9 @@ Result StaticService::GetStandardUserSystemClockInitialYear(Out<s32> out_year) { } Result StaticService::IsStandardNetworkSystemClockAccuracySufficient(Out<bool> out_is_sufficient) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_is_sufficient={}", *out_is_sufficient); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_is_sufficient={}", *out_is_sufficient); + }; *out_is_sufficient = m_network_system_clock.IsAccuracySufficient(); @@ -189,7 +193,9 @@ Result StaticService::IsStandardNetworkSystemClockAccuracySufficient(Out<bool> o Result StaticService::GetStandardUserSystemClockAutomaticCorrectionUpdatedTime( Out<SteadyClockTimePoint> out_time_point) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_time_point={}", *out_time_point); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_time_point={}", *out_time_point); + }; R_UNLESS(m_user_system_clock.IsInitialized(), ResultClockUninitialized); @@ -200,7 +206,9 @@ Result StaticService::GetStandardUserSystemClockAutomaticCorrectionUpdatedTime( Result StaticService::CalculateMonotonicSystemClockBaseTimePoint( Out<s64> out_time, const SystemClockContext& context) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. context={} out_time={}", context, *out_time); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. context={} out_time={}", context, *out_time); + }; R_UNLESS(m_time->m_standard_steady_clock.IsInitialized(), ResultClockUninitialized); @@ -219,8 +227,9 @@ Result StaticService::CalculateMonotonicSystemClockBaseTimePoint( } Result StaticService::GetClockSnapshot(OutClockSnapshot out_snapshot, TimeType type) { - SCOPE_EXIT( - { LOG_DEBUG(Service_Time, "called. type={} out_snapshot={}", type, *out_snapshot); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. type={} out_snapshot={}", type, *out_snapshot); + }; SystemClockContext user_context{}; R_TRY(m_user_system_clock.GetContext(user_context)); @@ -234,11 +243,11 @@ Result StaticService::GetClockSnapshot(OutClockSnapshot out_snapshot, TimeType t Result StaticService::GetClockSnapshotFromSystemClockContext( TimeType type, OutClockSnapshot out_snapshot, const SystemClockContext& user_context, const SystemClockContext& network_context) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. type={} user_context={} network_context={} out_snapshot={}", type, user_context, network_context, *out_snapshot); - }); + }; R_RETURN(GetClockSnapshotImpl(out_snapshot, user_context, network_context, type)); } @@ -246,9 +255,9 @@ Result StaticService::GetClockSnapshotFromSystemClockContext( Result StaticService::CalculateStandardUserSystemClockDifferenceByUser(Out<s64> out_difference, InClockSnapshot a, InClockSnapshot b) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. a={} b={} out_difference={}", *a, *b, *out_difference); - }); + }; auto diff_s = std::chrono::seconds(b->user_context.offset) - std::chrono::seconds(a->user_context.offset); @@ -276,7 +285,9 @@ Result StaticService::CalculateStandardUserSystemClockDifferenceByUser(Out<s64> Result StaticService::CalculateSpanBetween(Out<s64> out_time, InClockSnapshot a, InClockSnapshot b) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. a={} b={} out_time={}", *a, *b, *out_time); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. a={} b={} out_time={}", *a, *b, *out_time); + }; s64 time_s{}; auto res = diff --git a/src/core/hle/service/psc/time/steady_clock.cpp b/src/core/hle/service/psc/time/steady_clock.cpp index 948610a2b..78dcf532c 100644 --- a/src/core/hle/service/psc/time/steady_clock.cpp +++ b/src/core/hle/service/psc/time/steady_clock.cpp @@ -29,7 +29,9 @@ SteadyClock::SteadyClock(Core::System& system_, std::shared_ptr<TimeManager> man } Result SteadyClock::GetCurrentTimePoint(Out<SteadyClockTimePoint> out_time_point) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_time_point={}", *out_time_point); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_time_point={}", *out_time_point); + }; R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(), ResultClockUninitialized); @@ -38,7 +40,9 @@ Result SteadyClock::GetCurrentTimePoint(Out<SteadyClockTimePoint> out_time_point } Result SteadyClock::GetTestOffset(Out<s64> out_test_offset) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_test_offset={}", *out_test_offset); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_test_offset={}", *out_test_offset); + }; R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(), ResultClockUninitialized); @@ -59,7 +63,9 @@ Result SteadyClock::SetTestOffset(s64 test_offset) { } Result SteadyClock::GetRtcValue(Out<s64> out_rtc_value) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_rtc_value={}", *out_rtc_value); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_rtc_value={}", *out_rtc_value); + }; R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(), ResultClockUninitialized); @@ -68,7 +74,9 @@ Result SteadyClock::GetRtcValue(Out<s64> out_rtc_value) { } Result SteadyClock::IsRtcResetDetected(Out<bool> out_is_detected) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_is_detected={}", *out_is_detected); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_is_detected={}", *out_is_detected); + }; R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(), ResultClockUninitialized); @@ -78,7 +86,9 @@ Result SteadyClock::IsRtcResetDetected(Out<bool> out_is_detected) { } Result SteadyClock::GetSetupResultValue(Out<Result> out_result) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_result=0x{:X}", out_result->raw); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_result=0x{:X}", out_result->raw); + }; R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(), ResultClockUninitialized); @@ -88,8 +98,9 @@ Result SteadyClock::GetSetupResultValue(Out<Result> out_result) { } Result SteadyClock::GetInternalOffset(Out<s64> out_internal_offset) { - SCOPE_EXIT( - { LOG_DEBUG(Service_Time, "called. out_internal_offset={}", *out_internal_offset); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_internal_offset={}", *out_internal_offset); + }; R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(), ResultClockUninitialized); diff --git a/src/core/hle/service/psc/time/system_clock.cpp b/src/core/hle/service/psc/time/system_clock.cpp index b4e9264d8..9f841d8e0 100644 --- a/src/core/hle/service/psc/time/system_clock.cpp +++ b/src/core/hle/service/psc/time/system_clock.cpp @@ -26,7 +26,9 @@ SystemClock::SystemClock(Core::System& system_, SystemClockCore& clock_core, boo } Result SystemClock::GetCurrentTime(Out<s64> out_time) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_time={}", *out_time); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_time={}", *out_time); + }; R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(), ResultClockUninitialized); @@ -45,7 +47,9 @@ Result SystemClock::SetCurrentTime(s64 time) { } Result SystemClock::GetSystemClockContext(Out<SystemClockContext> out_context) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_context={}", *out_context); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_context={}", *out_context); + }; R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(), ResultClockUninitialized); diff --git a/src/core/hle/service/psc/time/time_zone_service.cpp b/src/core/hle/service/psc/time/time_zone_service.cpp index 2f80030a4..9e0674f27 100644 --- a/src/core/hle/service/psc/time/time_zone_service.cpp +++ b/src/core/hle/service/psc/time/time_zone_service.cpp @@ -37,7 +37,9 @@ TimeZoneService::TimeZoneService(Core::System& system_, StandardSteadyClockCore& } Result TimeZoneService::GetDeviceLocationName(Out<LocationName> out_location_name) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_location_name={}", *out_location_name); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_location_name={}", *out_location_name); + }; R_RETURN(m_time_zone.GetLocationName(*out_location_name)); } @@ -50,7 +52,9 @@ Result TimeZoneService::SetDeviceLocationName(const LocationName& location_name) } Result TimeZoneService::GetTotalLocationNameCount(Out<u32> out_count) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_count={}", *out_count); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_count={}", *out_count); + }; R_RETURN(m_time_zone.GetTotalLocationCount(*out_count)); } @@ -69,17 +73,19 @@ Result TimeZoneService::LoadTimeZoneRule(OutRule out_rule, const LocationName& l } Result TimeZoneService::GetTimeZoneRuleVersion(Out<RuleVersion> out_rule_version) { - SCOPE_EXIT({ LOG_DEBUG(Service_Time, "called. out_rule_version={}", *out_rule_version); }); + SCOPE_EXIT { + LOG_DEBUG(Service_Time, "called. out_rule_version={}", *out_rule_version); + }; R_RETURN(m_time_zone.GetRuleVersion(*out_rule_version)); } Result TimeZoneService::GetDeviceLocationNameAndUpdatedTime( Out<LocationName> out_location_name, Out<SteadyClockTimePoint> out_time_point) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. out_location_name={} out_time_point={}", *out_location_name, *out_time_point); - }); + }; R_TRY(m_time_zone.GetLocationName(*out_location_name)); R_RETURN(m_time_zone.GetTimePoint(*out_time_point)); @@ -116,10 +122,10 @@ Result TimeZoneService::GetDeviceLocationNameOperationEventReadableHandle( Result TimeZoneService::ToCalendarTime(Out<CalendarTime> out_calendar_time, Out<CalendarAdditionalInfo> out_additional_info, s64 time, InRule rule) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. time={} out_calendar_time={} out_additional_info={}", time, *out_calendar_time, *out_additional_info); - }); + }; R_RETURN( m_time_zone.ToCalendarTime(*out_calendar_time, *out_additional_info, time, *rule.Get())); @@ -128,10 +134,10 @@ Result TimeZoneService::ToCalendarTime(Out<CalendarTime> out_calendar_time, Result TimeZoneService::ToCalendarTimeWithMyRule(Out<CalendarTime> out_calendar_time, Out<CalendarAdditionalInfo> out_additional_info, s64 time) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. time={} out_calendar_time={} out_additional_info={}", time, *out_calendar_time, *out_additional_info); - }); + }; R_RETURN(m_time_zone.ToCalendarTimeWithMyRule(*out_calendar_time, *out_additional_info, time)); } @@ -139,11 +145,11 @@ Result TimeZoneService::ToCalendarTimeWithMyRule(Out<CalendarTime> out_calendar_ Result TimeZoneService::ToPosixTime(Out<u32> out_count, OutArray<s64, BufferAttr_HipcPointer> out_times, const CalendarTime& calendar_time, InRule rule) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. calendar_time={} out_count={} out_times[0]={} out_times[1]={} ", calendar_time, *out_count, out_times[0], out_times[1]); - }); + }; R_RETURN( m_time_zone.ToPosixTime(*out_count, out_times, out_times.size(), calendar_time, *rule)); @@ -152,11 +158,11 @@ Result TimeZoneService::ToPosixTime(Out<u32> out_count, Result TimeZoneService::ToPosixTimeWithMyRule(Out<u32> out_count, OutArray<s64, BufferAttr_HipcPointer> out_times, const CalendarTime& calendar_time) { - SCOPE_EXIT({ + SCOPE_EXIT { LOG_DEBUG(Service_Time, "called. calendar_time={} out_count={} out_times[0]={} out_times[1]={} ", calendar_time, *out_count, out_times[0], out_times[1]); - }); + }; R_RETURN( m_time_zone.ToPosixTimeWithMyRule(*out_count, out_times, out_times.size(), calendar_time)); diff --git a/src/core/hle/service/server_manager.cpp b/src/core/hle/service/server_manager.cpp index 8c7f94c8c..0b41bbcb9 100644 --- a/src/core/hle/service/server_manager.cpp +++ b/src/core/hle/service/server_manager.cpp @@ -177,10 +177,10 @@ Result ServerManager::ManageNamedPort(const std::string& service_name, Kernel::KPort::Register(m_system.Kernel(), port); // Ensure that our reference to the port is closed if we fail to register it. - SCOPE_EXIT({ + SCOPE_EXIT { port->GetClientPort().Close(); port->GetServerPort().Close(); - }); + }; // Register the object name with the kernel. R_TRY(Kernel::KObjectName::NewFromName(m_system.Kernel(), std::addressof(port->GetClientPort()), @@ -237,7 +237,9 @@ void ServerManager::StartAdditionalHostThreads(const char* name, size_t num_thre } Result ServerManager::LoopProcess() { - SCOPE_EXIT({ m_stopped.Set(); }); + SCOPE_EXIT { + m_stopped.Set(); + }; R_RETURN(this->LoopProcessImpl()); } |