diff options
Diffstat (limited to 'src/core/hle/service')
21 files changed, 47 insertions, 47 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 5b87bb18c..6d1084fd1 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 // TODO(ogniK): Check if application ID is zero on acc initialize. As we don't have a reliable // way of confirming things like the TID, we're going to assume a non zero value for the time // being. - constexpr static u64 tid{1}; + constexpr u64 tid{1}; StoreSaveDataThumbnail(ctx, uuid, tid); } diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 01f03effe..8d5c8a3a3 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -1086,7 +1086,7 @@ private: // We require a non-zero handle to be valid. Using 0xdeadbeef allows us to trace if this is // actually used anywhere - constexpr static u64 handle = 0xdeadbeef; + constexpr u64 handle = 0xdeadbeef; IPC::ResponseBuilder rb{ctx, 4}; rb.Push(ResultSuccess); @@ -1570,7 +1570,7 @@ void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) { const auto& version = res.first->GetVersionString(); std::copy(version.begin(), version.end(), version_string.begin()); } else { - constexpr static char default_version[]{"1.0.0"}; + static constexpr char default_version[]{"1.0.0"}; std::memcpy(version_string.data(), default_version, sizeof(default_version)); } @@ -1638,7 +1638,7 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) { void IApplicationFunctions::IsGamePlayRecordingSupported(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_AM, "(STUBBED) called"); - constexpr static bool gameplay_recording_supported = false; + constexpr bool gameplay_recording_supported = false; IPC::ResponseBuilder rb{ctx, 3}; 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 962371a99..c18236045 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() { .cursor_position{current_cursor_position}, }; - constexpr static u8 flag = 0; + constexpr u8 flag = 0; std::memcpy(reply.data() + REPLY_BASE_SIZE, current_text.data(), current_text.size() * sizeof(char16_t)); @@ -1204,7 +1204,7 @@ void SoftwareKeyboard::ReplyMovedCursorV2() { .cursor_position{current_cursor_position}, }; - constexpr static u8 flag = 0; + constexpr u8 flag = 0; std::memcpy(reply.data() + REPLY_BASE_SIZE, current_text.data(), current_text.size() * sizeof(char16_t)); @@ -1232,7 +1232,7 @@ void SoftwareKeyboard::ReplyChangedStringUtf8V2() { .cursor_position{current_cursor_position}, }; - constexpr static u8 flag = 0; + constexpr u8 flag = 0; std::memcpy(reply.data() + REPLY_BASE_SIZE, utf8_current_text.data(), utf8_current_text.size()); std::memcpy(reply.data() + REPLY_BASE_SIZE + REPLY_UTF8_SIZE, &changed_string_arg, @@ -1257,7 +1257,7 @@ void SoftwareKeyboard::ReplyMovedCursorUtf8V2() { .cursor_position{current_cursor_position}, }; - constexpr static u8 flag = 0; + constexpr u8 flag = 0; std::memcpy(reply.data() + REPLY_BASE_SIZE, utf8_current_text.data(), utf8_current_text.size()); 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 7236f586d..227fdd0cf 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, } void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { - constexpr static std::array<PerformanceConfiguration, 3> BOOST_MODE_TO_CONFIG_MAP{{ + static constexpr std::array<PerformanceConfiguration, 3> BOOST_MODE_TO_CONFIG_MAP{{ PerformanceConfiguration::Config7, PerformanceConfiguration::Config13, PerformanceConfiguration::Config15, diff --git a/src/core/hle/service/audio/audctl.cpp b/src/core/hle/service/audio/audctl.cpp index 654d2c493..5abf22ba4 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) { // This service function is currently hardcoded on the // actual console to this value (as of 8.0.0). - constexpr static s32 target_min_volume = 0; + constexpr s32 target_min_volume = 0; IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); @@ -89,7 +89,7 @@ void AudCtl::GetTargetVolumeMax(Kernel::HLERequestContext& ctx) { // This service function is currently hardcoded on the // actual console to this value (as of 8.0.0). - constexpr static s32 target_max_volume = 15; + constexpr s32 target_max_volume = 15; IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index fe975157c..e01f87356 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp @@ -209,7 +209,7 @@ private: std::size_t WorkerBufferSize(u32 channel_count) { ASSERT_MSG(channel_count == 1 || channel_count == 2, "Invalid channel count"); - constexpr static int num_streams = 1; + constexpr int num_streams = 1; const int num_stereo_streams = channel_count == 2 ? 1 : 0; return opus_multistream_decoder_get_size(num_streams, num_stereo_streams); } diff --git a/src/core/hle/service/caps/caps_u.cpp b/src/core/hle/service/caps/caps_u.cpp index 1c2694645..5fbba8673 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 // TODO: Update this when we implement the album. // Currently we do not have a method of accessing album entries, set this to 0 for now. - constexpr static u32 total_entries_1{}; - constexpr static u32 total_entries_2{}; + constexpr u32 total_entries_1{}; + constexpr u32 total_entries_2{}; LOG_WARNING( Service_Capture, diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index f95ad9253..447d624e1 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( const auto parameters = rp.PopRaw<Parameters>(); // Stub this to None for now, backend needs an impl to read/write the SaveDataExtraData - constexpr static auto flags = static_cast<u32>(FileSys::SaveDataFlags::None); + constexpr auto flags = static_cast<u32>(FileSys::SaveDataFlags::None); LOG_WARNING(Service_FS, "(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 d5dcd5567..ba6f04d8d 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -439,15 +439,15 @@ void Controller_NPad::RequestPadStateUpdate(Core::HID::NpadIdType npad_id) { using btn = Core::HID::NpadButton; pad_entry.npad_buttons.raw = btn::None; if (controller_type != Core::HID::NpadStyleIndex::JoyconLeft) { - constexpr static btn right_button_mask = btn::A | btn::B | btn::X | btn::Y | btn::StickR | - btn::R | btn::ZR | btn::Plus | btn::StickRLeft | - btn::StickRUp | btn::StickRRight | btn::StickRDown; + constexpr btn right_button_mask = btn::A | btn::B | btn::X | btn::Y | btn::StickR | btn::R | + btn::ZR | btn::Plus | btn::StickRLeft | btn::StickRUp | + btn::StickRRight | btn::StickRDown; pad_entry.npad_buttons.raw = button_state.raw & right_button_mask; pad_entry.r_stick = stick_state.right; } if (controller_type != Core::HID::NpadStyleIndex::JoyconRight) { - constexpr static btn left_button_mask = + constexpr btn left_button_mask = btn::Left | btn::Up | btn::Right | btn::Down | btn::StickL | btn::L | btn::ZL | btn::Minus | btn::StickLLeft | btn::StickLUp | btn::StickLRight | btn::StickLDown; pad_entry.npad_buttons.raw |= button_state.raw & left_button_mask; @@ -759,7 +759,7 @@ Core::HID::NpadStyleTag Controller_NPad::GetSupportedStyleSet() const { } Result Controller_NPad::SetSupportedNpadIdTypes(std::span<const u8> data) { - constexpr static std::size_t max_number_npad_ids = 0xa; + constexpr std::size_t max_number_npad_ids = 0xa; const auto length = data.size(); ASSERT(length > 0 && (length % sizeof(u32)) == 0); 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 a1b187b63..3a2fe938f 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_ } Result MiiManager::GetIndex([[maybe_unused]] const CharInfo& info, u32& index) { - constexpr static u32 INVALID_INDEX{0xFFFFFFFF}; + constexpr u32 INVALID_INDEX{0xFFFFFFFF}; index = INVALID_INDEX; diff --git a/src/core/hle/service/nfp/amiibo_crypto.cpp b/src/core/hle/service/nfp/amiibo_crypto.cpp index 0d9c3d0f6..ffb2f959c 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) { LOG_DEBUG(Service_NFP, "tag_CFG1=0x{0:x}", ntag_file.CFG1); // Validate UUID - constexpr static u8 CT = 0x88; // As defined in `ISO / IEC 14443 - 3` + constexpr u8 CT = 0x88; // As defined in `ISO / IEC 14443 - 3` if ((CT ^ ntag_file.uuid.uid[0] ^ ntag_file.uuid.uid[1] ^ ntag_file.uuid.uid[2]) != ntag_file.uuid.uid[3]) { return false; @@ -247,7 +247,7 @@ void Cipher(const DerivedKeys& keys, const NTAG215File& in_data, NTAG215File& ou mbedtls_aes_setkey_enc(&aes, keys.aes_key.data(), aes_key_size); memcpy(nonce_counter.data(), keys.aes_iv.data(), sizeof(keys.aes_iv)); - constexpr static std::size_t encrypted_data_size = HMAC_TAG_START - SETTINGS_START; + constexpr std::size_t encrypted_data_size = HMAC_TAG_START - SETTINGS_START; mbedtls_aes_crypt_ctr(&aes, encrypted_data_size, &nc_off, nonce_counter.data(), stream_block.data(), reinterpret_cast<const unsigned char*>(&in_data.settings), @@ -317,13 +317,13 @@ bool DecodeAmiibo(const EncryptedNTAG215File& encrypted_tag_data, NTAG215File& t Cipher(data_keys, encoded_data, tag_data); // Regenerate tag HMAC. Note: order matters, data HMAC depends on tag HMAC! - constexpr static std::size_t input_length = DYNAMIC_LOCK_START - UUID_START; + constexpr std::size_t input_length = DYNAMIC_LOCK_START - UUID_START; mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256), tag_keys.hmac_key.data(), sizeof(HmacKey), reinterpret_cast<const unsigned char*>(&tag_data.uid), input_length, reinterpret_cast<unsigned char*>(&tag_data.hmac_tag)); // Regenerate data HMAC - constexpr static std::size_t input_length2 = DYNAMIC_LOCK_START - WRITE_COUNTER_START; + constexpr std::size_t input_length2 = DYNAMIC_LOCK_START - WRITE_COUNTER_START; mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256), data_keys.hmac_key.data(), sizeof(HmacKey), reinterpret_cast<const unsigned char*>(&tag_data.write_counter), input_length2, @@ -357,8 +357,8 @@ bool EncodeAmiibo(const NTAG215File& tag_data, EncryptedNTAG215File& encrypted_t NTAG215File encoded_tag_data{}; // Generate tag HMAC - constexpr static std::size_t input_length = DYNAMIC_LOCK_START - UUID_START; - constexpr static std::size_t input_length2 = HMAC_TAG_START - WRITE_COUNTER_START; + constexpr std::size_t input_length = DYNAMIC_LOCK_START - UUID_START; + constexpr std::size_t input_length2 = HMAC_TAG_START - WRITE_COUNTER_START; mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_SHA256), tag_keys.hmac_key.data(), sizeof(HmacKey), reinterpret_cast<const unsigned char*>(&tag_data.uid), 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 df4f60d59..5d32adf64 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 }; static_assert(sizeof(Output) == 0x3, "Output has incorrect size."); - constexpr static Output out{}; + constexpr Output out{}; IPC::ResponseBuilder rb{ctx, 3}; 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 1f0e05df6..aba51d280 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 @@ namespace Service::Nvidia::NvCore { SyncpointManager::SyncpointManager(Tegra::Host1x::Host1x& host1x_) : host1x{host1x_} { - constexpr static u32 VBlank0SyncpointId{26}; - constexpr static u32 VBlank1SyncpointId{27}; + constexpr u32 VBlank0SyncpointId{26}; + constexpr u32 VBlank1SyncpointId{27}; // Reserve both vblank syncpoints as client managed as they use Continuous Mode // Refer to section 14.3.5.3 of the TRM for more information on Continuous Mode diff --git a/src/core/hle/service/nvdrv/core/syncpoint_manager.h b/src/core/hle/service/nvdrv/core/syncpoint_manager.h index 4f2cefae5..7728ff596 100644 --- a/src/core/hle/service/nvdrv/core/syncpoint_manager.h +++ b/src/core/hle/service/nvdrv/core/syncpoint_manager.h @@ -124,7 +124,7 @@ private: //!< value }; - constexpr static std::size_t SyncpointCount{192}; + static constexpr std::size_t SyncpointCount{192}; std::array<SyncpointInfo, SyncpointCount> syncpoints{}; std::mutex reservation_lock; diff --git a/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp b/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp index 3f41aa0d9..0767e548d 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, // If expected_present is specified, we may not want to return a buffer yet. if (expected_present.count() != 0) { - constexpr static auto MAX_REASONABLE_NSEC = 1000000000LL; // 1 second + constexpr auto MAX_REASONABLE_NSEC = 1000000000LL; // 1 second // The expected_present argument indicates when the buffer is expected to be presented // on-screen. diff --git a/src/core/hle/service/olsc/olsc.cpp b/src/core/hle/service/olsc/olsc.cpp index fbae10e7d..530e1be3b 100644 --- a/src/core/hle/service/olsc/olsc.cpp +++ b/src/core/hle/service/olsc/olsc.cpp @@ -55,7 +55,7 @@ private: LOG_WARNING(Service_OLSC, "(STUBBED) called"); // backup_setting is set to 0 since real value is unknown - constexpr static u64 backup_setting = 0; + constexpr u64 backup_setting = 0; IPC::ResponseBuilder rb{ctx, 4}; rb.Push(ResultSuccess); diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index 155d6a00b..01040b32a 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp @@ -116,7 +116,7 @@ private: void GetTransmissionStatus(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_PREPO, "(STUBBED) called"); - constexpr static s32 status = 0; + constexpr s32 status = 0; IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); @@ -126,7 +126,7 @@ private: void GetSystemSessionId(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_PREPO, "(STUBBED) called"); - constexpr static u64 system_session_id = 0; + constexpr u64 system_session_id = 0; IPC::ResponseBuilder rb{ctx, 4}; rb.Push(ResultSuccess); rb.Push(system_session_id); diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp index 831a51a67..e96eda7f3 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 static_assert(sizeof(SerializedResponseHeader) == 0x18, "Response header size must be 0x18 bytes"); - constexpr static auto header_size = sizeof(SerializedResponseHeader); + constexpr auto header_size = sizeof(SerializedResponseHeader); const auto addr_size = current->ai_addr && current->ai_addrlen > 0 ? current->ai_addrlen : 4; 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 // Header in network byte order SerializedResponseHeader header{}; - constexpr static auto HEADER_MAGIC = 0xBEEFCAFE; + constexpr auto HEADER_MAGIC = 0xBEEFCAFE; header.magic = htonl(HEADER_MAGIC); header.family = htonl(current->ai_family); 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 ceb491224..dcf47083f 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp @@ -103,7 +103,7 @@ private: const auto certificate_format = rp.PopEnum<CertificateFormat>(); [[maybe_unused]] const auto pkcs_12_certificates = ctx.ReadBuffer(0); - constexpr static u64 server_id = 0; + constexpr u64 server_id = 0; LOG_WARNING(Service_SSL, "(STUBBED) called, certificate_format={}", certificate_format); @@ -122,7 +122,7 @@ private: return std::span<const u8>{}; }(); - constexpr static u64 client_id = 0; + constexpr u64 client_id = 0; LOG_WARNING(Service_SSL, "(STUBBED) called"); diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index 7b94b33f7..973f7837a 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) { } static bool ParsePosixName(const char* name, TimeZoneRule& rule) { - constexpr static char default_rule[]{",M4.1.0,M10.5.0"}; + static constexpr char default_rule[]{",M4.1.0,M10.5.0"}; const char* std_name{name}; int std_len{}; int offset{}; @@ -512,8 +512,8 @@ static bool ParseTimeZoneBinary(TimeZoneRule& time_zone_rule, FileSys::VirtualFi return {}; } - constexpr static s32 time_zone_max_leaps{50}; - constexpr static s32 time_zone_max_chars{50}; + constexpr s32 time_zone_max_leaps{50}; + constexpr s32 time_zone_max_chars{50}; if (!(0 <= header.leap_count && header.leap_count < time_zone_max_leaps && 0 < header.type_count && header.type_count < s32(time_zone_rule.ttis.size()) && 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 if (bytes_read < 0) { return {}; } - constexpr static s32 time_zone_name_max{255}; + constexpr s32 time_zone_name_max{255}; if (bytes_read > (time_zone_name_max + 1)) { return {}; } diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 66c8fd38a..2fb631183 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -725,8 +725,8 @@ private: // TODO: Figure out what these are - constexpr static s64 unknown_result_1 = 0; - constexpr static s64 unknown_result_2 = 0; + constexpr s64 unknown_result_1 = 0; + constexpr s64 unknown_result_2 = 0; IPC::ResponseBuilder rb{ctx, 6}; rb.Push(unknown_result_1); @@ -740,8 +740,8 @@ private: const auto height = rp.Pop<u64>(); LOG_DEBUG(Service_VI, "called width={}, height={}", width, height); - constexpr static u64 base_size = 0x20000; - constexpr static u64 alignment = 0x1000; + constexpr u64 base_size = 0x20000; + constexpr u64 alignment = 0x1000; const auto texture_size = width * height * 4; const auto out_size = (texture_size + base_size - 1) / base_size * base_size; |