From: Kevin Day Date: Mon, 19 Aug 2024 03:35:29 +0000 (-0500) Subject: Cleanup: Relocate depth increment to inline of the if condition. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=4ed229d1975db21f6ee5ee91bd8949e6c1e4c1ab;p=fll Cleanup: Relocate depth increment to inline of the if condition. --- 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; }