Run clang-tidy on `src/debugger`.

This commit is contained in:
Stephen Anthony 2024-08-02 09:47:59 -02:30
parent 906ad17259
commit 925c587255
15 changed files with 69 additions and 62 deletions

View File

@ -19,7 +19,7 @@
#include "BreakpointMap.hxx" #include "BreakpointMap.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void BreakpointMap::add(const Breakpoint& breakpoint, const uInt32 flags) void BreakpointMap::add(const Breakpoint& breakpoint, uInt32 flags)
{ {
const Breakpoint bp = convertBreakpoint(breakpoint); const Breakpoint bp = convertBreakpoint(breakpoint);
@ -28,7 +28,7 @@ void BreakpointMap::add(const Breakpoint& breakpoint, const uInt32 flags)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void BreakpointMap::add(const uInt16 addr, const uInt8 bank, const uInt32 flags) void BreakpointMap::add(uInt16 addr, uInt8 bank, uInt32 flags)
{ {
add(Breakpoint(addr, bank), flags); add(Breakpoint(addr, bank), flags);
} }
@ -47,7 +47,7 @@ void BreakpointMap::erase(const Breakpoint& breakpoint)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void BreakpointMap::erase(const uInt16 addr, const uInt8 bank) void BreakpointMap::erase(uInt16 addr, uInt8 bank)
{ {
erase(Breakpoint(addr, bank)); erase(Breakpoint(addr, bank));
} }
@ -92,7 +92,7 @@ bool BreakpointMap::check(const Breakpoint& breakpoint) const
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool BreakpointMap::check(const uInt16 addr, const uInt8 bank) const bool BreakpointMap::check(uInt16 addr, uInt8 bank) const
{ {
return check(Breakpoint(addr, bank)); return check(Breakpoint(addr, bank));
} }

View File

@ -63,16 +63,17 @@ class BreakpointMap
using BreakpointList = std::vector<Breakpoint>; using BreakpointList = std::vector<Breakpoint>;
BreakpointMap() = default; BreakpointMap() = default;
~BreakpointMap() = default;
inline bool isInitialized() const { return myInitialized; } bool isInitialized() const { return myInitialized; }
/** Add new breakpoint */ /** Add new breakpoint */
void add(const Breakpoint& breakpoint, const uInt32 flags = 0); void add(const Breakpoint& breakpoint, uInt32 flags = 0);
void add(const uInt16 addr, const uInt8 bank, const uInt32 flags = 0); void add(uInt16 addr, uInt8 bank, uInt32 flags = 0);
/** Erase breakpoint */ /** Erase breakpoint */
void erase(const Breakpoint& breakpoint); void erase(const Breakpoint& breakpoint);
void erase(const uInt16 addr, const uInt8 bank); void erase(uInt16 addr, uInt8 bank);
/** Get info for breakpoint */ /** Get info for breakpoint */
uInt32 get(const Breakpoint& breakpoint) const; uInt32 get(const Breakpoint& breakpoint) const;
@ -80,7 +81,7 @@ class BreakpointMap
/** Check if a breakpoint exists */ /** Check if a breakpoint exists */
bool check(const Breakpoint& breakpoint) const; bool check(const Breakpoint& breakpoint) const;
bool check(const uInt16 addr, const uInt8 bank) const; bool check(uInt16 addr, uInt8 bank) const;
/** Returns a sorted list of breakpoints */ /** Returns a sorted list of breakpoints */
BreakpointList getBreakpoints() const; BreakpointList getBreakpoints() const;
@ -95,7 +96,7 @@ class BreakpointMap
struct BreakpointHash { struct BreakpointHash {
size_t operator()(const Breakpoint& bp) const { size_t operator()(const Breakpoint& bp) const {
return std::hash<uInt64>()( return std::hash<uInt64>()(
uInt64(bp.addr) * 13 // only check for address, bank check via == operator static_cast<uInt64>(bp.addr) * 13 // only check for address, bank check via == operator
); );
} }
}; };

View File

@ -65,7 +65,7 @@ class CartDebug : public DebuggerSystem
}; };
// Determine 'type' of address (ie, what part of the system accessed) // Determine 'type' of address (ie, what part of the system accessed)
enum class AddrType { TIA, IO, ZPRAM, ROM }; enum class AddrType: uInt8 { TIA, IO, ZPRAM, ROM };
static AddrType addressType(uInt16 addr); static AddrType addressType(uInt16 addr);
public: public:
@ -302,7 +302,7 @@ class CartDebug : public DebuggerSystem
std::array<bool, 64> TIAWrite{false}; std::array<bool, 64> TIAWrite{false};
std::array<bool, 32> IOReadWrite{false}; std::array<bool, 32> IOReadWrite{false};
std::array<bool, 128> ZPRAM{false}; std::array<bool, 128> ZPRAM{false};
AddrToLabel Label{}; AddrToLabel Label;
bool breakFound{false}; bool breakFound{false};
}; };
ReservedEquates myReserved; ReservedEquates myReserved;

