summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.cpp2
-rw-r--r--src/core/core_timing.cpp2
-rw-r--r--src/core/debugger/gdbstub_arch.cpp4
-rw-r--r--src/core/file_sys/ips_layer.cpp8
-rw-r--r--src/core/file_sys/program_metadata.cpp2
-rw-r--r--src/core/file_sys/registered_cache.cpp2
-rw-r--r--src/core/hid/emulated_devices.cpp2
-rw-r--r--src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp4
-rw-r--r--src/core/hle/kernel/init/init_slab_setup.cpp4
-rw-r--r--src/core/hle/kernel/k_capabilities.cpp6
-rw-r--r--src/core/hle/kernel/k_memory_manager.h6
-rw-r--r--src/core/hle/kernel/k_page_heap.cpp2
-rw-r--r--src/core/hle/kernel/k_page_table.cpp4
-rw-r--r--src/core/hle/kernel/kernel.cpp42
-rw-r--r--src/core/hle/kernel/process_capability.cpp2
-rw-r--r--src/core/hle/kernel/svc/svc_activity.cpp2
-rw-r--r--src/core/hle/kernel/svc/svc_info.cpp2
-rw-r--r--src/core/hle/kernel/svc/svc_memory.cpp2
-rw-r--r--src/core/hle/service/acc/acc.cpp2
-rw-r--r--src/core/hle/service/am/am.cpp6
-rw-r--r--src/core/hle/service/am/applets/applet_software_keyboard.cpp8
-rw-r--r--src/core/hle/service/apm/apm_controller.cpp2
-rw-r--r--src/core/hle/service/audio/audctl.cpp4
-rw-r--r--src/core/hle/service/audio/hwopus.cpp2
-rw-r--r--src/core/hle/service/caps/caps_u.cpp4
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp2
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp6
-rw-r--r--src/core/hle/service/mii/mii_manager.cpp2
-rw-r--r--src/core/hle/service/nfp/amiibo_crypto.cpp12
-rw-r--r--src/core/hle/service/nifm/nifm.cpp2
-rw-r--r--src/core/hle/service/nvdrv/core/syncpoint_manager.cpp4
-rw-r--r--src/core/hle/service/nvflinger/buffer_queue_consumer.cpp2
-rw-r--r--src/core/hle/service/olsc/olsc.cpp2
-rw-r--r--src/core/hle/service/prepo/prepo.cpp4
-rw-r--r--src/core/hle/service/sockets/sfdnsres.cpp4
-rw-r--r--src/core/hle/service/ssl/ssl.cpp4
-rw-r--r--src/core/hle/service/time/time_zone_manager.cpp8
-rw-r--r--src/core/hle/service/vi/vi.cpp8
-rw-r--r--src/core/perf_stats.cpp2
-rw-r--r--src/core/telemetry_session.cpp4
40 files changed, 96 insertions, 96 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 47292cd78..7ba13ab51 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -361,7 +361,7 @@ struct System::Impl {
361 // Log last frame performance stats if game was loded 361 // Log last frame performance stats if game was loded
362 if (perf_stats) { 362 if (perf_stats) {
363 const auto perf_results = GetAndResetPerfStats(); 363 const auto perf_results = GetAndResetPerfStats();
364 constexpr auto performance = Common::Telemetry::FieldType::Performance; 364 constexpr static auto performance = Common::Telemetry::FieldType::Performance;
365 365
366 telemetry_session->AddField(performance, "Shutdown_EmulationSpeed", 366 telemetry_session->AddField(performance, "Shutdown_EmulationSpeed",
367 perf_results.emulation_speed * 100.0); 367 perf_results.emulation_speed * 100.0);
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index 6bac6722f..5214e88b8 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -45,7 +45,7 @@ CoreTiming::~CoreTiming() {
45} 45}
46 46
47void CoreTiming::ThreadEntry(CoreTiming& instance) { 47void CoreTiming::ThreadEntry(CoreTiming& instance) {
48 constexpr char name[] = "HostTiming"; 48 constexpr static char name[] = "HostTiming";
49 MicroProfileOnThreadCreate(name); 49 MicroProfileOnThreadCreate(name);
50 Common::SetCurrentThreadName(name); 50 Common::SetCurrentThreadName(name);
51 Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical); 51 Common::SetCurrentThreadPriority(Common::ThreadPriority::Critical);
diff --git a/src/core/debugger/gdbstub_arch.cpp b/src/core/debugger/gdbstub_arch.cpp
index 4bef09bd7..b13c473bb 100644
--- a/src/core/debugger/gdbstub_arch.cpp
+++ b/src/core/debugger/gdbstub_arch.cpp
@@ -42,7 +42,7 @@ static void PutSIMDRegister(std::array<u32, 64>& simd_regs, size_t offset, const
42// For sample XML files see the GDB source /gdb/features 42// For sample XML files see the GDB source /gdb/features
43// This XML defines what the registers are for this specific ARM device 43// This XML defines what the registers are for this specific ARM device
44std::string GDBStubA64::GetTargetXML() const { 44std::string GDBStubA64::GetTargetXML() const {
45 constexpr const char* target_xml = 45 constexpr static const char* target_xml =
46 R"(<?xml version="1.0"?> 46 R"(<?xml version="1.0"?>
47<!DOCTYPE target SYSTEM "gdb-target.dtd"> 47<!DOCTYPE target SYSTEM "gdb-target.dtd">
48<target version="1.0"> 48<target version="1.0">
@@ -271,7 +271,7 @@ u32 GDBStubA64::BreakpointInstruction() const {
271} 271}
272 272
273std::string GDBStubA32::GetTargetXML() const { 273std::string GDBStubA32::GetTargetXML() const {
274 constexpr const char* target_xml = 274 constexpr static const char* target_xml =
275 R"(<?xml version="1.0"?> 275 R"(<?xml version="1.0"?>
276<!DOCTYPE target SYSTEM "gdb-target.dtd"> 276<!DOCTYPE target SYSTEM "gdb-target.dtd">
277<target version="1.0"> 277<target version="1.0">
diff --git a/src/core/file_sys/ips_layer.cpp b/src/core/file_sys/ips_layer.cpp
index 5aab428bb..0a86e8b0a 100644
--- a/src/core/file_sys/ips_layer.cpp
+++ b/src/core/file_sys/ips_layer.cpp
@@ -41,12 +41,12 @@ static IPSFileType IdentifyMagic(const std::vector<u8>& magic) {
41 return IPSFileType::Error; 41 return IPSFileType::Error;
42 } 42 }
43 43
44 constexpr std::array<u8, 5> patch_magic{{'P', 'A', 'T', 'C', 'H'}}; 44 constexpr static std::array<u8, 5> patch_magic{{'P', 'A', 'T', 'C', 'H'}};
45 if (std::equal(magic.begin(), magic.end(), patch_magic.begin())) { 45 if (std::equal(magic.begin(), magic.end(), patch_magic.begin())) {
46 return IPSFileType::IPS; 46 return IPSFileType::IPS;
47 } 47 }
48 48
49 constexpr std::array<u8, 5> ips32_magic{{'I', 'P', 'S', '3', '2'}}; 49 constexpr static std::array<u8, 5> ips32_magic{{'I', 'P', 'S', '3', '2'}};
50 if (std::equal(magic.begin(), magic.end(), ips32_magic.begin())) { 50 if (std::equal(magic.begin(), magic.end(), ips32_magic.begin())) {
51 return IPSFileType::IPS32; 51 return IPSFileType::IPS32;
52 } 52 }
@@ -55,12 +55,12 @@ static IPSFileType IdentifyMagic(const std::vector<u8>& magic) {
55} 55}
56 56
57static bool IsEOF(IPSFileType type, const std::vector<u8>& data) { 57static bool IsEOF(IPSFileType type, const std::vector<u8>& data) {
58 constexpr std::array<u8, 3> eof{{'E', 'O', 'F'}}; 58 constexpr static std::array<u8, 3> eof{{'E', 'O', 'F'}};
59 if (type == IPSFileType::IPS && std::equal(data.begin(), data.end(), eof.begin())) { 59 if (type == IPSFileType::IPS && std::equal(data.begin(), data.end(), eof.begin())) {
60 return true; 60 return true;
61 } 61 }
62 62
63 constexpr std::array<u8, 4> eeof{{'E', 'E', 'O', 'F'}}; 63 constexpr static std::array<u8, 4> eeof{{'E', 'E', 'O', 'F'}};
64 return type == IPSFileType::IPS32 && std::equal(data.begin(), data.end(), eeof.begin()); 64 return type == IPSFileType::IPS32 && std::equal(data.begin(), data.end(), eeof.begin());
65} 65}
66 66
diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp
index f00479bd3..cb172f574 100644
--- a/src/core/file_sys/program_metadata.cpp
+++ b/src/core/file_sys/program_metadata.cpp
@@ -97,7 +97,7 @@ Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) {
97 97
98/*static*/ ProgramMetadata ProgramMetadata::GetDefault() { 98/*static*/ ProgramMetadata ProgramMetadata::GetDefault() {
99 // Allow use of cores 0~3 and thread priorities 1~63. 99 // Allow use of cores 0~3 and thread priorities 1~63.
100 constexpr u32 default_thread_info_capability = 0x30007F7; 100 constexpr static u32 default_thread_info_capability = 0x30007F7;
101 101
102 ProgramMetadata result; 102 ProgramMetadata result;
103 103
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp
index 878d832c2..0f1f76949 100644
--- a/src/core/file_sys/registered_cache.cpp
+++ b/src/core/file_sys/registered_cache.cpp
@@ -71,7 +71,7 @@ static std::string GetRelativePathFromNcaID(const std::array<u8, 16>& nca_id, bo
71} 71}
72 72
73static std::string GetCNMTName(TitleType type, u64 title_id) { 73static std::string GetCNMTName(TitleType type, u64 title_id) {
74 constexpr std::array<const char*, 9> TITLE_TYPE_NAMES{ 74 constexpr static std::array<const char*, 9> TITLE_TYPE_NAMES{
75 "SystemProgram", 75 "SystemProgram",
76 "SystemData", 76 "SystemData",
77 "SystemUpdate", 77 "SystemUpdate",
diff --git a/src/core/hid/emulated_devices.cpp b/src/core/hid/emulated_devices.cpp
index 836f32c0f..e380da3a4 100644
--- a/src/core/hid/emulated_devices.cpp
+++ b/src/core/hid/emulated_devices.cpp
@@ -213,7 +213,7 @@ void EmulatedDevices::SetKeyboardButton(const Common::Input::CallbackStatus& cal
213} 213}
214 214
215void EmulatedDevices::UpdateKey(std::size_t key_index, bool status) { 215void EmulatedDevices::UpdateKey(std::size_t key_index, bool status) {
216 constexpr std::size_t KEYS_PER_BYTE = 8; 216 constexpr static std::size_t KEYS_PER_BYTE = 8;
217 auto& entry = device_status.keyboard_state.key[key_index / KEYS_PER_BYTE]; 217 auto& entry = device_status.keyboard_state.key[key_index / KEYS_PER_BYTE];
218 const u8 mask = static_cast<u8>(1 << (key_index % KEYS_PER_BYTE)); 218 const u8 mask = static_cast<u8>(1 << (key_index % KEYS_PER_BYTE));
219 if (status) { 219 if (status) {
diff --git a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
index c10b7bf30..49098d2c9 100644
--- a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
+++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
@@ -114,13 +114,13 @@ size_t KSystemControl::Init::GetAppletPoolSize() {
114 }(); 114 }();
115 115
116 // Return (possibly) adjusted size. 116 // Return (possibly) adjusted size.
117 constexpr size_t ExtraSystemMemoryForAtmosphere = 33_MiB; 117 constexpr static size_t ExtraSystemMemoryForAtmosphere = 33_MiB;
118 return base_pool_size - ExtraSystemMemoryForAtmosphere - KTraceBufferSize; 118 return base_pool_size - ExtraSystemMemoryForAtmosphere - KTraceBufferSize;
119} 119}
120 120
121size_t KSystemControl::Init::GetMinimumNonSecureSystemPoolSize() { 121size_t KSystemControl::Init::GetMinimumNonSecureSystemPoolSize() {
122 // Verify that our minimum is at least as large as Nintendo's. 122 // Verify that our minimum is at least as large as Nintendo's.
123 constexpr size_t MinimumSize = RequiredNonSecureSystemMemorySize; 123 constexpr static size_t MinimumSize = RequiredNonSecureSystemMemorySize;
124 static_assert(MinimumSize >= 0x29C8000); 124 static_assert(MinimumSize >= 0x29C8000);
125 125
126 return MinimumSize; 126 return MinimumSize;
diff --git a/src/core/hle/kernel/init/init_slab_setup.cpp b/src/core/hle/kernel/init/init_slab_setup.cpp
index 571acf4b2..951326a85 100644
--- a/src/core/hle/kernel/init/init_slab_setup.cpp
+++ b/src/core/hle/kernel/init/init_slab_setup.cpp
@@ -129,7 +129,7 @@ VAddr InitializeSlabHeap(Core::System& system, KMemoryLayout& memory_layout, VAd
129} 129}
130 130
131size_t CalculateSlabHeapGapSize() { 131size_t CalculateSlabHeapGapSize() {
132 constexpr size_t KernelSlabHeapGapSize = 2_MiB - 320_KiB; 132 constexpr static size_t KernelSlabHeapGapSize = 2_MiB - 320_KiB;
133 static_assert(KernelSlabHeapGapSize <= KernelSlabHeapGapsSizeMax); 133 static_assert(KernelSlabHeapGapSize <= KernelSlabHeapGapsSizeMax);
134 return KernelSlabHeapGapSize; 134 return KernelSlabHeapGapSize;
135} 135}
@@ -272,7 +272,7 @@ void KPageBufferSlabHeap::Initialize(Core::System& system) {
272 kernel.GetSystemResourceLimit()->Reserve(LimitableResource::PhysicalMemoryMax, slab_size)); 272 kernel.GetSystemResourceLimit()->Reserve(LimitableResource::PhysicalMemoryMax, slab_size));
273 273
274 // Allocate memory for the slab. 274 // Allocate memory for the slab.
275 constexpr auto AllocateOption = KMemoryManager::EncodeOption( 275 constexpr static auto AllocateOption = KMemoryManager::EncodeOption(
276 KMemoryManager::Pool::System, KMemoryManager::Direction::FromFront); 276 KMemoryManager::Pool::System, KMemoryManager::Direction::FromFront);
277 const PAddr slab_address = 277 const PAddr slab_address =
278 kernel.MemoryManager().AllocateAndOpenContinuous(num_pages, 1, AllocateOption); 278 kernel.MemoryManager().AllocateAndOpenContinuous(num_pages, 1, AllocateOption);
diff --git a/src/core/hle/kernel/k_capabilities.cpp b/src/core/hle/kernel/k_capabilities.cpp
index 2907cc6e3..374bc2c06 100644
--- a/src/core/hle/kernel/k_capabilities.cpp
+++ b/src/core/hle/kernel/k_capabilities.cpp
@@ -21,8 +21,8 @@ Result KCapabilities::InitializeForKIP(std::span<const u32> kern_caps, KPageTabl
21 m_program_type = 0; 21 m_program_type = 0;
22 22
23 // Initial processes may run on all cores. 23 // Initial processes may run on all cores.
24 constexpr u64 VirtMask = Core::Hardware::VirtualCoreMask; 24 constexpr static u64 VirtMask = Core::Hardware::VirtualCoreMask;
25 constexpr u64 PhysMask = Core::Hardware::ConvertVirtualCoreMaskToPhysical(VirtMask); 25 constexpr static u64 PhysMask = Core::Hardware::ConvertVirtualCoreMaskToPhysical(VirtMask);
26 26
27 m_core_mask = VirtMask; 27 m_core_mask = VirtMask;
28 m_phys_core_mask = PhysMask; 28 m_phys_core_mask = PhysMask;
@@ -170,7 +170,7 @@ Result KCapabilities::MapIoPage_(const u32 cap, KPageTable* page_table) {
170template <typename F> 170template <typename F>
171Result KCapabilities::ProcessMapRegionCapability(const u32 cap, F f) { 171Result KCapabilities::ProcessMapRegionCapability(const u32 cap, F f) {
172 // Define the allowed memory regions. 172 // Define the allowed memory regions.
173 constexpr std::array<KMemoryRegionType, 4> MemoryRegions{ 173 constexpr static std::array<KMemoryRegionType, 4> MemoryRegions{
174 KMemoryRegionType_None, 174 KMemoryRegionType_None,
175 KMemoryRegionType_KernelTraceBuffer, 175 KMemoryRegionType_KernelTraceBuffer,
176 KMemoryRegionType_OnMemoryBootImage, 176 KMemoryRegionType_OnMemoryBootImage,
diff --git a/src/core/hle/kernel/k_memory_manager.h b/src/core/hle/kernel/k_memory_manager.h
index 401d4e644..d13549b5e 100644
--- a/src/core/hle/kernel/k_memory_manager.h
+++ b/src/core/hle/kernel/k_memory_manager.h
@@ -121,7 +121,7 @@ public:
121 } 121 }
122 122
123 size_t GetSize(Pool pool) { 123 size_t GetSize(Pool pool) {
124 constexpr Direction GetSizeDirection = Direction::FromFront; 124 constexpr static Direction GetSizeDirection = Direction::FromFront;
125 size_t total = 0; 125 size_t total = 0;
126 for (auto* manager = this->GetFirstManager(pool, GetSizeDirection); manager != nullptr; 126 for (auto* manager = this->GetFirstManager(pool, GetSizeDirection); manager != nullptr;
127 manager = this->GetNextManager(manager, GetSizeDirection)) { 127 manager = this->GetNextManager(manager, GetSizeDirection)) {
@@ -142,7 +142,7 @@ public:
142 size_t GetFreeSize(Pool pool) { 142 size_t GetFreeSize(Pool pool) {
143 KScopedLightLock lk(m_pool_locks[static_cast<size_t>(pool)]); 143 KScopedLightLock lk(m_pool_locks[static_cast<size_t>(pool)]);
144 144
145 constexpr Direction GetSizeDirection = Direction::FromFront; 145 constexpr static Direction GetSizeDirection = Direction::FromFront;
146 size_t total = 0; 146 size_t total = 0;
147 for (auto* manager = this->GetFirstManager(pool, GetSizeDirection); manager != nullptr; 147 for (auto* manager = this->GetFirstManager(pool, GetSizeDirection); manager != nullptr;
148 manager = this->GetNextManager(manager, GetSizeDirection)) { 148 manager = this->GetNextManager(manager, GetSizeDirection)) {
@@ -154,7 +154,7 @@ public:
154 void DumpFreeList(Pool pool) { 154 void DumpFreeList(Pool pool) {
155 KScopedLightLock lk(m_pool_locks[static_cast<size_t>(pool)]); 155 KScopedLightLock lk(m_pool_locks[static_cast<size_t>(pool)]);
156 156
157 constexpr Direction DumpDirection = Direction::FromFront; 157 constexpr static Direction DumpDirection = Direction::FromFront;
158 for (auto* manager = this->GetFirstManager(pool, DumpDirection); manager != nullptr; 158 for (auto* manager = this->GetFirstManager(pool, DumpDirection); manager != nullptr;
159 manager = this->GetNextManager(manager, DumpDirection)) { 159 manager = this->GetNextManager(manager, DumpDirection)) {
160 manager->DumpFreeList(); 160 manager->DumpFreeList();
diff --git a/src/core/hle/kernel/k_page_heap.cpp b/src/core/hle/kernel/k_page_heap.cpp
index 7b02c7d8b..ffebf0a35 100644
--- a/src/core/hle/kernel/k_page_heap.cpp
+++ b/src/core/hle/kernel/k_page_heap.cpp
@@ -68,7 +68,7 @@ PAddr KPageHeap::AllocateByRandom(s32 index, size_t num_pages, size_t align_page
68 const size_t align_shift = std::countr_zero(align_size); 68 const size_t align_shift = std::countr_zero(align_size);
69 69
70 // Decide on a block to allocate from. 70 // Decide on a block to allocate from.
71 constexpr size_t MinimumPossibleAlignmentsForRandomAllocation = 4; 71 constexpr static size_t MinimumPossibleAlignmentsForRandomAllocation = 4;
72 { 72 {
73 // By default, we'll want to look at all blocks larger than our current one. 73 // By default, we'll want to look at all blocks larger than our current one.
74 s32 max_blocks = static_cast<s32>(m_num_blocks); 74 s32 max_blocks = static_cast<s32>(m_num_blocks);
diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp
index 2e13d5d0d..d3e0334ed 100644
--- a/src/core/hle/kernel/k_page_table.cpp
+++ b/src/core/hle/kernel/k_page_table.cpp
@@ -134,7 +134,7 @@ Result KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_type
134 } 134 }
135 135
136 // Set code regions and determine remaining 136 // Set code regions and determine remaining
137 constexpr size_t RegionAlignment{2_MiB}; 137 constexpr static size_t RegionAlignment{2_MiB};
138 VAddr process_code_start{}; 138 VAddr process_code_start{};
139 VAddr process_code_end{}; 139 VAddr process_code_end{};
140 size_t stack_region_size{}; 140 size_t stack_region_size{};
@@ -2624,7 +2624,7 @@ Result KPageTable::SetMemoryAttribute(VAddr addr, size_t size, u32 mask, u32 att
2624 KMemoryPermission old_perm; 2624 KMemoryPermission old_perm;
2625 KMemoryAttribute old_attr; 2625 KMemoryAttribute old_attr;
2626 size_t num_allocator_blocks; 2626 size_t num_allocator_blocks;
2627 constexpr auto AttributeTestMask = 2627 constexpr static auto AttributeTestMask =
2628 ~(KMemoryAttribute::SetMask | KMemoryAttribute::DeviceShared); 2628 ~(KMemoryAttribute::SetMask | KMemoryAttribute::DeviceShared);
2629 R_TRY(this->CheckMemoryState( 2629 R_TRY(this->CheckMemoryState(
2630 std::addressof(old_state), std::addressof(old_perm), std::addressof(old_attr), 2630 std::addressof(old_state), std::addressof(old_perm), std::addressof(old_attr),
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 5b72eaaa1..563e2681b 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -254,7 +254,7 @@ struct KernelCore::Impl {
254 system_resource_limit->Reserve(LimitableResource::PhysicalMemoryMax, kernel_size); 254 system_resource_limit->Reserve(LimitableResource::PhysicalMemoryMax, kernel_size);
255 255
256 // Reserve secure applet memory, introduced in firmware 5.0.0 256 // Reserve secure applet memory, introduced in firmware 5.0.0
257 constexpr u64 secure_applet_memory_size{4_MiB}; 257 constexpr static u64 secure_applet_memory_size{4_MiB};
258 ASSERT(system_resource_limit->Reserve(LimitableResource::PhysicalMemoryMax, 258 ASSERT(system_resource_limit->Reserve(LimitableResource::PhysicalMemoryMax,
259 secure_applet_memory_size)); 259 secure_applet_memory_size));
260 } 260 }
@@ -477,9 +477,9 @@ struct KernelCore::Impl {
477 const VAddr code_end_virt_addr = KernelVirtualAddressCodeEnd; 477 const VAddr code_end_virt_addr = KernelVirtualAddressCodeEnd;
478 478
479 // Setup the containing kernel region. 479 // Setup the containing kernel region.
480 constexpr size_t KernelRegionSize = 1_GiB; 480 constexpr static size_t KernelRegionSize = 1_GiB;
481 constexpr size_t KernelRegionAlign = 1_GiB; 481 constexpr static size_t KernelRegionAlign = 1_GiB;
482 constexpr VAddr kernel_region_start = 482 constexpr static VAddr kernel_region_start =
483 Common::AlignDown(code_start_virt_addr, KernelRegionAlign); 483 Common::AlignDown(code_start_virt_addr, KernelRegionAlign);
484 size_t kernel_region_size = KernelRegionSize; 484 size_t kernel_region_size = KernelRegionSize;
485 if (!(kernel_region_start + KernelRegionSize - 1 <= KernelVirtualAddressSpaceLast)) { 485 if (!(kernel_region_start + KernelRegionSize - 1 <= KernelVirtualAddressSpaceLast)) {
@@ -489,11 +489,11 @@ struct KernelCore::Impl {
489 kernel_region_start, kernel_region_size, KMemoryRegionType_Kernel)); 489 kernel_region_start, kernel_region_size, KMemoryRegionType_Kernel));
490 490
491 // Setup the code region. 491 // Setup the code region.
492 constexpr size_t CodeRegionAlign = PageSize; 492 constexpr static size_t CodeRegionAlign = PageSize;
493 constexpr VAddr code_region_start = 493 constexpr static VAddr code_region_start =
494 Common::AlignDown(code_start_virt_addr, CodeRegionAlign); 494 Common::AlignDown(code_start_virt_addr, CodeRegionAlign);
495 constexpr VAddr code_region_end = Common::AlignUp(code_end_virt_addr, CodeRegionAlign); 495 constexpr static VAddr code_region_end = Common::AlignUp(code_end_virt_addr, CodeRegionAlign);
496 constexpr size_t code_region_size = code_region_end - code_region_start; 496 constexpr static size_t code_region_size = code_region_end - code_region_start;
497 ASSERT(memory_layout->GetVirtualMemoryRegionTree().Insert( 497 ASSERT(memory_layout->GetVirtualMemoryRegionTree().Insert(
498 code_region_start, code_region_size, KMemoryRegionType_KernelCode)); 498 code_region_start, code_region_size, KMemoryRegionType_KernelCode));
499 499
@@ -524,8 +524,8 @@ struct KernelCore::Impl {
524 } 524 }
525 525
526 // Decide on the actual size for the misc region. 526 // Decide on the actual size for the misc region.
527 constexpr size_t MiscRegionAlign = KernelAslrAlignment; 527 constexpr static size_t MiscRegionAlign = KernelAslrAlignment;
528 constexpr size_t MiscRegionMinimumSize = 32_MiB; 528 constexpr static size_t MiscRegionMinimumSize = 32_MiB;
529 const size_t misc_region_size = Common::AlignUp( 529 const size_t misc_region_size = Common::AlignUp(
530 std::max(misc_region_needed_size, MiscRegionMinimumSize), MiscRegionAlign); 530 std::max(misc_region_needed_size, MiscRegionMinimumSize), MiscRegionAlign);
531 ASSERT(misc_region_size > 0); 531 ASSERT(misc_region_size > 0);
@@ -541,8 +541,8 @@ struct KernelCore::Impl {
541 const bool use_extra_resources = KSystemControl::Init::ShouldIncreaseThreadResourceLimit(); 541 const bool use_extra_resources = KSystemControl::Init::ShouldIncreaseThreadResourceLimit();
542 542
543 // Setup the stack region. 543 // Setup the stack region.
544 constexpr size_t StackRegionSize = 14_MiB; 544 constexpr static size_t StackRegionSize = 14_MiB;
545 constexpr size_t StackRegionAlign = KernelAslrAlignment; 545 constexpr static size_t StackRegionAlign = KernelAslrAlignment;
546 const VAddr stack_region_start = 546 const VAddr stack_region_start =
547 memory_layout->GetVirtualMemoryRegionTree().GetRandomAlignedRegion( 547 memory_layout->GetVirtualMemoryRegionTree().GetRandomAlignedRegion(
548 StackRegionSize, StackRegionAlign, KMemoryRegionType_Kernel); 548 StackRegionSize, StackRegionAlign, KMemoryRegionType_Kernel);
@@ -563,7 +563,7 @@ struct KernelCore::Impl {
563 const PAddr code_end_phys_addr = code_start_phys_addr + code_region_size; 563 const PAddr code_end_phys_addr = code_start_phys_addr + code_region_size;
564 const PAddr slab_start_phys_addr = code_end_phys_addr; 564 const PAddr slab_start_phys_addr = code_end_phys_addr;
565 const PAddr slab_end_phys_addr = slab_start_phys_addr + slab_region_size; 565 const PAddr slab_end_phys_addr = slab_start_phys_addr + slab_region_size;
566 constexpr size_t SlabRegionAlign = KernelAslrAlignment; 566 constexpr static size_t SlabRegionAlign = KernelAslrAlignment;
567 const size_t slab_region_needed_size = 567 const size_t slab_region_needed_size =
568 Common::AlignUp(code_end_phys_addr + slab_region_size, SlabRegionAlign) - 568 Common::AlignUp(code_end_phys_addr + slab_region_size, SlabRegionAlign) -
569 Common::AlignDown(code_end_phys_addr, SlabRegionAlign); 569 Common::AlignDown(code_end_phys_addr, SlabRegionAlign);
@@ -575,8 +575,8 @@ struct KernelCore::Impl {
575 slab_region_start, slab_region_size, KMemoryRegionType_KernelSlab)); 575 slab_region_start, slab_region_size, KMemoryRegionType_KernelSlab));
576 576
577 // Setup the temp region. 577 // Setup the temp region.
578 constexpr size_t TempRegionSize = 128_MiB; 578 constexpr static size_t TempRegionSize = 128_MiB;
579 constexpr size_t TempRegionAlign = KernelAslrAlignment; 579 constexpr static size_t TempRegionAlign = KernelAslrAlignment;
580 const VAddr temp_region_start = 580 const VAddr temp_region_start =
581 memory_layout->GetVirtualMemoryRegionTree().GetRandomAlignedRegion( 581 memory_layout->GetVirtualMemoryRegionTree().GetRandomAlignedRegion(
582 TempRegionSize, TempRegionAlign, KMemoryRegionType_Kernel); 582 TempRegionSize, TempRegionAlign, KMemoryRegionType_Kernel);
@@ -656,7 +656,7 @@ struct KernelCore::Impl {
656 ASSERT(linear_extents.GetEndAddress() != 0); 656 ASSERT(linear_extents.GetEndAddress() != 0);
657 657
658 // Setup the linear mapping region. 658 // Setup the linear mapping region.
659 constexpr size_t LinearRegionAlign = 1_GiB; 659 constexpr static size_t LinearRegionAlign = 1_GiB;
660 const PAddr aligned_linear_phys_start = 660 const PAddr aligned_linear_phys_start =
661 Common::AlignDown(linear_extents.GetAddress(), LinearRegionAlign); 661 Common::AlignDown(linear_extents.GetAddress(), LinearRegionAlign);
662 const size_t linear_region_size = 662 const size_t linear_region_size =
@@ -737,11 +737,11 @@ struct KernelCore::Impl {
737 void InitializeHackSharedMemory() { 737 void InitializeHackSharedMemory() {
738 // Setup memory regions for emulated processes 738 // Setup memory regions for emulated processes
739 // TODO(bunnei): These should not be hardcoded regions initialized within the kernel 739 // TODO(bunnei): These should not be hardcoded regions initialized within the kernel
740 constexpr std::size_t hid_size{0x40000}; 740 constexpr static std::size_t hid_size{0x40000};
741 constexpr std::size_t font_size{0x1100000}; 741 constexpr static std::size_t font_size{0x1100000};
742 constexpr std::size_t irs_size{0x8000}; 742 constexpr static std::size_t irs_size{0x8000};
743 constexpr std::size_t time_size{0x1000}; 743 constexpr static std::size_t time_size{0x1000};
744 constexpr std::size_t hidbus_size{0x1000}; 744 constexpr static std::size_t hidbus_size{0x1000};
745 745
746 hid_shared_mem = KSharedMemory::Create(system.Kernel()); 746 hid_shared_mem = KSharedMemory::Create(system.Kernel());
747 font_shared_mem = KSharedMemory::Create(system.Kernel()); 747 font_shared_mem = KSharedMemory::Create(system.Kernel());
diff --git a/src/core/hle/kernel/process_capability.cpp b/src/core/hle/kernel/process_capability.cpp
index 773319ad8..de322cbf9 100644
--- a/src/core/hle/kernel/process_capability.cpp
+++ b/src/core/hle/kernel/process_capability.cpp
@@ -306,7 +306,7 @@ Result ProcessCapabilities::HandleMapRegionFlags(u32 flags, KPageTable& page_tab
306} 306}
307 307
308Result ProcessCapabilities::HandleInterruptFlags(u32 flags) { 308Result ProcessCapabilities::HandleInterruptFlags(u32 flags) {
309 constexpr u32 interrupt_ignore_value = 0x3FF; 309 constexpr static u32 interrupt_ignore_value = 0x3FF;
310 const u32 interrupt0 = (flags >> 12) & 0x3FF; 310 const u32 interrupt0 = (flags >> 12) & 0x3FF;
311 const u32 interrupt1 = (flags >> 22) & 0x3FF; 311 const u32 interrupt1 = (flags >> 22) & 0x3FF;
312 312
diff --git a/src/core/hle/kernel/svc/svc_activity.cpp b/src/core/hle/kernel/svc/svc_activity.cpp
index 1dcdb7a15..0fd1b3d4c 100644
--- a/src/core/hle/kernel/svc/svc_activity.cpp
+++ b/src/core/hle/kernel/svc/svc_activity.cpp
@@ -16,7 +16,7 @@ Result SetThreadActivity(Core::System& system, Handle thread_handle,
16 thread_activity); 16 thread_activity);
17 17
18 // Validate the activity. 18 // Validate the activity.
19 constexpr auto IsValidThreadActivity = [](ThreadActivity activity) { 19 constexpr static auto IsValidThreadActivity = [](ThreadActivity activity) {
20 return activity == ThreadActivity::Runnable || activity == ThreadActivity::Paused; 20 return activity == ThreadActivity::Runnable || activity == ThreadActivity::Paused;
21 }; 21 };
22 R_UNLESS(IsValidThreadActivity(thread_activity), ResultInvalidEnumValue); 22 R_UNLESS(IsValidThreadActivity(thread_activity), ResultInvalidEnumValue);
diff --git a/src/core/hle/kernel/svc/svc_info.cpp b/src/core/hle/kernel/svc/svc_info.cpp
index ad56e2fe6..c30ba0295 100644
--- a/src/core/hle/kernel/svc/svc_info.cpp
+++ b/src/core/hle/kernel/svc/svc_info.cpp
@@ -193,7 +193,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
193 return ResultSuccess; 193 return ResultSuccess;
194 194
195 case InfoType::ThreadTickCount: { 195 case InfoType::ThreadTickCount: {
196 constexpr u64 num_cpus = 4; 196 constexpr static u64 num_cpus = 4;
197 if (info_sub_id != 0xFFFFFFFFFFFFFFFF && info_sub_id >= num_cpus) { 197 if (info_sub_id != 0xFFFFFFFFFFFFFFFF && info_sub_id >= num_cpus) {
198 LOG_ERROR(Kernel_SVC, "Core count is out of range, expected {} but got {}", num_cpus, 198 LOG_ERROR(Kernel_SVC, "Core count is out of range, expected {} but got {}", num_cpus,
199 info_sub_id); 199 info_sub_id);
diff --git a/src/core/hle/kernel/svc/svc_memory.cpp b/src/core/hle/kernel/svc/svc_memory.cpp
index 21f818da6..7045c5e69 100644
--- a/src/core/hle/kernel/svc/svc_memory.cpp
+++ b/src/core/hle/kernel/svc/svc_memory.cpp
@@ -132,7 +132,7 @@ Result SetMemoryAttribute(Core::System& system, VAddr address, u64 size, u32 mas
132 R_UNLESS((address < address + size), ResultInvalidCurrentMemory); 132 R_UNLESS((address < address + size), ResultInvalidCurrentMemory);
133 133
134 // Validate the attribute and mask. 134 // Validate the attribute and mask.
135 constexpr u32 SupportedMask = static_cast<u32>(MemoryAttribute::Uncached); 135 constexpr static u32 SupportedMask = static_cast<u32>(MemoryAttribute::Uncached);
136 R_UNLESS((mask | attr) == mask, ResultInvalidCombination); 136 R_UNLESS((mask | attr) == mask, ResultInvalidCombination);
137 R_UNLESS((mask | attr | SupportedMask) == SupportedMask, ResultInvalidCombination); 137 R_UNLESS((mask | attr | SupportedMask) == SupportedMask, ResultInvalidCombination);
138 138
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 6d1084fd1..5b87bb18c 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -871,7 +871,7 @@ void Module::Interface::StoreSaveDataThumbnailApplication(Kernel::HLERequestCont
871 // TODO(ogniK): Check if application ID is zero on acc initialize. As we don't have a reliable 871 // TODO(ogniK): Check if application ID is zero on acc initialize. As we don't have a reliable
872 // way of confirming things like the TID, we're going to assume a non zero value for the time 872 // way of confirming things like the TID, we're going to assume a non zero value for the time
873 // being. 873 // being.
874 constexpr u64 tid{1}; 874 constexpr static u64 tid{1};
875 StoreSaveDataThumbnail(ctx, uuid, tid); 875 StoreSaveDataThumbnail(ctx, uuid, tid);
876} 876}
877 877
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index ebcf6e164..01f03effe 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -1086,7 +1086,7 @@ private:
1086 1086
1087 // We require a non-zero handle to be valid. Using 0xdeadbeef allows us to trace if this is 1087 // We require a non-zero handle to be valid. Using 0xdeadbeef allows us to trace if this is
1088 // actually used anywhere 1088 // actually used anywhere
1089 constexpr u64 handle = 0xdeadbeef; 1089 constexpr static u64 handle = 0xdeadbeef;
1090 1090
1091 IPC::ResponseBuilder rb{ctx, 4}; 1091 IPC::ResponseBuilder rb{ctx, 4};
1092 rb.Push(ResultSuccess); 1092 rb.Push(ResultSuccess);
@@ -1570,7 +1570,7 @@ void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) {
1570 const auto& version = res.first->GetVersionString(); 1570 const auto& version = res.first->GetVersionString();
1571 std::copy(version.begin(), version.end(), version_string.begin()); 1571 std::copy(version.begin(), version.end(), version_string.begin());
1572 } else { 1572 } else {
1573 constexpr char default_version[]{"1.0.0"}; 1573 constexpr static char default_version[]{"1.0.0"};
1574 std::memcpy(version_string.data(), default_version, sizeof(default_version)); 1574 std::memcpy(version_string.data(), default_version, sizeof(default_version));
1575 } 1575 }
1576 1576
@@ -1638,7 +1638,7 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
1638void IApplicationFunctions::IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx) { 1638void IApplicationFunctions::IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx) {
1639 LOG_WARNING(Service_AM, "(STUBBED) called"); 1639 LOG_WARNING(Service_AM, "(STUBBED) called");
1640 1640
1641 constexpr bool gameplay_recording_supported = false; 1641 constexpr static bool gameplay_recording_supported = false;
1642 1642
1643 IPC::ResponseBuilder rb{ctx, 3}; 1643 IPC::ResponseBuilder rb{ctx, 3};
1644 rb.Push(ResultSuccess); 1644 rb.Push(ResultSuccess);
diff --git a/src/core/hle/service/am/applets/applet_software_keyboard.cpp b/src/core/hle/service/am/applets/applet_software_keyboard.cpp
index c18236045..962371a99 100644
--- a/src/core/hle/service/am/applets/applet_software_keyboard.cpp
+++ b/src/core/hle/service/am/applets/applet_software_keyboard.cpp
@@ -1180,7 +1180,7 @@ void SoftwareKeyboard::ReplyChangedStringV2() {
1180 .cursor_position{current_cursor_position}, 1180 .cursor_position{current_cursor_position},
1181 }; 1181 };
1182 1182
1183 constexpr u8 flag = 0; 1183 constexpr static u8 flag = 0;
1184 1184
1185 std::memcpy(reply.data() + REPLY_BASE_SIZE, current_text.data(), 1185 std::memcpy(reply.data() + REPLY_BASE_SIZE, current_text.data(),
1186 current_text.size() * sizeof(char16_t)); 1186 current_text.size() * sizeof(char16_t));
@@ -1204,7 +1204,7 @@ void SoftwareKeyboard::ReplyMovedCursorV2() {
1204 .cursor_position{current_cursor_position}, 1204 .cursor_position{current_cursor_position},
1205 }; 1205 };
1206 1206
1207 constexpr u8 flag = 0; 1207 constexpr static u8 flag = 0;
1208 1208
1209 std::memcpy(reply.data() + REPLY_BASE_SIZE, current_text.data(), 1209 std::memcpy(reply.data() + REPLY_BASE_SIZE, current_text.data(),
1210 current_text.size() * sizeof(char16_t)); 1210 current_text.size() * sizeof(char16_t));
@@ -1232,7 +1232,7 @@ void SoftwareKeyboard::ReplyChangedStringUtf8V2() {
1232 .cursor_position{current_cursor_position}, 1232 .cursor_position{current_cursor_position},
1233 }; 1233 };
1234 1234
1235 constexpr u8 flag = 0; 1235 constexpr static u8 flag = 0;
1236 1236
1237 std::memcpy(reply.data() + REPLY_BASE_SIZE, utf8_current_text.data(), utf8_current_text.size()); 1237 std::memcpy(reply.data() + REPLY_BASE_SIZE, utf8_current_text.data(), utf8_current_text.size());
1238 std::memcpy(reply.data() + REPLY_BASE_SIZE + REPLY_UTF8_SIZE, &changed_string_arg, 1238 std::memcpy(reply.data() + REPLY_BASE_SIZE + REPLY_UTF8_SIZE, &changed_string_arg,
@@ -1257,7 +1257,7 @@ void SoftwareKeyboard::ReplyMovedCursorUtf8V2() {
1257 .cursor_position{current_cursor_position}, 1257 .cursor_position{current_cursor_position},
1258 }; 1258 };
1259 1259
1260 constexpr u8 flag = 0; 1260 constexpr static u8 flag = 0;
1261 1261
1262 std::memcpy(reply.data() + REPLY_BASE_SIZE, utf8_current_text.data(), utf8_current_text.size()); 1262 std::memcpy(reply.data() + REPLY_BASE_SIZE, utf8_current_text.data(), utf8_current_text.size());
1263 std::memcpy(reply.data() + REPLY_BASE_SIZE + REPLY_UTF8_SIZE, &moved_cursor_arg, 1263 std::memcpy(reply.data() + REPLY_BASE_SIZE + REPLY_UTF8_SIZE, &moved_cursor_arg,
diff --git a/src/core/hle/service/apm/apm_controller.cpp b/src/core/hle/service/apm/apm_controller.cpp
index d6de84066..7236f586d 100644
--- a/src/core/hle/service/apm/apm_controller.cpp
+++ b/src/core/hle/service/apm/apm_controller.cpp
@@ -56,7 +56,7 @@ void Controller::SetPerformanceConfiguration(PerformanceMode mode,
56} 56}
57 57
58void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { 58void Controller::SetFromCpuBoostMode(CpuBoostMode mode) {
59 constexpr std::array<PerformanceConfiguration, 3> BOOST_MODE_TO_CONFIG_MAP{{ 59 constexpr static std::array<PerformanceConfiguration, 3> BOOST_MODE_TO_CONFIG_MAP{{
60 PerformanceConfiguration::Config7, 60 PerformanceConfiguration::Config7,
61 PerformanceConfiguration::Config13, 61 PerformanceConfiguration::Config13,
62 PerformanceConfiguration::Config15, 62 PerformanceConfiguration::Config15,
diff --git a/src/core/hle/service/audio/audctl.cpp b/src/core/hle/service/audio/audctl.cpp
index 5abf22ba4..654d2c493 100644
--- a/src/core/hle/service/audio/audctl.cpp
+++ b/src/core/hle/service/audio/audctl.cpp
@@ -77,7 +77,7 @@ void AudCtl::GetTargetVolumeMin(Kernel::HLERequestContext& ctx) {
77 77
78 // This service function is currently hardcoded on the 78 // This service function is currently hardcoded on the
79 // actual console to this value (as of 8.0.0). 79 // actual console to this value (as of 8.0.0).
80 constexpr s32 target_min_volume = 0; 80 constexpr static s32 target_min_volume = 0;
81 81
82 IPC::ResponseBuilder rb{ctx, 3}; 82 IPC::ResponseBuilder rb{ctx, 3};
83 rb.Push(ResultSuccess); 83 rb.Push(ResultSuccess);
@@ -89,7 +89,7 @@ void AudCtl::GetTargetVolumeMax(Kernel::HLERequestContext& ctx) {
89 89
90 // This service function is currently hardcoded on the 90 // This service function is currently hardcoded on the
91 // actual console to this value (as of 8.0.0). 91 // actual console to this value (as of 8.0.0).
92 constexpr s32 target_max_volume = 15; 92 constexpr static s32 target_max_volume = 15;
93 93
94 IPC::ResponseBuilder rb{ctx, 3}; 94 IPC::ResponseBuilder rb{ctx, 3};
95 rb.Push(ResultSuccess); 95 rb.Push(ResultSuccess);
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp
index e01f87356..fe975157c 100644
--- a/src/core/hle/service/audio/hwopus.cpp
+++ b/src/core/hle/service/audio/hwopus.cpp
@@ -209,7 +209,7 @@ private:
209 209
210std::size_t WorkerBufferSize(u32 channel_count) { 210std::size_t WorkerBufferSize(u32 channel_count) {
211 ASSERT_MSG(channel_count == 1 || channel_count == 2, "Invalid channel count"); 211 ASSERT_MSG(channel_count == 1 || channel_count == 2, "Invalid channel count");
212 constexpr int num_streams = 1; 212 constexpr static int num_streams = 1;
213 const int num_stereo_streams = channel_count == 2 ? 1 : 0; 213 const int num_stereo_streams = channel_count == 2 ? 1 : 0;
214 return opus_multistream_decoder_get_size(num_streams, num_stereo_streams); 214 return opus_multistream_decoder_get_size(num_streams, num_stereo_streams);
215} 215}
diff --git a/src/core/hle/service/caps/caps_u.cpp b/src/core/hle/service/caps/caps_u.cpp
index 5fbba8673..1c2694645 100644
--- a/src/core/hle/service/caps/caps_u.cpp
+++ b/src/core/hle/service/caps/caps_u.cpp
@@ -77,8 +77,8 @@ void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& c
77 77
78 // TODO: Update this when we implement the album. 78 // TODO: Update this when we implement the album.
79 // Currently we do not have a method of accessing album entries, set this to 0 for now. 79 // Currently we do not have a method of accessing album entries, set this to 0 for now.
80 constexpr u32 total_entries_1{}; 80 constexpr static u32 total_entries_1{};
81 constexpr u32 total_entries_2{}; 81 constexpr static u32 total_entries_2{};
82 82
83 LOG_WARNING( 83 LOG_WARNING(
84 Service_Capture, 84 Service_Capture,
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 447d624e1..f95ad9253 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -942,7 +942,7 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(
942 942
943 const auto parameters = rp.PopRaw<Parameters>(); 943 const auto parameters = rp.PopRaw<Parameters>();
944 // Stub this to None for now, backend needs an impl to read/write the SaveDataExtraData 944 // Stub this to None for now, backend needs an impl to read/write the SaveDataExtraData
945 constexpr auto flags = static_cast<u32>(FileSys::SaveDataFlags::None); 945 constexpr static auto flags = static_cast<u32>(FileSys::SaveDataFlags::None);
946 946
947 LOG_WARNING(Service_FS, 947 LOG_WARNING(Service_FS,
948 "(STUBBED) called, flags={}, space_id={}, attribute.title_id={:016X}\n" 948 "(STUBBED) called, flags={}, space_id={}, attribute.title_id={:016X}\n"
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index ba6f04d8d..f4485141c 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -439,7 +439,7 @@ void Controller_NPad::RequestPadStateUpdate(Core::HID::NpadIdType npad_id) {
439 using btn = Core::HID::NpadButton; 439 using btn = Core::HID::NpadButton;
440 pad_entry.npad_buttons.raw = btn::None; 440 pad_entry.npad_buttons.raw = btn::None;
441 if (controller_type != Core::HID::NpadStyleIndex::JoyconLeft) { 441 if (controller_type != Core::HID::NpadStyleIndex::JoyconLeft) {
442 constexpr btn right_button_mask = btn::A | btn::B | btn::X | btn::Y | btn::StickR | btn::R | 442 constexpr static btn right_button_mask = btn::A | btn::B | btn::X | btn::Y | btn::StickR | btn::R |
443 btn::ZR | btn::Plus | btn::StickRLeft | btn::StickRUp | 443 btn::ZR | btn::Plus | btn::StickRLeft | btn::StickRUp |
444 btn::StickRRight | btn::StickRDown; 444 btn::StickRRight | btn::StickRDown;
445 pad_entry.npad_buttons.raw = button_state.raw & right_button_mask; 445 pad_entry.npad_buttons.raw = button_state.raw & right_button_mask;
@@ -447,7 +447,7 @@ void Controller_NPad::RequestPadStateUpdate(Core::HID::NpadIdType npad_id) {
447 } 447 }
448 448
449 if (controller_type != Core::HID::NpadStyleIndex::JoyconRight) { 449 if (controller_type != Core::HID::NpadStyleIndex::JoyconRight) {
450 constexpr btn left_button_mask = 450 constexpr static btn left_button_mask =
451 btn::Left | btn::Up | btn::Right | btn::Down | btn::StickL | btn::L | btn::ZL | 451 btn::Left | btn::Up | btn::Right | btn::Down | btn::StickL | btn::L | btn::ZL |
452 btn::Minus | btn::StickLLeft | btn::StickLUp | btn::StickLRight | btn::StickLDown; 452 btn::Minus | btn::StickLLeft | btn::StickLUp | btn::StickLRight | btn::StickLDown;
453 pad_entry.npad_buttons.raw |= button_state.raw & left_button_mask; 453 pad_entry.npad_buttons.raw |= button_state.raw & left_button_mask;
@@ -759,7 +759,7 @@ Core::HID::NpadStyleTag Controller_NPad::GetSupportedStyleSet() const {
759} 759}
760 760
761Result Controller_NPad::SetSupportedNpadIdTypes(std::span<const u8> data) { 761Result Controller_NPad::SetSupportedNpadIdTypes(std::span<const u8> data) {
762 constexpr std::size_t max_number_npad_ids = 0xa; 762 constexpr static std::size_t max_number_npad_ids = 0xa;
763 const auto length = data.size(); 763 const auto length = data.size();
764 ASSERT(length > 0 && (length % sizeof(u32)) == 0); 764 ASSERT(length > 0 && (length % sizeof(u32)) == 0);
765 const std::size_t elements = length / sizeof(u32); 765 const std::size_t elements = length / sizeof(u32);
diff --git a/src/core/hle/service/mii/mii_manager.cpp b/src/core/hle/service/mii/mii_manager.cpp
index 3a2fe938f..a1b187b63 100644
--- a/src/core/hle/service/mii/mii_manager.cpp
+++ b/src/core/hle/service/mii/mii_manager.cpp
@@ -670,7 +670,7 @@ ResultVal<std::vector<MiiInfoElement>> MiiManager::GetDefault(SourceFlag source_
670} 670}
671 671
672Result MiiManager::GetIndex([[maybe_unused]] const CharInfo& info, u32& index) { 672Result MiiManager::GetIndex([[maybe_unused]] const CharInfo& info, u32& index) {
673 constexpr u32 INVALID_INDEX{0xFFFFFFFF}; 673 constexpr static u32 INVALID_INDEX{0xFFFFFFFF};
674 674
675 index = INVALID_INDEX; 675 index = INVALID_INDEX;
676 676
diff --git a/src/core/hle/service/nfp/amiibo_crypto.cpp b/src/core/hle/service/nfp/amiibo_crypto.cpp
index ffb2f959c..0d9c3d0f6 100644
--- a/src/core/hle/service/nfp/amiibo_crypto.cpp
+++ b/src/core/hle/service/nfp/amiibo_crypto.cpp
@@ -35,7 +35,7 @@ bool IsAmiiboValid(const EncryptedNTAG215File& ntag_file) {
35 LOG_DEBUG(Service_NFP, "tag_CFG1=0x{0:x}", ntag_file.CFG1); 35 LOG_DEBUG(Service_NFP, "tag_CFG1=0x{0:x}", ntag_file.CFG1);
36 36
37 // Validate UUID 37 // Validate UUID
38 constexpr u8 CT = 0x88; // As defined in `ISO / IEC 14443 - 3` 38 constexpr static u8 CT = 0x88; // As defined in `ISO / IEC 14443 - 3`
39 if ((CT ^ ntag_file.uuid.uid[0] ^ ntag_file.uuid.uid[1] ^ ntag_file.uuid.uid[2]) != 39 if ((CT ^ ntag_file.uuid.uid[0] ^ ntag_file.uuid.uid[1] ^ ntag_file.uuid.uid[2]) !=
40 ntag_file.uuid.uid[3]) { 40 ntag_file.uuid.uid[3]) {
41 return false; 41 return false;
@@ -247,7 +247,7 @@ void Cipher(const DerivedKeys& keys, const NTAG215File& in_data, NTAG215File& ou
247 mbedtls_aes_setkey_enc(&aes, keys.aes_key.data(), aes_key_size); 247 mbedtls_aes_setkey_enc(&aes, keys.aes_key.data(), aes_key_size);
248 memcpy(nonce_counter.data(), keys.aes_iv.data(), sizeof(keys.aes_iv)); 248 memcpy(nonce_counter.data(), keys.aes_iv.data(), sizeof(keys.aes_iv));
249 249
250 constexpr std::size_t encrypted_data_size = HMAC_TAG_START - SETTINGS_START; 250 constexpr static std::size_t encrypted_data_size = HMAC_TAG_START - SETTINGS_START;
251 mbedtls_aes_crypt_ctr(&aes, encrypted_data_size, &nc_off, nonce_counter.data(), 251 mbedtls_aes_crypt_ctr(&aes, encrypted_data_size, &nc_off, nonce_counter.data(),
252 stream_block.data(), 252 stream_block.data(),
253 reinterpret_cast<const unsigned char*>(&in_data.settings), 253 reinterpret_cast<const unsigned char*>(&in_data.settings),
@@ -317,13 +317,13 @@ bool DecodeAmiibo(const EncryptedNTAG215File& encrypted_tag_data, NTAG215File& t
317 Cipher(data_keys, encoded_data, tag_data); 317 Cipher(data_keys, encoded_data, tag_data);
318 318
319 // Regenerate tag HMAC. Note: order matters, data HMAC depends on tag HMAC! 319 // Regenerate tag HMAC. Note: order matters, data HMAC depends on tag HMAC!
320 constexpr std::size_t input_length = DYNAMIC_LOCK_START - UUID_START; 320 constexpr static std::size_t input_length = DYNAMIC_LOCK_START - UUID_START;
321 mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256), tag_keys.hmac_key.data(), 321 mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256), tag_keys.hmac_key.data(),
322 sizeof(HmacKey), reinterpret_cast<const unsigned char*>(&tag_data.uid), 322 sizeof(HmacKey), reinterpret_cast<const unsigned char*>(&tag_data.uid),
323 input_length, reinterpret_cast<unsigned char*>(&tag_data.hmac_tag)); 323 input_length, reinterpret_cast<unsigned char*>(&tag_data.hmac_tag));
324 324
325 // Regenerate data HMAC 325 // Regenerate data HMAC
326 constexpr std::size_t input_length2 = DYNAMIC_LOCK_START - WRITE_COUNTER_START; 326 constexpr static std::size_t input_length2 = DYNAMIC_LOCK_START - WRITE_COUNTER_START;
327 mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256), data_keys.hmac_key.data(), 327 mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256), data_keys.hmac_key.data(),
328 sizeof(HmacKey), 328 sizeof(HmacKey),
329 reinterpret_cast<const unsigned char*>(&tag_data.write_counter), input_length2, 329 reinterpret_cast<const unsigned char*>(&tag_data.write_counter), input_length2,
@@ -357,8 +357,8 @@ bool EncodeAmiibo(const NTAG215File& tag_data, EncryptedNTAG215File& encrypted_t
357 NTAG215File encoded_tag_data{}; 357 NTAG215File encoded_tag_data{};
358 358
359 // Generate tag HMAC 359 // Generate tag HMAC
360 constexpr std::size_t input_length = DYNAMIC_LOCK_START - UUID_START; 360 constexpr static std::size_t input_length = DYNAMIC_LOCK_START - UUID_START;
361 constexpr std::size_t input_length2 = HMAC_TAG_START - WRITE_COUNTER_START; 361 constexpr static std::size_t input_length2 = HMAC_TAG_START - WRITE_COUNTER_START;
362 mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256), tag_keys.hmac_key.data(), 362 mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256), tag_keys.hmac_key.data(),
363 sizeof(HmacKey), reinterpret_cast<const unsigned char*>(&tag_data.uid), 363 sizeof(HmacKey), reinterpret_cast<const unsigned char*>(&tag_data.uid),
364 input_length, reinterpret_cast<unsigned char*>(&encoded_tag_data.hmac_tag)); 364 input_length, reinterpret_cast<unsigned char*>(&encoded_tag_data.hmac_tag));
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index 5d32adf64..df4f60d59 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -512,7 +512,7 @@ void IGeneralService::GetInternetConnectionStatus(Kernel::HLERequestContext& ctx
512 }; 512 };
513 static_assert(sizeof(Output) == 0x3, "Output has incorrect size."); 513 static_assert(sizeof(Output) == 0x3, "Output has incorrect size.");
514 514
515 constexpr Output out{}; 515 constexpr static Output out{};
516 516
517 IPC::ResponseBuilder rb{ctx, 3}; 517 IPC::ResponseBuilder rb{ctx, 3};
518 rb.Push(ResultSuccess); 518 rb.Push(ResultSuccess);
diff --git a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp b/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp
index aba51d280..1f0e05df6 100644
--- a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp
+++ b/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp
@@ -9,8 +9,8 @@
9namespace Service::Nvidia::NvCore { 9namespace Service::Nvidia::NvCore {
10 10
11SyncpointManager::SyncpointManager(Tegra::Host1x::Host1x& host1x_) : host1x{host1x_} { 11SyncpointManager::SyncpointManager(Tegra::Host1x::Host1x& host1x_) : host1x{host1x_} {
12 constexpr u32 VBlank0SyncpointId{26}; 12 constexpr static u32 VBlank0SyncpointId{26};
13 constexpr u32 VBlank1SyncpointId{27}; 13 constexpr static u32 VBlank1SyncpointId{27};
14 14
15 // Reserve both vblank syncpoints as client managed as they use Continuous Mode 15 // Reserve both vblank syncpoints as client managed as they use Continuous Mode
16 // Refer to section 14.3.5.3 of the TRM for more information on Continuous Mode 16 // Refer to section 14.3.5.3 of the TRM for more information on Continuous Mode
diff --git a/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp b/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp
index 0767e548d..3f41aa0d9 100644
--- a/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp
+++ b/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp
@@ -45,7 +45,7 @@ Status BufferQueueConsumer::AcquireBuffer(BufferItem* out_buffer,
45 45
46 // If expected_present is specified, we may not want to return a buffer yet. 46 // If expected_present is specified, we may not want to return a buffer yet.
47 if (expected_present.count() != 0) { 47 if (expected_present.count() != 0) {
48 constexpr auto MAX_REASONABLE_NSEC = 1000000000LL; // 1 second 48 constexpr static auto MAX_REASONABLE_NSEC = 1000000000LL; // 1 second
49 49
50 // The expected_present argument indicates when the buffer is expected to be presented 50 // The expected_present argument indicates when the buffer is expected to be presented
51 // on-screen. 51 // on-screen.
diff --git a/src/core/hle/service/olsc/olsc.cpp b/src/core/hle/service/olsc/olsc.cpp
index 530e1be3b..fbae10e7d 100644
--- a/src/core/hle/service/olsc/olsc.cpp
+++ b/src/core/hle/service/olsc/olsc.cpp
@@ -55,7 +55,7 @@ private:
55 LOG_WARNING(Service_OLSC, "(STUBBED) called"); 55 LOG_WARNING(Service_OLSC, "(STUBBED) called");
56 56
57 // backup_setting is set to 0 since real value is unknown 57 // backup_setting is set to 0 since real value is unknown
58 constexpr u64 backup_setting = 0; 58 constexpr static u64 backup_setting = 0;
59 59
60 IPC::ResponseBuilder rb{ctx, 4}; 60 IPC::ResponseBuilder rb{ctx, 4};
61 rb.Push(ResultSuccess); 61 rb.Push(ResultSuccess);
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp
index 01040b32a..155d6a00b 100644
--- a/src/core/hle/service/prepo/prepo.cpp
+++ b/src/core/hle/service/prepo/prepo.cpp
@@ -116,7 +116,7 @@ private:
116 void GetTransmissionStatus(Kernel::HLERequestContext& ctx) { 116 void GetTransmissionStatus(Kernel::HLERequestContext& ctx) {
117 LOG_WARNING(Service_PREPO, "(STUBBED) called"); 117 LOG_WARNING(Service_PREPO, "(STUBBED) called");
118 118
119 constexpr s32 status = 0; 119 constexpr static s32 status = 0;
120 120
121 IPC::ResponseBuilder rb{ctx, 3}; 121 IPC::ResponseBuilder rb{ctx, 3};
122 rb.Push(ResultSuccess); 122 rb.Push(ResultSuccess);
@@ -126,7 +126,7 @@ private:
126 void GetSystemSessionId(Kernel::HLERequestContext& ctx) { 126 void GetSystemSessionId(Kernel::HLERequestContext& ctx) {
127 LOG_WARNING(Service_PREPO, "(STUBBED) called"); 127 LOG_WARNING(Service_PREPO, "(STUBBED) called");
128 128
129 constexpr u64 system_session_id = 0; 129 constexpr static u64 system_session_id = 0;
130 IPC::ResponseBuilder rb{ctx, 4}; 130 IPC::ResponseBuilder rb{ctx, 4};
131 rb.Push(ResultSuccess); 131 rb.Push(ResultSuccess);
132 rb.Push(system_session_id); 132 rb.Push(system_session_id);
diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp
index e96eda7f3..831a51a67 100644
--- a/src/core/hle/service/sockets/sfdnsres.cpp
+++ b/src/core/hle/service/sockets/sfdnsres.cpp
@@ -92,7 +92,7 @@ static std::vector<u8> SerializeAddrInfo(const addrinfo* addrinfo, s32 result_co
92 static_assert(sizeof(SerializedResponseHeader) == 0x18, 92 static_assert(sizeof(SerializedResponseHeader) == 0x18,
93 "Response header size must be 0x18 bytes"); 93 "Response header size must be 0x18 bytes");
94 94
95 constexpr auto header_size = sizeof(SerializedResponseHeader); 95 constexpr static auto header_size = sizeof(SerializedResponseHeader);
96 const auto addr_size = 96 const auto addr_size =
97 current->ai_addr && current->ai_addrlen > 0 ? current->ai_addrlen : 4; 97 current->ai_addr && current->ai_addrlen > 0 ? current->ai_addrlen : 4;
98 const auto canonname_size = current->ai_canonname ? strlen(current->ai_canonname) + 1 : 1; 98 const auto canonname_size = current->ai_canonname ? strlen(current->ai_canonname) + 1 : 1;
@@ -103,7 +103,7 @@ static std::vector<u8> SerializeAddrInfo(const addrinfo* addrinfo, s32 result_co
103 // Header in network byte order 103 // Header in network byte order
104 SerializedResponseHeader header{}; 104 SerializedResponseHeader header{};
105 105
106 constexpr auto HEADER_MAGIC = 0xBEEFCAFE; 106 constexpr static auto HEADER_MAGIC = 0xBEEFCAFE;
107 header.magic = htonl(HEADER_MAGIC); 107 header.magic = htonl(HEADER_MAGIC);
108 header.family = htonl(current->ai_family); 108 header.family = htonl(current->ai_family);
109 header.flags = htonl(current->ai_flags); 109 header.flags = htonl(current->ai_flags);
diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp
index dcf47083f..ceb491224 100644
--- a/src/core/hle/service/ssl/ssl.cpp
+++ b/src/core/hle/service/ssl/ssl.cpp
@@ -103,7 +103,7 @@ private:
103 const auto certificate_format = rp.PopEnum<CertificateFormat>(); 103 const auto certificate_format = rp.PopEnum<CertificateFormat>();
104 [[maybe_unused]] const auto pkcs_12_certificates = ctx.ReadBuffer(0); 104 [[maybe_unused]] const auto pkcs_12_certificates = ctx.ReadBuffer(0);
105 105
106 constexpr u64 server_id = 0; 106 constexpr static u64 server_id = 0;
107 107
108 LOG_WARNING(Service_SSL, "(STUBBED) called, certificate_format={}", certificate_format); 108 LOG_WARNING(Service_SSL, "(STUBBED) called, certificate_format={}", certificate_format);
109 109
@@ -122,7 +122,7 @@ private:
122 return std::span<const u8>{}; 122 return std::span<const u8>{};
123 }(); 123 }();
124 124
125 constexpr u64 client_id = 0; 125 constexpr static u64 client_id = 0;
126 126
127 LOG_WARNING(Service_SSL, "(STUBBED) called"); 127 LOG_WARNING(Service_SSL, "(STUBBED) called");
128 128
diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp
index f9ada7c93..7b94b33f7 100644
--- a/src/core/hle/service/time/time_zone_manager.cpp
+++ b/src/core/hle/service/time/time_zone_manager.cpp
@@ -286,7 +286,7 @@ static constexpr int TransitionTime(int year, Rule rule, int offset) {
286} 286}
287 287
288static bool ParsePosixName(const char* name, TimeZoneRule& rule) { 288static bool ParsePosixName(const char* name, TimeZoneRule& rule) {
289 constexpr char default_rule[]{",M4.1.0,M10.5.0"}; 289 constexpr static char default_rule[]{",M4.1.0,M10.5.0"};
290 const char* std_name{name}; 290 const char* std_name{name};
291 int std_len{}; 291 int std_len{};
292 int offset{}; 292 int offset{};
@@ -512,8 +512,8 @@ static bool ParseTimeZoneBinary(TimeZoneRule& time_zone_rule, FileSys::VirtualFi
512 return {}; 512 return {};
513 } 513 }
514 514
515 constexpr s32 time_zone_max_leaps{50}; 515 constexpr static s32 time_zone_max_leaps{50};
516 constexpr s32 time_zone_max_chars{50}; 516 constexpr static s32 time_zone_max_chars{50};
517 if (!(0 <= header.leap_count && header.leap_count < time_zone_max_leaps && 517 if (!(0 <= header.leap_count && header.leap_count < time_zone_max_leaps &&
518 0 < header.type_count && header.type_count < s32(time_zone_rule.ttis.size()) && 518 0 < header.type_count && header.type_count < s32(time_zone_rule.ttis.size()) &&
519 0 <= header.time_count && header.time_count < s32(time_zone_rule.ats.size()) && 519 0 <= header.time_count && header.time_count < s32(time_zone_rule.ats.size()) &&
@@ -610,7 +610,7 @@ static bool ParseTimeZoneBinary(TimeZoneRule& time_zone_rule, FileSys::VirtualFi
610 if (bytes_read < 0) { 610 if (bytes_read < 0) {
611 return {}; 611 return {};
612 } 612 }
613 constexpr s32 time_zone_name_max{255}; 613 constexpr static s32 time_zone_name_max{255};
614 if (bytes_read > (time_zone_name_max + 1)) { 614 if (bytes_read > (time_zone_name_max + 1)) {
615 return {}; 615 return {};
616 } 616 }
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index 2fb631183..66c8fd38a 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -725,8 +725,8 @@ private:
725 725
726 // TODO: Figure out what these are 726 // TODO: Figure out what these are
727 727
728 constexpr s64 unknown_result_1 = 0; 728 constexpr static s64 unknown_result_1 = 0;
729 constexpr s64 unknown_result_2 = 0; 729 constexpr static s64 unknown_result_2 = 0;
730 730
731 IPC::ResponseBuilder rb{ctx, 6}; 731 IPC::ResponseBuilder rb{ctx, 6};
732 rb.Push(unknown_result_1); 732 rb.Push(unknown_result_1);
@@ -740,8 +740,8 @@ private:
740 const auto height = rp.Pop<u64>(); 740 const auto height = rp.Pop<u64>();
741 LOG_DEBUG(Service_VI, "called width={}, height={}", width, height); 741 LOG_DEBUG(Service_VI, "called width={}, height={}", width, height);
742 742
743 constexpr u64 base_size = 0x20000; 743 constexpr static u64 base_size = 0x20000;
744 constexpr u64 alignment = 0x1000; 744 constexpr static u64 alignment = 0x1000;
745 const auto texture_size = width * height * 4; 745 const auto texture_size = width * height * 4;
746 const auto out_size = (texture_size + base_size - 1) / base_size * base_size; 746 const auto out_size = (texture_size + base_size - 1) / base_size * base_size;
747 747
diff --git a/src/core/perf_stats.cpp b/src/core/perf_stats.cpp
index f09c176f8..9cf361986 100644
--- a/src/core/perf_stats.cpp
+++ b/src/core/perf_stats.cpp
@@ -121,7 +121,7 @@ PerfStatsResults PerfStats::GetAndResetStats(microseconds current_system_time_us
121double PerfStats::GetLastFrameTimeScale() const { 121double PerfStats::GetLastFrameTimeScale() const {
122 std::scoped_lock lock{object_mutex}; 122 std::scoped_lock lock{object_mutex};
123 123
124 constexpr double FRAME_LENGTH = 1.0 / 60; 124 constexpr static double FRAME_LENGTH = 1.0 / 60;
125 return duration_cast<DoubleSecs>(previous_frame_length).count() / FRAME_LENGTH; 125 return duration_cast<DoubleSecs>(previous_frame_length).count() / FRAME_LENGTH;
126} 126}
127 127
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp
index 8d5f2be2f..3bcdd9a99 100644
--- a/src/core/telemetry_session.cpp
+++ b/src/core/telemetry_session.cpp
@@ -34,7 +34,7 @@ static u64 GenerateTelemetryId() {
34 mbedtls_entropy_context entropy; 34 mbedtls_entropy_context entropy;
35 mbedtls_entropy_init(&entropy); 35 mbedtls_entropy_init(&entropy);
36 mbedtls_ctr_drbg_context ctr_drbg; 36 mbedtls_ctr_drbg_context ctr_drbg;
37 constexpr std::array<char, 18> personalization{{"yuzu Telemetry ID"}}; 37 constexpr static std::array<char, 18> personalization{{"yuzu Telemetry ID"}};
38 38
39 mbedtls_ctr_drbg_init(&ctr_drbg); 39 mbedtls_ctr_drbg_init(&ctr_drbg);
40 ASSERT(mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, 40 ASSERT(mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
@@ -225,7 +225,7 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader,
225 Telemetry::AppendOSInfo(field_collection); 225 Telemetry::AppendOSInfo(field_collection);
226 226
227 // Log user configuration information 227 // Log user configuration information
228 constexpr auto field_type = Telemetry::FieldType::UserConfig; 228 constexpr static auto field_type = Telemetry::FieldType::UserConfig;
229 AddField(field_type, "Audio_SinkId", Settings::values.sink_id.GetValue()); 229 AddField(field_type, "Audio_SinkId", Settings::values.sink_id.GetValue());
230 AddField(field_type, "Core_UseMultiCore", Settings::values.use_multi_core.GetValue()); 230 AddField(field_type, "Core_UseMultiCore", Settings::values.use_multi_core.GetValue());
231 AddField(field_type, "Renderer_Backend", 231 AddField(field_type, "Renderer_Backend",