Commit 332bcd4e authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

Add explicit cast for better analysis

It also makes the project a valid C++
parent 7118601a
......@@ -611,7 +611,7 @@ void chip8_execute(CHIP8 *chip8)
x = NUM_BITPLANES;
}
chip8->bitplane = x;
chip8->bitplane = (CHIP8BP) x;
break;
/* AUDIO (XO-CHIP Only)
......
......@@ -542,7 +542,7 @@ bool retro_serialize(void *data, size_t size)
if (size < sizeof (struct serialized_state))
return false;
struct serialized_state *st = data;
struct serialized_state *st = (struct serialized_state *) data;
memcpy(&st->chip8, &chip8, sizeof(st->chip8));
st->cpu_debt = cpu_debt;
st->audio_counter_chip8 = audio_counter_chip8;
......@@ -558,7 +558,7 @@ bool retro_unserialize(const void *data, size_t size)
if (size < sizeof (struct serialized_state))
return false;
const struct serialized_state *st = data;
const struct serialized_state *st = (struct serialized_state *) data;
memcpy(&chip8, &st->chip8, sizeof(chip8));
cpu_debt = st->cpu_debt;
audio_counter_chip8 = st->audio_counter_chip8;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment