1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

Everywhere: Add sv suffix to strings relying on StringView(char const*)

Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
This commit is contained in:
sin-ack 2022-07-11 17:32:29 +00:00 committed by Andreas Kling
parent e5f09ea170
commit 3f3f45580a
762 changed files with 8315 additions and 8316 deletions

View file

@ -20,18 +20,18 @@
# pragma GCC optimize("O3")
#endif
#define TODO_INSN() \
do { \
reportln("\n=={}== Unimplemented instruction: {}\n", getpid(), __FUNCTION__); \
m_emulator.dump_backtrace(); \
_exit(0); \
#define TODO_INSN() \
do { \
reportln("\n=={}== Unimplemented instruction: {}\n"sv, getpid(), __FUNCTION__); \
m_emulator.dump_backtrace(); \
_exit(0); \
} while (0)
template<typename T>
ALWAYS_INLINE void warn_if_uninitialized(T value_with_shadow, char const* message)
{
if (value_with_shadow.is_uninitialized()) [[unlikely]] {
reportln("\033[31;1mWarning! Use of uninitialized value: {}\033[0m\n", message);
reportln("\033[31;1mWarning! Use of uninitialized value: {}\033[0m\n"sv, message);
UserspaceEmulator::Emulator::the().dump_backtrace();
}
}
@ -41,14 +41,14 @@ namespace UserspaceEmulator { // NOLINT(readability-implicit-bool-conversion) 0/
ALWAYS_INLINE void SoftFPU::warn_if_mmx_absolute(u8 index) const
{
if (m_reg_is_mmx[index]) [[unlikely]] {
reportln("\033[31;1mWarning! Use of an MMX register as an FPU value ({} abs)\033[0m\n", index);
reportln("\033[31;1mWarning! Use of an MMX register as an FPU value ({} abs)\033[0m\n"sv, index);
m_emulator.dump_backtrace();
}
}
ALWAYS_INLINE void SoftFPU::warn_if_fpu_absolute(u8 index) const
{
if (!m_reg_is_mmx[index]) [[unlikely]] {
reportln("\033[31;1mWarning! Use of an FPU value ({} abs) as an MMX register\033[0m\n", index);
reportln("\033[31;1mWarning! Use of an FPU value ({} abs) as an MMX register\033[0m\n"sv, index);
m_emulator.dump_backtrace();
}
}
@ -161,7 +161,7 @@ ALWAYS_INLINE void SoftFPU::fpu_set_exception(FPU_Exception ex)
// the previous eip
// FIXME: Call FPU Exception handler
reportln("Trying to call Exception handler from {}", fpu_exception_string(ex));
reportln("Trying to call Exception handler from {}"sv, fpu_exception_string(ex));
fpu_dump_env();
m_emulator.dump_backtrace();
TODO();