Skip to content

Commit

Permalink
Early return
Browse files Browse the repository at this point in the history
  • Loading branch information
v1bh475u committed Sep 1, 2024
1 parent 9ffccb9 commit 2e9c928
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ void APU::initializeReadWriteHandlers()
if (!mMap)
{
throw std::runtime_error("MemoryMap not set in APU");
return;
}
else
{
mMap->setAudioReadHandler([this](Word address) { return this->readByte(address); });
mMap->setAudioWriteHandler([this](Word address, Byte value) { this->writeByte(address, value); });
}

mMap->setAudioReadHandler([this](Word address)
{ return this->readByte(address); });
mMap->setAudioWriteHandler([this](Word address, Byte value)
{ this->writeByte(address, value); });
}
void APU::test()
{
Expand Down

0 comments on commit 2e9c928

Please sign in to comment.