View File

@ -39,6 +39,7 @@ class CpuDebug : public DebuggerSystem
{ {
public: public:
CpuDebug(Debugger& dbg, Console& console); CpuDebug(Debugger& dbg, Console& console);
~CpuDebug() override = default;
const DebuggerState& getState() override; const DebuggerState& getState() override;
const DebuggerState& getOldState() override { return myOldState; } const DebuggerState& getOldState() override { return myOldState; }

View File

@ -681,13 +681,13 @@ uInt16 Debugger::windStates(uInt16 numStates, bool unwind, string& message)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt16 Debugger::rewindStates(const uInt16 numStates, string& message) uInt16 Debugger::rewindStates(uInt16 numStates, string& message)
{ {
return windStates(numStates, false, message); return windStates(numStates, false, message);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt16 Debugger::unwindStates(const uInt16 numStates, string& message) uInt16 Debugger::unwindStates(uInt16 numStates, string& message)
{ {
return windStates(numStates, true, message); return windStates(numStates, true, message);
} }

View File

@ -312,8 +312,8 @@ class Debugger : public DialogContainer
int trace(); int trace();
void nextScanline(int lines); void nextScanline(int lines);
void nextFrame(int frames); void nextFrame(int frames);
uInt16 rewindStates(const uInt16 numStates, string& message); uInt16 rewindStates(uInt16 numStates, string& message);
uInt16 unwindStates(const uInt16 numStates, string& message); uInt16 unwindStates(uInt16 numStates, string& message);
void clearAllBreakPoints() const; void clearAllBreakPoints() const;

View File

@ -46,7 +46,7 @@ class BinAndExpression : public Expression
class BinNotExpression : public Expression class BinNotExpression : public Expression
{ {
public: public:
BinNotExpression(Expression* left) : Expression(left) { } explicit BinNotExpression(Expression* left) : Expression(left) { }
Int32 evaluate() const override Int32 evaluate() const override
{ return ~(myLHS->evaluate()); } { return ~(myLHS->evaluate()); }
}; };
@ -73,7 +73,7 @@ class BinXorExpression : public Expression
class ByteDerefExpression : public Expression class ByteDerefExpression : public Expression
{ {
public: public:
ByteDerefExpression(Expression* left): Expression(left) { } explicit ByteDerefExpression(Expression* left): Expression(left) { }
Int32 evaluate() const override Int32 evaluate() const override
{ return Debugger::debugger().peek(myLHS->evaluate()); } { return Debugger::debugger().peek(myLHS->evaluate()); }
}; };
@ -91,7 +91,7 @@ class ByteDerefOffsetExpression : public Expression
class ConstExpression : public Expression class ConstExpression : public Expression
{ {
public: public:
ConstExpression(const int value) : Expression(), myValue{value} { } explicit ConstExpression(int value) : myValue{value} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return myValue; } { return myValue; }
@ -103,7 +103,7 @@ class ConstExpression : public Expression
class CpuMethodExpression : public Expression class CpuMethodExpression : public Expression
{ {
public: public:
CpuMethodExpression(CpuMethod method) : Expression(), myMethod{std::mem_fn(method)} { } explicit CpuMethodExpression(CpuMethod method) : myMethod{std::mem_fn(method)} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return myMethod(Debugger::debugger().cpuDebug()); } { return myMethod(Debugger::debugger().cpuDebug()); }
@ -134,7 +134,7 @@ class EqualsExpression : public Expression
class EquateExpression : public Expression class EquateExpression : public Expression
{ {
public: public:
EquateExpression(string_view label) : Expression(), myLabel{label} { } explicit EquateExpression(string_view label) : myLabel{label} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return Debugger::debugger().cartDebug().getAddress(myLabel); } { return Debugger::debugger().cartDebug().getAddress(myLabel); }
@ -146,7 +146,7 @@ class EquateExpression : public Expression
class FunctionExpression : public Expression class FunctionExpression : public Expression
{ {
public: public:
FunctionExpression(string_view label) : Expression(), myLabel{label} { } explicit FunctionExpression(string_view label) : myLabel{label} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return Debugger::debugger().getFunction(myLabel).evaluate(); } { return Debugger::debugger().getFunction(myLabel).evaluate(); }
@ -176,7 +176,7 @@ class GreaterExpression : public Expression
class HiByteExpression : public Expression class HiByteExpression : public Expression
{ {
public: public:
HiByteExpression(Expression* left) : Expression(left) { } explicit HiByteExpression(Expression* left) : Expression(left) { }
Int32 evaluate() const override Int32 evaluate() const override
{ return 0xff & (myLHS->evaluate() >> 8); } { return 0xff & (myLHS->evaluate() >> 8); }
}; };
@ -203,7 +203,7 @@ class LessExpression : public Expression
class LoByteExpression : public Expression class LoByteExpression : public Expression
{ {
public: public:
LoByteExpression(Expression* left) : Expression(left) { } explicit LoByteExpression(Expression* left) : Expression(left) { }
Int32 evaluate() const override Int32 evaluate() const override
{ return 0xff & myLHS->evaluate(); } { return 0xff & myLHS->evaluate(); }
}; };
@ -221,7 +221,7 @@ class LogAndExpression : public Expression
class LogNotExpression : public Expression class LogNotExpression : public Expression
{ {
public: public:
LogNotExpression(Expression* left) : Expression(left) { } explicit LogNotExpression(Expression* left) : Expression(left) { }
Int32 evaluate() const override Int32 evaluate() const override
{ return !(myLHS->evaluate()); } { return !(myLHS->evaluate()); }
}; };
@ -285,7 +285,8 @@ class PlusExpression : public Expression
class CartMethodExpression : public Expression class CartMethodExpression : public Expression
{ {
public: public:
CartMethodExpression(CartMethod method) : Expression(), myMethod{std::mem_fn(method)} { } explicit CartMethodExpression(CartMethod method) :
myMethod{std::mem_fn(method)} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return myMethod(Debugger::debugger().cartDebug()); } { return myMethod(Debugger::debugger().cartDebug()); }
@ -315,7 +316,8 @@ class ShiftRightExpression : public Expression
class RiotMethodExpression : public Expression class RiotMethodExpression : public Expression
{ {
public: public:
RiotMethodExpression(RiotMethod method) : Expression(), myMethod{std::mem_fn(method)} { } explicit RiotMethodExpression(RiotMethod method) :
myMethod{std::mem_fn(method)} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return myMethod(Debugger::debugger().riotDebug()); } { return myMethod(Debugger::debugger().riotDebug()); }
@ -327,7 +329,8 @@ class RiotMethodExpression : public Expression
class TiaMethodExpression : public Expression class TiaMethodExpression : public Expression
{ {
public: public:
TiaMethodExpression(TiaMethod method) : Expression(), myMethod{std::mem_fn(method)} { } explicit TiaMethodExpression(TiaMethod method) :
myMethod{std::mem_fn(method)} { }
Int32 evaluate() const override Int32 evaluate() const override
{ return myMethod(Debugger::debugger().tiaDebug()); } { return myMethod(Debugger::debugger().tiaDebug()); }
@ -339,7 +342,7 @@ class TiaMethodExpression : public Expression
class UnaryMinusExpression : public Expression class UnaryMinusExpression : public Expression
{ {
public: public:
UnaryMinusExpression(Expression* left) : Expression(left) { } explicit UnaryMinusExpression(Expression* left) : Expression(left) { }
Int32 evaluate() const override Int32 evaluate() const override
{ return -(myLHS->evaluate()); } { return -(myLHS->evaluate()); }
}; };
@ -348,7 +351,7 @@ class UnaryMinusExpression : public Expression
class WordDerefExpression : public Expression class WordDerefExpression : public Expression
{ {
public: public:
WordDerefExpression(Expression* left) : Expression(left) { } explicit WordDerefExpression(Expression* left) : Expression(left) { }
Int32 evaluate() const override Int32 evaluate() const override
{ return Debugger::debugger().dpeekAsInt(myLHS->evaluate()); } { return Debugger::debugger().dpeekAsInt(myLHS->evaluate()); }
}; };

View File

@ -28,11 +28,13 @@ struct Command;
#include "bspf.hxx" #include "bspf.hxx"
#include "Device.hxx" #include "Device.hxx"
#include "FrameBufferConstants.hxx"
class DebuggerParser class DebuggerParser
{ {
public: public:
DebuggerParser(Debugger& debugger, Settings& settings); DebuggerParser(Debugger& debugger, Settings& settings);
~DebuggerParser() = default;
/** Run the given command, and return the result */ /** Run the given command, and return the result */
string run(string_view command); string run(string_view command);
@ -50,11 +52,11 @@ class DebuggerParser
/** String representation of all watches currently defined */ /** String representation of all watches currently defined */
string showWatches(); string showWatches();
static inline string red(string_view msg = "") static string red(string_view msg = "")
{ {
return char(kDbgColorRed & 0xff) + string{msg}; return static_cast<char>(kDbgColorRed & 0xff) + string{msg};
} }
static inline string inverse(string_view msg = "") static string inverse(string_view msg = "")
{ {
// ASCII DEL char, decimal 127 // ASCII DEL char, decimal 127
return "\177" + string{msg}; return "\177" + string{msg};
@ -71,14 +73,14 @@ class DebuggerParser
private: private:
// Constants for argument processing // Constants for argument processing
enum class ParseState { enum class ParseState: uInt8 {
IN_COMMAND, IN_COMMAND,
IN_SPACE, IN_SPACE,
IN_BRACE, IN_BRACE,
IN_ARG IN_ARG
}; };
enum class Parameters { enum class Parameters: uInt8 {
ARG_WORD, // single 16-bit value ARG_WORD, // single 16-bit value
ARG_DWORD, // single 32-bit value ARG_DWORD, // single 32-bit value
ARG_MULTI_WORD, // multiple 16-bit values (must occur last) ARG_MULTI_WORD, // multiple 16-bit values (must occur last)

View File

@ -71,12 +71,13 @@ class DiStella
CartDebug::AddrTypeArray& labels, CartDebug::AddrTypeArray& labels,
CartDebug::AddrTypeArray& directives, CartDebug::AddrTypeArray& directives,
CartDebug::ReservedEquates& reserved); CartDebug::ReservedEquates& reserved);
~DiStella() = default;
private: private:
/** /**
Enumeration of the addressing type (RAM, ROM, RIOT, TIA...) Enumeration of the addressing type (RAM, ROM, RIOT, TIA...)
*/ */
enum class AddressType : int enum class AddressType: uInt8
{ {
INVALID, INVALID,
ROM, ROM,
@ -86,7 +87,6 @@ class DiStella
ZP_RAM ZP_RAM
}; };
private: private:
// Indicate that a new line of disassembly has been completed // Indicate that a new line of disassembly has been completed
// In the original Distella code, this indicated a new line to be printed // In the original Distella code, this indicated a new line to be printed
@ -112,12 +112,12 @@ class DiStella
void outputBytes(Device::AccessType type); void outputBytes(Device::AccessType type);
// Convenience methods to generate appropriate labels // Convenience methods to generate appropriate labels
inline void labelA12High(stringstream& buf, uInt8 op, uInt16 addr, AddressType labfound) void labelA12High(stringstream& buf, uInt8 op, uInt16 addr, AddressType labfound)
{ {
if(!myDbg.getLabel(buf, addr, true)) if(!myDbg.getLabel(buf, addr, true))
buf << "L" << Common::Base::HEX4 << addr; buf << "L" << Common::Base::HEX4 << addr;
} }
inline void labelA12Low(stringstream& buf, uInt8 op, uInt16 addr, AddressType labfound) void labelA12Low(stringstream& buf, uInt8 op, uInt16 addr, AddressType labfound)
{ {
myDbg.getLabel(buf, addr, ourLookup[op].rw_mode == RWMode::READ, 2); myDbg.getLabel(buf, addr, ourLookup[op].rw_mode == RWMode::READ, 2);
if (labfound == AddressType::TIA) if (labfound == AddressType::TIA)

View File

@ -31,7 +31,7 @@
class Expression class Expression
{ {
public: public:
Expression(Expression* lhs = nullptr, Expression* rhs = nullptr) explicit Expression(Expression* lhs = nullptr, Expression* rhs = nullptr)
: myLHS{lhs}, myRHS{rhs} { } : myLHS{lhs}, myRHS{rhs} { }
virtual ~Expression() = default; virtual ~Expression() = default;

View File

@ -52,6 +52,7 @@ class RiotDebug : public DebuggerSystem
{ {
public: public:
RiotDebug(Debugger& dbg, Console& console); RiotDebug(Debugger& dbg, Console& console);
~RiotDebug() override = default;
const DebuggerState& getState() override; const DebuggerState& getState() override;
const DebuggerState& getOldState() override { return myOldState; } const DebuggerState& getOldState() override { return myOldState; }

View File

@ -48,13 +48,15 @@ class TiaState : public DebuggerState
BoolArray vsb; BoolArray vsb;
// Indices for various IntArray above // Indices for various IntArray above
enum { P0, P1, M0, M1, BL }; enum: uInt8 { P0, P1, M0, M1, BL };
}; };
class TIADebug : public DebuggerSystem class TIADebug : public DebuggerSystem
{ {
public: public:
TIADebug(Debugger& dbg, Console& console); TIADebug(Debugger& dbg, Console& console);
~TIADebug() override = default;
TIA& tia() const { return myTIA; } TIA& tia() const { return myTIA; }
const DebuggerState& getState() override; const DebuggerState& getState() override;

View File

@ -158,7 +158,7 @@ void TimerMap::reset()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TimerMap::update(uInt16 addr, uInt8 bank, const uInt64 cycles) void TimerMap::update(uInt16 addr, uInt8 bank, uInt64 cycles)
{ {
if((addr & ADDRESS_MASK) != addr) if((addr & ADDRESS_MASK) != addr)
{ {

View File

@ -42,12 +42,10 @@ class TimerMap
uInt16 addr{0}; uInt16 addr{0};
uInt8 bank{ANY_BANK}; uInt8 bank{ANY_BANK};
TimerPoint() = default;
explicit constexpr TimerPoint(uInt16 c_addr, uInt8 c_bank) explicit constexpr TimerPoint(uInt16 c_addr, uInt8 c_bank)
: addr{c_addr}, bank{c_bank} {} : addr{c_addr}, bank{c_bank} {}
TimerPoint()
: addr{0}, bank(ANY_BANK) {}
bool operator<(const TimerPoint& other) const bool operator<(const TimerPoint& other) const
{ {
if(bank == ANY_BANK || other.bank == ANY_BANK) if(bank == ANY_BANK || other.bank == ANY_BANK)
@ -60,8 +58,8 @@ class TimerMap
public: public:
struct Timer struct Timer
{ {
TimerPoint from{}; TimerPoint from;
TimerPoint to{}; TimerPoint to;
bool mirrors{false}; bool mirrors{false};
bool anyBank{false}; bool anyBank{false};
bool isPartial{false}; bool isPartial{false};
@ -79,10 +77,9 @@ class TimerMap
Timer(uInt16 fromAddr, uInt16 toAddr, uInt8 fromBank, uInt8 toBank, Timer(uInt16 fromAddr, uInt16 toAddr, uInt8 fromBank, uInt8 toBank,
bool c_mirrors = false, bool c_anyBank = false) bool c_mirrors = false, bool c_anyBank = false)
{ : Timer(TimerPoint{fromAddr, fromBank}, TimerPoint{fromAddr, fromBank},
Timer(TimerPoint(fromAddr, fromBank), TimerPoint(fromAddr, fromBank), c_mirrors, c_anyBank)
c_mirrors, c_anyBank); {}
}
explicit Timer(const TimerPoint& tp, bool c_mirrors = false, explicit Timer(const TimerPoint& tp, bool c_mirrors = false,
bool c_anyBank = false) bool c_anyBank = false)
@ -90,9 +87,8 @@ class TimerMap
Timer(uInt16 addr, uInt8 bank, bool c_mirrors = false, Timer(uInt16 addr, uInt8 bank, bool c_mirrors = false,
bool c_anyBank = false) bool c_anyBank = false)
{ : Timer(TimerPoint{addr, bank}, c_mirrors, c_anyBank)
Timer(TimerPoint(addr, bank), c_mirrors, c_anyBank); {}
}
void setTo(const TimerPoint& tp, bool c_mirrors = false, void setTo(const TimerPoint& tp, bool c_mirrors = false,
bool c_anyBank = false) bool c_anyBank = false)
@ -136,8 +132,9 @@ class TimerMap
}; // Timer }; // Timer
explicit TimerMap() = default; explicit TimerMap() = default;
~TimerMap() = default;
inline bool isInitialized() const { return myList.size(); } bool isInitialized() const { return !myList.empty(); }
/** Add new timer */ /** Add new timer */
uInt32 add(uInt16 fromAddr, uInt16 toAddr, uInt32 add(uInt16 fromAddr, uInt16 toAddr,
@ -147,7 +144,7 @@ class TimerMap
bool mirrors, bool anyBank); bool mirrors, bool anyBank);
/** Erase timer */ /** Erase timer */
bool erase(const uInt32 idx); bool erase(uInt32 idx);
/** Clear all timers */ /** Clear all timers */
void clear(); void clear();
@ -160,8 +157,7 @@ class TimerMap
uInt32 size() const { return static_cast<uInt32>(myList.size()); } uInt32 size() const { return static_cast<uInt32>(myList.size()); }
/** Update timer */ /** Update timer */
void update(uInt16 addr, uInt8 bank, void update(uInt16 addr, uInt8 bank, uInt64 cycles);
const uInt64 cycles);
private: private:
static void toKey(TimerPoint& tp, bool mirrors, bool anyBank); static void toKey(TimerPoint& tp, bool mirrors, bool anyBank);

View File

@ -24,9 +24,10 @@ class TrapArray
{ {
public: public:
TrapArray() = default; TrapArray() = default;
~TrapArray() = default;
inline bool isSet(const uInt16 address) const { return myCount[address]; } bool isSet(const uInt16 address) const { return myCount[address]; }
inline bool isClear(const uInt16 address) const { return myCount[address] == 0; } bool isClear(const uInt16 address) const { return myCount[address] == 0; }
void add(const uInt16 address) { myCount[address]++; } void add(const uInt16 address) { myCount[address]++; }
void remove(const uInt16 address) { myCount[address]--; } void remove(const uInt16 address) { myCount[address]--; }
@ -39,7 +40,7 @@ class TrapArray
} }
void clearAll() { myInitialized = false; myCount.fill(0); } void clearAll() { myInitialized = false; myCount.fill(0); }
inline bool isInitialized() const { return myInitialized; } bool isInitialized() const { return myInitialized; }
private: private:
// The actual counts // The actual counts