diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/core_timing.cpp | 2 | ||||
| -rw-r--r-- | src/core/debugger/gdbstub_arch.cpp | 14 | ||||
| -rw-r--r-- | src/core/debugger/gdbstub_arch.h | 6 | ||||
| -rw-r--r-- | src/core/file_sys/ips_layer.cpp | 8 | ||||
| -rw-r--r-- | src/core/file_sys/registered_cache.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/svc/svc_activity.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/apm/apm_controller.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/core/syncpoint_manager.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/time/time_zone_manager.cpp | 2 | ||||
| -rw-r--r-- | src/core/telemetry_session.cpp | 2 |
11 files changed, 19 insertions, 25 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 6bac6722f..3a63b52e3 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -45,7 +45,7 @@ CoreTiming::~CoreTiming() { | |||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | void CoreTiming::ThreadEntry(CoreTiming& instance) { | 47 | void CoreTiming::ThreadEntry(CoreTiming& instance) { |
| 48 | constexpr char name[] = "HostTiming"; | 48 | static constexpr 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..831c48513 100644 --- a/src/core/debugger/gdbstub_arch.cpp +++ b/src/core/debugger/gdbstub_arch.cpp | |||
| @@ -41,9 +41,8 @@ static void PutSIMDRegister(std::array<u32, 64>& simd_regs, size_t offset, const | |||
| 41 | 41 | ||
| 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 |
| 44 | std::string GDBStubA64::GetTargetXML() const { | 44 | std::string_view GDBStubA64::GetTargetXML() const { |
| 45 | constexpr const char* target_xml = | 45 | return R"(<?xml version="1.0"?> |
| 46 | R"(<?xml version="1.0"?> | ||
| 47 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> | 46 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> |
| 48 | <target version="1.0"> | 47 | <target version="1.0"> |
| 49 | <architecture>aarch64</architecture> | 48 | <architecture>aarch64</architecture> |
| @@ -178,8 +177,6 @@ std::string GDBStubA64::GetTargetXML() const { | |||
| 178 | <reg name="fpcr" bitsize="32"/> | 177 | <reg name="fpcr" bitsize="32"/> |
| 179 | </feature> | 178 | </feature> |
| 180 | </target>)"; | 179 | </target>)"; |
| 181 | |||
| 182 | return target_xml; | ||
| 183 | } | 180 | } |
| 184 | 181 | ||
| 185 | std::string GDBStubA64::RegRead(const Kernel::KThread* thread, size_t id) const { | 182 | std::string GDBStubA64::RegRead(const Kernel::KThread* thread, size_t id) const { |
| @@ -270,9 +267,8 @@ u32 GDBStubA64::BreakpointInstruction() const { | |||
| 270 | return 0xd4200000; | 267 | return 0xd4200000; |
| 271 | } | 268 | } |
| 272 | 269 | ||
| 273 | std::string GDBStubA32::GetTargetXML() const { | 270 | std::string_view GDBStubA32::GetTargetXML() const { |
| 274 | constexpr const char* target_xml = | 271 | return R"(<?xml version="1.0"?> |
| 275 | R"(<?xml version="1.0"?> | ||
| 276 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> | 272 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> |
| 277 | <target version="1.0"> | 273 | <target version="1.0"> |
| 278 | <architecture>arm</architecture> | 274 | <architecture>arm</architecture> |
| @@ -378,8 +374,6 @@ std::string GDBStubA32::GetTargetXML() const { | |||
| 378 | <reg name="fpscr" bitsize="32" type="int" group="float" regnum="80"/> | 374 | <reg name="fpscr" bitsize="32" type="int" group="float" regnum="80"/> |
| 379 | </feature> | 375 | </feature> |
| 380 | </target>)"; | 376 | </target>)"; |
| 381 | |||
| 382 | return target_xml; | ||
| 383 | } | 377 | } |
| 384 | 378 | ||
| 385 | std::string GDBStubA32::RegRead(const Kernel::KThread* thread, size_t id) const { | 379 | std::string GDBStubA32::RegRead(const Kernel::KThread* thread, size_t id) const { |
diff --git a/src/core/debugger/gdbstub_arch.h b/src/core/debugger/gdbstub_arch.h index 2540d6456..34530c788 100644 --- a/src/core/debugger/gdbstub_arch.h +++ b/src/core/debugger/gdbstub_arch.h | |||
| @@ -16,7 +16,7 @@ namespace Core { | |||
| 16 | class GDBStubArch { | 16 | class GDBStubArch { |
| 17 | public: | 17 | public: |
| 18 | virtual ~GDBStubArch() = default; | 18 | virtual ~GDBStubArch() = default; |
| 19 | virtual std::string GetTargetXML() const = 0; | 19 | virtual std::string_view GetTargetXML() const = 0; |
| 20 | virtual std::string RegRead(const Kernel::KThread* thread, size_t id) const = 0; | 20 | virtual std::string RegRead(const Kernel::KThread* thread, size_t id) const = 0; |
| 21 | virtual void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const = 0; | 21 | virtual void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const = 0; |
| 22 | virtual std::string ReadRegisters(const Kernel::KThread* thread) const = 0; | 22 | virtual std::string ReadRegisters(const Kernel::KThread* thread) const = 0; |
| @@ -27,7 +27,7 @@ public: | |||
| 27 | 27 | ||
| 28 | class GDBStubA64 final : public GDBStubArch { | 28 | class GDBStubA64 final : public GDBStubArch { |
| 29 | public: | 29 | public: |
| 30 | std::string GetTargetXML() const override; | 30 | std::string_view GetTargetXML() const override; |
| 31 | std::string RegRead(const Kernel::KThread* thread, size_t id) const override; | 31 | std::string RegRead(const Kernel::KThread* thread, size_t id) const override; |
| 32 | void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; | 32 | void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; |
| 33 | std::string ReadRegisters(const Kernel::KThread* thread) const override; | 33 | std::string ReadRegisters(const Kernel::KThread* thread) const override; |
| @@ -47,7 +47,7 @@ private: | |||
| 47 | 47 | ||
| 48 | class GDBStubA32 final : public GDBStubArch { | 48 | class GDBStubA32 final : public GDBStubArch { |
| 49 | public: | 49 | public: |
| 50 | std::string GetTargetXML() const override; | 50 | std::string_view GetTargetXML() const override; |
| 51 | std::string RegRead(const Kernel::KThread* thread, size_t id) const override; | 51 | std::string RegRead(const Kernel::KThread* thread, size_t id) const override; |
| 52 | void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; | 52 | void RegWrite(Kernel::KThread* thread, size_t id, std::string_view value) const override; |
| 53 | std::string ReadRegisters(const Kernel::KThread* thread) const override; | 53 | std::string ReadRegisters(const Kernel::KThread* thread) const override; |
diff --git a/src/core/file_sys/ips_layer.cpp b/src/core/file_sys/ips_layer.cpp index 5aab428bb..efdf18cee 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 | static constexpr 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 | static constexpr 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 | ||
| 57 | static bool IsEOF(IPSFileType type, const std::vector<u8>& data) { | 57 | static bool IsEOF(IPSFileType type, const std::vector<u8>& data) { |
| 58 | constexpr std::array<u8, 3> eof{{'E', 'O', 'F'}}; | 58 | static constexpr 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 | static constexpr 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/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index 878d832c2..a6960170c 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 | ||
| 73 | static std::string GetCNMTName(TitleType type, u64 title_id) { | 73 | static std::string GetCNMTName(TitleType type, u64 title_id) { |
| 74 | constexpr std::array<const char*, 9> TITLE_TYPE_NAMES{ | 74 | static constexpr 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/hle/kernel/svc/svc_activity.cpp b/src/core/hle/kernel/svc/svc_activity.cpp index 1dcdb7a15..baafefaeb 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 | static constexpr 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/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 3a96611b6..83c862b4d 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -1569,7 +1569,7 @@ void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) { | |||
| 1569 | const auto& version = res.first->GetVersionString(); | 1569 | const auto& version = res.first->GetVersionString(); |
| 1570 | std::copy(version.begin(), version.end(), version_string.begin()); | 1570 | std::copy(version.begin(), version.end(), version_string.begin()); |
| 1571 | } else { | 1571 | } else { |
| 1572 | constexpr char default_version[]{"1.0.0"}; | 1572 | static constexpr char default_version[]{"1.0.0"}; |
| 1573 | std::memcpy(version_string.data(), default_version, sizeof(default_version)); | 1573 | std::memcpy(version_string.data(), default_version, sizeof(default_version)); |
| 1574 | } | 1574 | } |
| 1575 | 1575 | ||
diff --git a/src/core/hle/service/apm/apm_controller.cpp b/src/core/hle/service/apm/apm_controller.cpp index d6de84066..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, | |||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { | 58 | void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { |
| 59 | constexpr std::array<PerformanceConfiguration, 3> BOOST_MODE_TO_CONFIG_MAP{{ | 59 | static constexpr 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/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: | |||
| 124 | //!< value | 124 | //!< value |
| 125 | }; | 125 | }; |
| 126 | 126 | ||
| 127 | constexpr static std::size_t SyncpointCount{192}; | 127 | static constexpr std::size_t SyncpointCount{192}; |
| 128 | std::array<SyncpointInfo, SyncpointCount> syncpoints{}; | 128 | std::array<SyncpointInfo, SyncpointCount> syncpoints{}; |
| 129 | std::mutex reservation_lock; | 129 | std::mutex reservation_lock; |
| 130 | 130 | ||
diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index f9ada7c93..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) { | |||
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | static bool ParsePosixName(const char* name, TimeZoneRule& rule) { | 288 | static bool ParsePosixName(const char* name, TimeZoneRule& rule) { |
| 289 | constexpr char default_rule[]{",M4.1.0,M10.5.0"}; | 289 | static constexpr 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{}; |
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 8d5f2be2f..9178b00ca 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 | static constexpr 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, |