mirror of https://github.com/stella-emu/stella.git
Suggested fixes from clang-tidy.
This commit is contained in:
parent
6fb5903fcc
commit
1001fdae14
|
@ -2342,7 +2342,7 @@ void DebuggerParser::executeTimer()
|
||||||
|
|
||||||
for(uInt32 i = 0; i < argCount; ++i)
|
for(uInt32 i = 0; i < argCount; ++i)
|
||||||
{
|
{
|
||||||
if(static_cast<uInt32>(args[i]) >= std::max(0x80u, romBankCount - 1))
|
if(static_cast<uInt32>(args[i]) >= std::max(0x80U, romBankCount - 1))
|
||||||
{
|
{
|
||||||
if(numAddrs == 2)
|
if(numAddrs == 2)
|
||||||
{
|
{
|
||||||
|
@ -2367,7 +2367,7 @@ void DebuggerParser::executeTimer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uInt32 idx;
|
uInt32 idx = 0;
|
||||||
if(numAddrs < 2)
|
if(numAddrs < 2)
|
||||||
{
|
{
|
||||||
idx = debugger.m6502().addTimer(addr[0], bank[0], mirrors, anyBank);
|
idx = debugger.m6502().addTimer(addr[0], bank[0], mirrors, anyBank);
|
||||||
|
|
|
@ -84,8 +84,8 @@ uInt32 TimerMap::add(uInt16 addr, uInt8 bank, bool mirrors, bool anyBank)
|
||||||
// complete a partial timer:
|
// complete a partial timer:
|
||||||
Timer& tmPartial = myList[idx];
|
Timer& tmPartial = myList[idx];
|
||||||
TimerPoint tpFrom = tmPartial.from;
|
TimerPoint tpFrom = tmPartial.from;
|
||||||
bool oldMirrors = tmPartial.mirrors;
|
const bool oldMirrors = tmPartial.mirrors;
|
||||||
bool oldAnyBank = tmPartial.anyBank;
|
const bool oldAnyBank = tmPartial.anyBank;
|
||||||
|
|
||||||
tmPartial.setTo(tp, mirrors, anyBank);
|
tmPartial.setTo(tp, mirrors, anyBank);
|
||||||
toKey(tp, tmPartial.mirrors, tmPartial.anyBank);
|
toKey(tp, tmPartial.mirrors, tmPartial.anyBank);
|
||||||
|
@ -153,8 +153,8 @@ void TimerMap::clear()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void TimerMap::reset()
|
void TimerMap::reset()
|
||||||
{
|
{
|
||||||
for(auto it = myList.begin(); it != myList.end(); ++it)
|
for(auto& it: myList)
|
||||||
it->reset();
|
it.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -163,7 +163,7 @@ void TimerMap::update(uInt16 addr, uInt8 bank, const uInt64 cycles)
|
||||||
if((addr & ADDRESS_MASK) != addr)
|
if((addr & ADDRESS_MASK) != addr)
|
||||||
{
|
{
|
||||||
// 13 bit timerpoint
|
// 13 bit timerpoint
|
||||||
TimerPoint tp(addr & ADDRESS_MASK, bank);
|
const TimerPoint tp(addr & ADDRESS_MASK, bank);
|
||||||
|
|
||||||
// Find address in from and to maps
|
// Find address in from and to maps
|
||||||
const auto from = myFromMap.equal_range(tp);
|
const auto from = myFromMap.equal_range(tp);
|
||||||
|
@ -178,7 +178,7 @@ void TimerMap::update(uInt16 addr, uInt8 bank, const uInt64 cycles)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 16 bit timerpoint
|
// 16 bit timerpoint
|
||||||
TimerPoint tp(addr, bank);
|
const TimerPoint tp(addr, bank);
|
||||||
|
|
||||||
// Find address in from and to maps
|
// Find address in from and to maps
|
||||||
const auto from = myFromMap.equal_range(tp);
|
const auto from = myFromMap.equal_range(tp);
|
||||||
|
|
|
@ -207,7 +207,7 @@ class TimerMap
|
||||||
const uInt64 cycles);
|
const uInt64 cycles);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void toKey(TimerPoint& tp, bool mirrors, bool anyBank);
|
static void toKey(TimerPoint& tp, bool mirrors, bool anyBank);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
using TimerList = std::deque<Timer>; // makes sure that the element pointers do NOT change
|
using TimerList = std::deque<Timer>; // makes sure that the element pointers do NOT change
|
||||||
|
|
Loading…
Reference in New Issue