all repos — mgba @ 2c2a7ca436ed1229a30c07ac45389a0a539e7259

mGBA Game Boy Advance Emulator

Core: Remove unnecessary pointer operation in timing
Jeffrey Pfau jeffrey@endrift.com
Sun, 30 Oct 2016 17:50:19 -0700
commit

2c2a7ca436ed1229a30c07ac45389a0a539e7259

parent

2a0c53441a70d564077663861e17433f6cb0e344

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M src/core/timing.csrc/core/timing.c

@@ -55,9 +55,10 @@ }

void mTimingTick(struct mTiming* timing, int32_t cycles) { timing->masterCycles += cycles; + uint32_t masterCycles = timing->masterCycles; while (mTimingEventListSize(&timing->events)) { struct mTimingEvent* next = *mTimingEventListGetPointer(&timing->events, 0); - int32_t nextWhen = next->when - timing->masterCycles; + int32_t nextWhen = next->when - masterCycles; if (nextWhen > 0) { *timing->nextEvent = nextWhen; return;