diff --git a/libraries/libmesosphere/source/board/nintendo/nx/kern_k_device_page_table.cpp b/libraries/libmesosphere/source/board/nintendo/nx/kern_k_device_page_table.cpp index 452ab289f..bd132f3f6 100644 --- a/libraries/libmesosphere/source/board/nintendo/nx/kern_k_device_page_table.cpp +++ b/libraries/libmesosphere/source/board/nintendo/nx/kern_k_device_page_table.cpp @@ -548,11 +548,11 @@ namespace ams::kern::board::nintendo::nx { /* Print the interrupt. */ { - constexpr auto GetBits = [] ALWAYS_INLINE_LAMBDA (u32 value, size_t ofs, size_t count) { + constexpr auto GetBits = [](u32 value, size_t ofs, size_t count) ALWAYS_INLINE_LAMBDA { return (value >> ofs) & ((1u << count) - 1); }; - constexpr auto GetBit = [GetBits] ALWAYS_INLINE_LAMBDA (u32 value, size_t ofs) { + constexpr auto GetBit = [GetBits](u32 value, size_t ofs) ALWAYS_INLINE_LAMBDA { return (value >> ofs) & 1u; }; diff --git a/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp b/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp index ed1fc14b9..432fe5762 100644 --- a/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp +++ b/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp @@ -312,7 +312,7 @@ namespace ams::kern::board::nintendo::nx { size_t KSystemControl::Init::GetApplicationPoolSize() { /* Get the base pool size. */ - const size_t base_pool_size = [] ALWAYS_INLINE_LAMBDA () -> size_t { + const size_t base_pool_size = []() ALWAYS_INLINE_LAMBDA -> size_t { switch (GetMemoryArrangeForInit()) { case smc::MemoryArrangement_4GB: default: @@ -336,7 +336,7 @@ namespace ams::kern::board::nintendo::nx { size_t KSystemControl::Init::GetAppletPoolSize() { /* Get the base pool size. */ - const size_t base_pool_size = [] ALWAYS_INLINE_LAMBDA () -> size_t { + const size_t base_pool_size = []() ALWAYS_INLINE_LAMBDA -> size_t { switch (GetMemoryArrangeForInit()) { case smc::MemoryArrangement_4GB: default: @@ -490,7 +490,7 @@ namespace ams::kern::board::nintendo::nx { if (AMS_LIKELY(s_initialized_random_generator)) { - return KSystemControlBase::GenerateUniformRange(min, max, [] ALWAYS_INLINE_LAMBDA () -> u64 { return s_random_generator.GenerateRandomU64(); }); + return KSystemControlBase::GenerateUniformRange(min, max, []() ALWAYS_INLINE_LAMBDA -> u64 { return s_random_generator.GenerateRandomU64(); }); } else { return KSystemControlBase::GenerateUniformRange(min, max, GenerateRandomU64FromSmc); } @@ -680,4 +680,4 @@ namespace ams::kern::board::nintendo::nx { Kernel::GetMemoryManager().Close(KPageTable::GetHeapPhysicalAddress(address), size / PageSize); } -} \ No newline at end of file +} diff --git a/libraries/libmesosphere/source/kern_k_memory_layout.board.nintendo_nx.cpp b/libraries/libmesosphere/source/kern_k_memory_layout.board.nintendo_nx.cpp index a0b4d303f..0f551fe95 100644 --- a/libraries/libmesosphere/source/kern_k_memory_layout.board.nintendo_nx.cpp +++ b/libraries/libmesosphere/source/kern_k_memory_layout.board.nintendo_nx.cpp @@ -195,7 +195,7 @@ namespace ams::kern { static_assert(KMemoryManager::Pool_Secure == KMemoryManager::Pool_System); /* Get Secure pool size. */ - const size_t secure_pool_size = [] ALWAYS_INLINE_LAMBDA (auto target_firmware) -> size_t { + const size_t secure_pool_size = [](auto target_firmware) ALWAYS_INLINE_LAMBDA -> size_t { constexpr size_t LegacySecureKernelSize = 8_MB; /* KPageBuffer pages, other small kernel allocations. */ constexpr size_t LegacySecureMiscSize = 1_MB; /* Miscellaneous pages for secure process mapping. */ constexpr size_t LegacySecureHeapSize = 24_MB; /* Heap pages for secure process mapping (fs). */ @@ -274,4 +274,4 @@ namespace ams::kern { } -} \ No newline at end of file +} diff --git a/libraries/libmesosphere/source/kern_k_page_table_base.cpp b/libraries/libmesosphere/source/kern_k_page_table_base.cpp index 150996768..192487d8f 100644 --- a/libraries/libmesosphere/source/kern_k_page_table_base.cpp +++ b/libraries/libmesosphere/source/kern_k_page_table_base.cpp @@ -2398,7 +2398,7 @@ namespace ams::kern { size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); size_t tot_size = cur_size; - auto PerformCopy = [&] ALWAYS_INLINE_LAMBDA () -> Result { + auto PerformCopy = [&]() ALWAYS_INLINE_LAMBDA -> Result { /* Ensure the address is linear mapped. */ R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), svc::ResultInvalidCurrentMemory()); @@ -2484,7 +2484,7 @@ namespace ams::kern { size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); size_t tot_size = cur_size; - auto PerformCopy = [&] ALWAYS_INLINE_LAMBDA () -> Result { + auto PerformCopy = [&]() ALWAYS_INLINE_LAMBDA -> Result { /* Ensure the address is linear mapped. */ R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), svc::ResultInvalidCurrentMemory()); @@ -2943,7 +2943,7 @@ namespace ams::kern { size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); size_t tot_size = cur_size; - auto PerformCopy = [&] ALWAYS_INLINE_LAMBDA () -> Result { + auto PerformCopy = [&]() ALWAYS_INLINE_LAMBDA -> Result { /* Ensure the address is linear mapped. */ R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), svc::ResultInvalidCurrentMemory()); @@ -3023,7 +3023,7 @@ namespace ams::kern { size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); size_t tot_size = cur_size; - auto PerformCopy = [&] ALWAYS_INLINE_LAMBDA () -> Result { + auto PerformCopy = [&]() ALWAYS_INLINE_LAMBDA -> Result { /* Ensure the address is linear mapped. */ R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), svc::ResultInvalidCurrentMemory()); @@ -3092,7 +3092,7 @@ namespace ams::kern { size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); size_t tot_size = cur_size; - auto PerformCopy = [&] ALWAYS_INLINE_LAMBDA () -> Result { + auto PerformCopy = [&]() ALWAYS_INLINE_LAMBDA -> Result { /* Ensure the address is linear mapped. */ R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), svc::ResultInvalidCurrentMemory()); @@ -3172,7 +3172,7 @@ namespace ams::kern { size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); size_t tot_size = cur_size; - auto PerformCopy = [&] ALWAYS_INLINE_LAMBDA () -> Result { + auto PerformCopy = [&]() ALWAYS_INLINE_LAMBDA -> Result { /* Ensure the address is linear mapped. */ R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), svc::ResultInvalidCurrentMemory()); diff --git a/libraries/libmesosphere/source/kern_k_system_control_base.cpp b/libraries/libmesosphere/source/kern_k_system_control_base.cpp index a0cf3dfc0..e20166125 100644 --- a/libraries/libmesosphere/source/kern_k_system_control_base.cpp +++ b/libraries/libmesosphere/source/kern_k_system_control_base.cpp @@ -96,7 +96,7 @@ namespace ams::kern { s_initialized_random_generator = true; } - return KSystemControlBase::GenerateUniformRange(min, max, [] ALWAYS_INLINE_LAMBDA () -> u64 { return s_random_generator.GenerateRandomU64(); }); + return KSystemControlBase::GenerateUniformRange(min, max, []() ALWAYS_INLINE_LAMBDA -> u64 { return s_random_generator.GenerateRandomU64(); }); } /* System Initialization. */ @@ -194,7 +194,7 @@ namespace ams::kern { KScopedInterruptDisable intr_disable; KScopedSpinLock lk(s_random_lock); - return KSystemControlBase::GenerateUniformRange(min, max, [] ALWAYS_INLINE_LAMBDA () -> u64 { return s_random_generator.GenerateRandomU64(); }); + return KSystemControlBase::GenerateUniformRange(min, max, []() ALWAYS_INLINE_LAMBDA -> u64 { return s_random_generator.GenerateRandomU64(); }); } u64 KSystemControlBase::GenerateRandomU64() { @@ -292,4 +292,4 @@ namespace ams::kern { Kernel::GetMemoryManager().Close(KPageTable::GetHeapPhysicalAddress(address), size / PageSize); } -} \ No newline at end of file +} diff --git a/libraries/libmesosphere/source/kern_k_thread.cpp b/libraries/libmesosphere/source/kern_k_thread.cpp index e61605482..3f892f24b 100644 --- a/libraries/libmesosphere/source/kern_k_thread.cpp +++ b/libraries/libmesosphere/source/kern_k_thread.cpp @@ -1183,7 +1183,7 @@ namespace ams::kern { KScopedSchedulerLock sl; /* Determine if this is the first termination request. */ - const bool first_request = [&] ALWAYS_INLINE_LAMBDA () -> bool { + const bool first_request = [&]() ALWAYS_INLINE_LAMBDA -> bool { /* Perform an atomic compare-and-swap from false to true. */ bool expected = false; return m_termination_requested.CompareExchangeStrong(expected, true); diff --git a/libraries/libmesosphere/source/svc/kern_svc_address_translation.cpp b/libraries/libmesosphere/source/svc/kern_svc_address_translation.cpp index a1a6dca0b..1e529ada6 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_address_translation.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_address_translation.cpp @@ -48,7 +48,7 @@ namespace ams::kern::svc { /* Check whether the address is aligned. */ const bool aligned = util::IsAligned(phys_addr, PageSize); - auto QueryIoMappingFromPageTable = [&] ALWAYS_INLINE_LAMBDA (uint64_t phys_addr, size_t size) -> Result { + auto QueryIoMappingFromPageTable = [&](uint64_t phys_addr, size_t size) ALWAYS_INLINE_LAMBDA -> Result { /* The size must be non-zero. */ R_UNLESS(size > 0, svc::ResultInvalidSize()); diff --git a/libraries/libmesosphere/source/svc/kern_svc_process.cpp b/libraries/libmesosphere/source/svc/kern_svc_process.cpp index 6aaf240e9..4cff6a1d5 100644 --- a/libraries/libmesosphere/source/svc/kern_svc_process.cpp +++ b/libraries/libmesosphere/source/svc/kern_svc_process.cpp @@ -210,7 +210,7 @@ namespace ams::kern::svc { KResourceLimit *process_resource_limit = resource_limit.IsNotNull() ? resource_limit.GetPointerUnsafe() : std::addressof(Kernel::GetSystemResourceLimit()); /* Get the pool for the process. */ - const auto pool = [] ALWAYS_INLINE_LAMBDA (u32 flags) -> KMemoryManager::Pool { + const auto pool = [](u32 flags) ALWAYS_INLINE_LAMBDA -> KMemoryManager::Pool { if (GetTargetFirmware() >= TargetFirmware_5_0_0) { switch (flags & ams::svc::CreateProcessFlag_PoolPartitionMask) { case ams::svc::CreateProcessFlag_PoolPartitionApplication: diff --git a/libraries/libstratosphere/include/stratosphere/time/time_calendar_time.hpp b/libraries/libstratosphere/include/stratosphere/time/time_calendar_time.hpp index cb69b107c..56568b08a 100644 --- a/libraries/libstratosphere/include/stratosphere/time/time_calendar_time.hpp +++ b/libraries/libstratosphere/include/stratosphere/time/time_calendar_time.hpp @@ -50,7 +50,7 @@ namespace ams::time { AMS_ASSERT(rhs.IsValid()); } - constexpr auto ToUint64 = [] ALWAYS_INLINE_LAMBDA (const time::CalendarTime &time) { + constexpr auto ToUint64 = [](const time::CalendarTime &time) ALWAYS_INLINE_LAMBDA { return (static_cast(time.year) << 40) | (static_cast(time.month) << 32) | (static_cast(time.day) << 24) | diff --git a/libraries/libstratosphere/include/stratosphere/tipc/tipc_server_manager.hpp b/libraries/libstratosphere/include/stratosphere/tipc/tipc_server_manager.hpp index 951de4db8..18deb2e66 100644 --- a/libraries/libstratosphere/include/stratosphere/tipc/tipc_server_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/tipc/tipc_server_manager.hpp @@ -686,7 +686,7 @@ namespace ams::tipc { } /* Try to reply/receive. */ - const Result result = [&] ALWAYS_INLINE_LAMBDA () -> Result { + const Result result = [&]() ALWAYS_INLINE_LAMBDA -> Result { os::MultiWaitHolderType *signaled_holder = nullptr; ON_SCOPE_EXIT { AMS_ABORT_UNLESS(signaled_holder == nullptr); }; return m_object_manager->ReplyAndReceive(std::addressof(signaled_holder), out_object, reply_target, std::addressof(m_multi_wait)); diff --git a/libraries/libstratosphere/source/htclow/ctrl/htclow_ctrl_state_machine.cpp b/libraries/libstratosphere/source/htclow/ctrl/htclow_ctrl_state_machine.cpp index 0014b41d8..3cb4fc093 100644 --- a/libraries/libstratosphere/source/htclow/ctrl/htclow_ctrl_state_machine.cpp +++ b/libraries/libstratosphere/source/htclow/ctrl/htclow_ctrl_state_machine.cpp @@ -196,7 +196,7 @@ namespace ams::htclow::ctrl { /* Lock ourselves. */ std::scoped_lock lk(m_mutex); - auto IsSupportedServiceChannel = [] ALWAYS_INLINE_LAMBDA (const impl::ChannelInternalType &channel, const impl::ChannelInternalType *supported, int num_supported) -> bool { + auto IsSupportedServiceChannel = [](const impl::ChannelInternalType &channel, const impl::ChannelInternalType *supported, int num_supported) ALWAYS_INLINE_LAMBDA -> bool { for (auto i = 0; i < num_supported; ++i) { if (channel.module_id == supported[i].module_id && channel.channel_id == supported[i].channel_id) { return true; diff --git a/libraries/libstratosphere/source/ncm/ncm_content_meta_database_impl.cpp b/libraries/libstratosphere/source/ncm/ncm_content_meta_database_impl.cpp index 60fbfdc80..4e56f9cb6 100644 --- a/libraries/libstratosphere/source/ncm/ncm_content_meta_database_impl.cpp +++ b/libraries/libstratosphere/source/ncm/ncm_content_meta_database_impl.cpp @@ -308,7 +308,7 @@ namespace ams::ncm { out_orphaned[i] = true; } - auto IsOrphanedContent = [] ALWAYS_INLINE_LAMBDA (const sf::InArray &list, const ncm::ContentId &id) -> util::optional { + auto IsOrphanedContent = [](const sf::InArray &list, const ncm::ContentId &id) ALWAYS_INLINE_LAMBDA -> util::optional { /* Check if any input content ids match our found content id. */ for (size_t i = 0; i < list.GetSize(); i++) { if (list[i] == id) { diff --git a/stratosphere/ams_mitm/source/sysupdater/sysupdater_service.cpp b/stratosphere/ams_mitm/source/sysupdater/sysupdater_service.cpp index df02be9bf..a4d808a58 100644 --- a/stratosphere/ams_mitm/source/sysupdater/sysupdater_service.cpp +++ b/stratosphere/ams_mitm/source/sysupdater/sysupdater_service.cpp @@ -152,7 +152,7 @@ namespace ams::mitm::sysupdater { ON_SCOPE_EXIT { std::free(data_buffer); }; /* Declare helper for result validation. */ - auto ValidateResult = [&] ALWAYS_INLINE_LAMBDA (Result result) -> Result { + auto ValidateResult = [&](Result result) ALWAYS_INLINE_LAMBDA -> Result { *out_result = result; return result; }; diff --git a/stratosphere/sm/source/sm_user_service.hpp b/stratosphere/sm/source/sm_user_service.hpp index b73b9ebfe..32c4144c4 100644 --- a/stratosphere/sm/source/sm_user_service.hpp +++ b/stratosphere/sm/source/sm_user_service.hpp @@ -41,7 +41,7 @@ namespace ams::sm { Result GetServiceHandle(tipc::OutMoveHandle out_h, ServiceName service) { R_UNLESS(m_initialized, sm::ResultInvalidClient()); - return this->RegisterRetryIfDeferred(service, [&] ALWAYS_INLINE_LAMBDA () -> Result { + return this->RegisterRetryIfDeferred(service, [&]() ALWAYS_INLINE_LAMBDA -> Result { return impl::GetServiceHandle(out_h.GetPointer(), m_process_id, service); }); } @@ -66,7 +66,7 @@ namespace ams::sm { /* Atmosphere commands. */ Result AtmosphereInstallMitm(tipc::OutMoveHandle srv_h, tipc::OutMoveHandle qry_h, ServiceName service) { R_UNLESS(m_initialized, sm::ResultInvalidClient()); - return this->RegisterRetryIfDeferred(service, [&] ALWAYS_INLINE_LAMBDA () -> Result { + return this->RegisterRetryIfDeferred(service, [&]() ALWAYS_INLINE_LAMBDA -> Result { return impl::InstallMitm(srv_h.GetPointer(), qry_h.GetPointer(), m_process_id, service); }); } @@ -88,7 +88,7 @@ namespace ams::sm { Result AtmosphereWaitMitm(ServiceName service) { R_UNLESS(m_initialized, sm::ResultInvalidClient()); - return this->RegisterRetryIfDeferred(service, [&] ALWAYS_INLINE_LAMBDA () -> Result { + return this->RegisterRetryIfDeferred(service, [&]() ALWAYS_INLINE_LAMBDA -> Result { return impl::WaitMitm(service); }); } @@ -110,7 +110,7 @@ namespace ams::sm { Result AtmosphereWaitService(ServiceName service) { R_UNLESS(m_initialized, sm::ResultInvalidClient()); - return this->RegisterRetryIfDeferred(service, [&] ALWAYS_INLINE_LAMBDA () -> Result { + return this->RegisterRetryIfDeferred(service, [&]() ALWAYS_INLINE_LAMBDA -> Result { return impl::WaitService(service); }); }