mirror of
https://github.com/holub/mame
synced 2025-07-06 10:29:38 +03:00
netlist: fix some clang tidy warnings.
This commit is contained in:
parent
3a9ab286c6
commit
c29a37c393
@ -46,6 +46,8 @@ namespace netlist
|
||||
m_sem_r.acquire();
|
||||
}
|
||||
|
||||
PCOPYASSIGNMOVE(NETLIB_NAME(log), delete)
|
||||
|
||||
NETLIB_DESTRUCTOR(log)
|
||||
{
|
||||
if (m_reset)
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "pgsl.h"
|
||||
#include "pmath.h" // FIXME: only uses lcm ... move to ptypes.
|
||||
#include "ptypes.h"
|
||||
#include "pgsl.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef> // for std::max_align_t (usually long long)
|
||||
@ -253,7 +254,7 @@ namespace plib {
|
||||
: m_a(arena_type::instance())
|
||||
{ }
|
||||
|
||||
//~arena_allocator() noexcept = default;
|
||||
~arena_allocator() noexcept = default;
|
||||
|
||||
PCOPYASSIGNMOVE(arena_allocator, default)
|
||||
|
||||
@ -626,9 +627,7 @@ namespace plib {
|
||||
class paged_arena : public arena_base<paged_arena<BASEARENA, PAGESIZE>, true, true>
|
||||
{
|
||||
public:
|
||||
paged_arena()
|
||||
{
|
||||
}
|
||||
paged_arena() = default;
|
||||
|
||||
PCOPYASSIGNMOVE(paged_arena, delete)
|
||||
|
||||
|
@ -32,6 +32,7 @@ namespace plib {
|
||||
{
|
||||
using ct = typename S::char_type;
|
||||
static_assert((sizeof(T) % sizeof(ct)) == 0, "istream_read sizeof issue");
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
|
||||
return is.read(reinterpret_cast<ct *>(data), gsl::narrow<std::streamsize>(len * sizeof(T)));
|
||||
}
|
||||
|
||||
@ -42,6 +43,7 @@ namespace plib {
|
||||
{
|
||||
using ct = typename S::char_type;
|
||||
static_assert((sizeof(T) % sizeof(ct)) == 0, "ostream_write sizeof issue");
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
|
||||
return os.write(reinterpret_cast<const ct *>(data), gsl::narrow<std::streamsize>(len * sizeof(T)));
|
||||
}
|
||||
|
||||
@ -108,6 +110,7 @@ public:
|
||||
m_strm->read(&b[0], 1);
|
||||
if (m_strm->eof())
|
||||
return false;
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
|
||||
const std::size_t l = putf8string::traits_type::codelen(reinterpret_cast<putf8string::traits_type::mem_t *>(&b));
|
||||
for (std::size_t i = 1; i < l; i++)
|
||||
{
|
||||
@ -115,6 +118,7 @@ public:
|
||||
if (m_strm->eof())
|
||||
return false;
|
||||
}
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
|
||||
c = putf8string::traits_type::code(reinterpret_cast<putf8string::traits_type::mem_t *>(&b));
|
||||
return true;
|
||||
}
|
||||
@ -212,7 +216,7 @@ public:
|
||||
|
||||
void write(const pstring &s)
|
||||
{
|
||||
auto *sm = s.c_str();
|
||||
const auto *sm = s.c_str();
|
||||
const auto sl(std::char_traits<pstring::mem_t>::length(sm));
|
||||
write(sl);
|
||||
ostream_write(m_strm, sm, sl);
|
||||
|
@ -69,7 +69,14 @@ namespace testing
|
||||
class Test
|
||||
{
|
||||
public:
|
||||
virtual ~Test() {}
|
||||
Test() = default;
|
||||
virtual ~Test() = default;
|
||||
|
||||
Test(const Test &) = delete;
|
||||
Test &operator=(const Test &) = delete;
|
||||
Test(Test &&) noexcept = delete;
|
||||
Test &operator=(Test &&) noexcept = delete;
|
||||
|
||||
virtual void run() {}
|
||||
virtual void SetUp() {}
|
||||
virtual void TearDown() {}
|
||||
@ -83,7 +90,14 @@ namespace testing
|
||||
{
|
||||
registry().push_back(this);
|
||||
}
|
||||
|
||||
reg_entry_base(const reg_entry_base &) = delete;
|
||||
reg_entry_base &operator=(const reg_entry_base &) = delete;
|
||||
reg_entry_base(reg_entry_base &&) noexcept = delete;
|
||||
reg_entry_base &operator=(reg_entry_base &&) noexcept = delete;
|
||||
|
||||
virtual ~reg_entry_base() = default;
|
||||
|
||||
virtual Test *create() const { return nullptr; }
|
||||
|
||||
std::string name;
|
||||
|
Loading…
Reference in New Issue
Block a user