Skip to content

Commit 914c9a7

Browse files
committed
fixed unused variables warnings
1 parent eff144f commit 914c9a7

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/core/apu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ namespace gb
216216
{
217217
uint8_t value = 0;
218218

219-
auto extras = extra_bits_[addr - APU_REG_BASE];
219+
const auto extras = extra_bits_[addr - APU_REG_BASE];
220220

221221
if (addr == memorymap::NR52_REGISTER)
222222
{
@@ -251,7 +251,7 @@ namespace gb
251251
}
252252
}
253253

254-
return value;
254+
return value | extras;
255255
}
256256

257257
void write(uint8_t value, uint16_t addr)

src/core/cpu.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,6 @@ namespace gb
20232023

20242024
void printDisassembly(uint8_t opcode, uint16_t userdata_addr, OpcodePage page)
20252025
{
2026-
const int spaces_before_registers = 13;
20272026
char str[32];
20282027

20292028
OpcodeInfo opcodeinfo = getOpcodeInfo(opcode, page);

src/core/tilemap.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ namespace gb
204204
{
205205
// make std::array?
206206
std::vector<uint8_t> tiles;
207-
auto idx = 0;
208207

209208
forEachBackgroundTile([&](uint8_t tile){
210209
tiles.push_back(tile);
@@ -238,8 +237,6 @@ namespace gb
238237

239238
const auto start_tile_col = scx / tile_width;
240239

241-
std::size_t seed = 0;
242-
243240
for (auto line = 0; line < 144; line += 8)
244241
{
245242
const auto tile_row = ((scy + line) / tile_height);

0 commit comments

Comments
 (0)