diff options
author | 2023-03-26 01:32:50 +1100 | |
---|---|---|
committer | 2023-03-26 01:32:50 +1100 | |
commit | 4cf33cfe0a427d24d754c134eb94b9d1a67da637 (patch) | |
tree | 71d0864fd5efa77a50ed2061d3a2c6da05c41b33 /src/emu/emucore.cpp | |
parent | fb81cb16bb19603f7fa0fff3698bdfa32b2896fc (diff) |
Various optimisations to code generaton.
util/bitmap.cpp, util/palette.cpp: Marked lots of things constexpr.
Bitmaps don't throw exceptions on allocation failure, they just become
invalid. Almost nothing in MAME actually checks for this.
emu/profiler.cpp: Abort if the profile stack overflows rather than
throwing an exception. This is a developer feature and if it overflows,
the code is broken. Calling a noreturn noexcept function generates less
code than throwing an exception, which adds up.
util/strformat.cpp: Traded away some unnecessary flexibility for more
compact code. The stream objects must derive from std::basic_ostream
now - they can't just be any old objects with the expected operators.
Diffstat (limited to 'src/emu/emucore.cpp')
-rw-r--r-- | src/emu/emucore.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/emucore.cpp b/src/emu/emucore.cpp index bc6139fe3cf..d9a314cfaa2 100644 --- a/src/emu/emucore.cpp +++ b/src/emu/emucore.cpp @@ -13,13 +13,13 @@ #include "emucore.h" #include "osdcore.h" -emu_fatalerror::emu_fatalerror(util::format_argument_pack<std::ostream> const &args) +emu_fatalerror::emu_fatalerror(util::format_argument_pack<char> const &args) : emu_fatalerror(0, args) { osd_break_into_debugger(m_text.c_str()); } -emu_fatalerror::emu_fatalerror(int _exitcode, util::format_argument_pack<std::ostream> const &args) +emu_fatalerror::emu_fatalerror(int _exitcode, util::format_argument_pack<char> const &args) : m_text(util::string_format(args)) , m_code(_exitcode) { |