From 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 8 Sep 2019 00:12:26 +1000 Subject: Cleanup: use post increment/decrement When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender). --- source/blender/draw/intern/draw_manager_profiling.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/draw/intern/draw_manager_profiling.c') diff --git a/source/blender/draw/intern/draw_manager_profiling.c b/source/blender/draw/intern/draw_manager_profiling.c index bab69cf7a57..76382132230 100644 --- a/source/blender/draw/intern/draw_manager_profiling.c +++ b/source/blender/draw/intern/draw_manager_profiling.c @@ -63,7 +63,7 @@ static struct DRWTimerPool { void DRW_stats_free(void) { if (DTP.timers != NULL) { - for (int i = 0; i < DTP.timer_count; ++i) { + for (int i = 0; i < DTP.timer_count; i++) { DRWTimer *timer = &DTP.timers[i]; glDeleteQueries(2, timer->query); } @@ -169,7 +169,7 @@ void DRW_stats_reset(void) GLuint64 lvl_time[MAX_NESTED_TIMER] = {0}; /* Swap queries for the next frame and sum up each lvl time. */ - for (int i = DTP.timer_increment - 1; i >= 0; --i) { + for (int i = DTP.timer_increment - 1; i >= 0; i--) { DRWTimer *timer = &DTP.timers[i]; SWAP(GLuint, timer->query[0], timer->query[1]); @@ -323,7 +323,7 @@ void DRW_stats_draw(const rcti *rect) BLI_strncpy(stat_string, "GPU Render Timings", sizeof(stat_string)); draw_stat(rect, 0, v++, stat_string, sizeof(stat_string)); - for (int i = 0; i < DTP.timer_increment; ++i) { + for (int i = 0; i < DTP.timer_increment; i++) { double time_ms, time_percent; DRWTimer *timer = &DTP.timers[i]; DRWTimer *timer_parent = (timer->lvl > 0) ? &DTP.timers[lvl_index[timer->lvl - 1]] : NULL; -- cgit v1.2.3