Event fire: use default arguments, where possible.

Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2021-04-07 21:36:53 +01:00
parent 2fa9ffd1e3
commit 2992a0e78a
4 changed files with 9 additions and 9 deletions

View File

@ -40,7 +40,7 @@ namespace EightBit {
Signal<EventArgs> MachineTicked;
void tickMachine(const int extra) { for (int i = 0; i < extra; ++i) tickMachine(); }
void tickMachine() { tick(4); MachineTicked.fire(EventArgs::empty()); }
void tickMachine() { tick(4); MachineTicked.fire(); }
protected:
int execute() final;

View File

@ -17,15 +17,15 @@ EightBit::Profiler::Profiler(MOS6502& targetProcessor, Disassembly& disassembler
}
void EightBit::Profiler::Generate() {
StartingOutput.fire(EventArgs::empty());
StartingOutput.fire();
EmitProfileInformation();
StartingOutput.fire(EventArgs::empty());
StartingOutput.fire();
}
void EightBit::Profiler::EmitProfileInformation() {
{
StartingLineOutput.fire(EventArgs::empty());
StartingLineOutput.fire();
// For each memory address
for (int address = 0; address < 0x10000; ++address) {
// If there are any cycles associated
@ -37,11 +37,11 @@ void EightBit::Profiler::EmitProfileInformation() {
EmitLine.fire(event);
}
}
FinishedLineOutput.fire(EventArgs::empty());
FinishedLineOutput.fire();
}
{
StartingScopeOutput.fire(EventArgs::empty());
StartingScopeOutput.fire();
for (auto& scopeCycle : scopeCycles) {
auto name = scopeCycle.first;
auto cycles = scopeCycle.second;
@ -50,7 +50,7 @@ void EightBit::Profiler::EmitProfileInformation() {
ProfileScopeEventArgs event(name, cycles, count);
EmitScope.fire(event);
}
FinishedScopeOutput.fire(EventArgs::empty());
FinishedScopeOutput.fire();
}
}

View File

@ -23,7 +23,7 @@ void EightBit::M6532::step() {
if (!activated())
return;
Accessing.fire(EventArgs::empty());
Accessing.fire();
if (lowered(RES())) {
reset();
@ -120,7 +120,7 @@ void EightBit::M6532::step() {
}
}
Accessed.fire(EventArgs::empty());
Accessed.fire();
}
void EightBit::M6532::reset() {

Binary file not shown.