mirror of
https://github.com/holub/mame
synced 2025-04-17 22:13:04 +03:00
Pacify clang, and more noexcept.
This commit is contained in:
parent
4cf33cfe0a
commit
aa7fb5291f
@ -59,7 +59,7 @@ bool cpu_device::cpu_is_interruptible() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cpu_device::access_before_time(u64 access_time, u64 current_time)
|
||||
bool cpu_device::access_before_time(u64 access_time, u64 current_time) noexcept
|
||||
{
|
||||
s32 delta = access_time - current_time;
|
||||
if(*m_icountptr <= delta) {
|
||||
@ -74,7 +74,7 @@ bool cpu_device::access_before_time(u64 access_time, u64 current_time)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cpu_device::access_before_delay(u32 cycles, const void *tag)
|
||||
bool cpu_device::access_before_delay(u32 cycles, const void *tag) noexcept
|
||||
{
|
||||
if(tag == m_access_before_delay_tag) {
|
||||
m_access_before_delay_tag = nullptr;
|
||||
@ -93,12 +93,12 @@ bool cpu_device::access_before_delay(u32 cycles, const void *tag)
|
||||
return false;
|
||||
}
|
||||
|
||||
void cpu_device::access_after_delay(u32 cycles)
|
||||
void cpu_device::access_after_delay(u32 cycles) noexcept
|
||||
{
|
||||
*m_icountptr -= cycles;
|
||||
}
|
||||
|
||||
void cpu_device::defer_access()
|
||||
void cpu_device::defer_access() noexcept
|
||||
{
|
||||
m_access_to_be_redone = true;
|
||||
*m_icountptr = 0;
|
||||
|
@ -16,6 +16,8 @@
|
||||
#include "didisasm.h"
|
||||
#include "diexec.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
@ -39,16 +41,16 @@ public:
|
||||
virtual bool cpu_is_interruptible() const;
|
||||
|
||||
// To be used only for interruptible cpus
|
||||
bool access_to_be_redone() { bool r = m_access_to_be_redone; m_access_to_be_redone = false; return r; }
|
||||
bool access_to_be_redone_noclear() { return m_access_to_be_redone; }
|
||||
bool access_to_be_redone() noexcept { return std::exchange(m_access_to_be_redone, false); }
|
||||
bool access_to_be_redone_noclear() noexcept { return m_access_to_be_redone; }
|
||||
|
||||
// Returns true if the access must be aborted
|
||||
bool access_before_time(u64 access_time, u64 current_time);
|
||||
bool access_before_delay(u32 cycles, const void *tag);
|
||||
bool access_before_time(u64 access_time, u64 current_time) noexcept;
|
||||
bool access_before_delay(u32 cycles, const void *tag) noexcept;
|
||||
|
||||
// The access has already happened, nothing to abort
|
||||
void access_after_delay(u32 cycles);
|
||||
void defer_access();
|
||||
void access_after_delay(u32 cycles) noexcept;
|
||||
void defer_access() noexcept;
|
||||
|
||||
protected:
|
||||
// construction/destruction
|
||||
|
@ -135,14 +135,4 @@ template std::wostream::off_type stream_format(std::wostream &, format_argument_
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template std::string string_format(format_argument_pack<char> const &);
|
||||
template std::string string_format(format_argument_pack<char> &&);
|
||||
template std::string string_format(std::locale const &, format_argument_pack<char> const &);
|
||||
template std::string string_format(std::locale const &, format_argument_pack<char> &&);
|
||||
|
||||
template std::wstring string_format(format_argument_pack<wchar_t> const &);
|
||||
template std::wstring string_format(format_argument_pack<wchar_t> &&);
|
||||
template std::wstring string_format(std::locale const &, format_argument_pack<wchar_t> const &);
|
||||
template std::wstring string_format(std::locale const &, format_argument_pack<wchar_t> &&);
|
||||
|
||||
} // namespace util
|
||||
|
@ -1908,16 +1908,6 @@ extern template std::wostream::off_type stream_format(std::wostream &, format_ar
|
||||
|
||||
} // namespace detail
|
||||
|
||||
extern template std::string string_format(format_argument_pack<char> const &);
|
||||
extern template std::string string_format(format_argument_pack<char> &&);
|
||||
extern template std::string string_format(std::locale const &, format_argument_pack<char> const &);
|
||||
extern template std::string string_format(std::locale const &, format_argument_pack<char> &&);
|
||||
|
||||
extern template std::wstring string_format(format_argument_pack<wchar_t> const &);
|
||||
extern template std::wstring string_format(format_argument_pack<wchar_t> &&);
|
||||
extern template std::wstring string_format(std::locale const &, format_argument_pack<wchar_t> const &);
|
||||
extern template std::wstring string_format(std::locale const &, format_argument_pack<wchar_t> &&);
|
||||
|
||||
} // namespace util
|
||||
|
||||
#endif // MAME_UTIL_STRFORMAT_H
|
||||
|
Loading…
Reference in New Issue
Block a user