(addr) is redundant...

This commit is contained in:
Themaister 2011-05-30 00:04:26 +02:00
parent 02344f9048
commit f24aed9358

View File

@ -93,7 +93,7 @@ void snes_tracker_free(snes_tracker_t *tracker)
free(tracker); free(tracker);
} }
#define fetch(addr) (info->ptr[info->addr] & info->mask) #define fetch() (info->ptr[info->addr] & info->mask)
static void update_element( static void update_element(
struct snes_tracker_uniform *uniform, struct snes_tracker_uniform *uniform,
@ -105,22 +105,22 @@ static void update_element(
switch (info->type) switch (info->type)
{ {
case SSNES_STATE_CAPTURE: case SSNES_STATE_CAPTURE:
uniform->value = fetch(addr); uniform->value = fetch();
break; break;
case SSNES_STATE_CAPTURE_PREV: case SSNES_STATE_CAPTURE_PREV:
if (info->prev[0] != fetch(addr)) if (info->prev[0] != fetch())
{ {
info->prev[1] = info->prev[0]; info->prev[1] = info->prev[0];
info->prev[0] = fetch(addr); info->prev[0] = fetch();
} }
uniform->value = info->prev[1]; uniform->value = info->prev[1];
break; break;
case SSNES_STATE_TRANSITION: case SSNES_STATE_TRANSITION:
if (info->old_value != fetch(addr)) if (info->old_value != fetch())
{ {
info->old_value = fetch(addr); info->old_value = fetch();
info->frame_count = frame_count; info->frame_count = frame_count;
} }
uniform->value = info->frame_count; uniform->value = info->frame_count;
@ -128,9 +128,9 @@ static void update_element(
break; break;
case SSNES_STATE_TRANSITION_PREV: case SSNES_STATE_TRANSITION_PREV:
if (info->prev[0] != fetch(addr)) if (info->prev[0] != fetch())
{ {
info->old_value = fetch(addr); info->old_value = fetch();
info->prev[1] = info->prev[0]; info->prev[1] = info->prev[0];
info->prev[0] = frame_count; info->prev[0] = frame_count;
info->frame_count = frame_count; info->frame_count = frame_count;