remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency

Signed-off-by: arades79 <scravers@protonmail.com>
This commit is contained in:
arades79 2023-02-14 11:13:47 -05:00
parent 26e44a3be4
commit 683019878f
102 changed files with 300 additions and 307 deletions

View file

@ -16,7 +16,7 @@ Result SetThreadActivity(Core::System& system, Handle thread_handle,
thread_activity);
// Validate the activity.
constexpr static auto IsValidThreadActivity = [](ThreadActivity activity) {
static constexpr auto IsValidThreadActivity = [](ThreadActivity activity) {
return activity == ThreadActivity::Runnable || activity == ThreadActivity::Paused;
};
R_UNLESS(IsValidThreadActivity(thread_activity), ResultInvalidEnumValue);

View file

@ -193,7 +193,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
return ResultSuccess;
case InfoType::ThreadTickCount: {
constexpr static u64 num_cpus = 4;
constexpr u64 num_cpus = 4;
if (info_sub_id != 0xFFFFFFFFFFFFFFFF && info_sub_id >= num_cpus) {
LOG_ERROR(Kernel_SVC, "Core count is out of range, expected {} but got {}", num_cpus,
info_sub_id);

View file

@ -132,7 +132,7 @@ Result SetMemoryAttribute(Core::System& system, VAddr address, u64 size, u32 mas
R_UNLESS((address < address + size), ResultInvalidCurrentMemory);
// Validate the attribute and mask.
constexpr static u32 SupportedMask = static_cast<u32>(MemoryAttribute::Uncached);
constexpr u32 SupportedMask = static_cast<u32>(MemoryAttribute::Uncached);
R_UNLESS((mask | attr) == mask, ResultInvalidCombination);
R_UNLESS((mask | attr | SupportedMask) == SupportedMask, ResultInvalidCombination);