From 4ed229d1975db21f6ee5ee91bd8949e6c1e4c1ab Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 18 Aug 2024 22:35:29 -0500 Subject: [PATCH] Cleanup: Relocate depth increment to inline of the if condition. --- level_1/fl_fss/c/fss/embedded_list.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/level_1/fl_fss/c/fss/embedded_list.c b/level_1/fl_fss/c/fss/embedded_list.c index 97bf404..5d6ed99 100644 --- a/level_1/fl_fss/c/fss/embedded_list.c +++ b/level_1/fl_fss/c/fss/embedded_list.c @@ -291,9 +291,7 @@ extern "C" { // When slashes are even, the object is valid and needs to be processed. if (is_object) { - ++depth; - - if (depth >= cache->objects->size) { + if (++depth >= cache->objects->size) { state->status = f_memory_array_resize(depth + 2, sizeof(f_range_t), (void **) &cache->objects->array, &cache->objects->used, &cache->objects->size); if (F_status_is_error(state->status)) break; } @@ -399,9 +397,7 @@ extern "C" { } if (buffer.string[range->start] == f_fss_eol_s.string[0]) { - ++depth; - - if (depth >= cache->objects->size) { + if (++depth >= cache->objects->size) { state->status = f_memory_array_resize(depth + 2, sizeof(f_range_t), (void **) &cache->objects->array, &cache->objects->used, &cache->objects->size); if (F_status_is_error(state->status)) break; } -- 1.8.3.1