From: Kevin Day Date: Fri, 5 Aug 2022 03:10:59 +0000 (-0500) Subject: Update: Use resize functions rather than adjust functions forr append and append_all... X-Git-Tag: 0.6.1~29 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=84c62a572a1be4c279a7291c0d18fcb435d2a4ae;p=fll Update: Use resize functions rather than adjust functions forr append and append_all functions. The resize functions should be used. The adjust perform extra tasks which are meaningless for append and append_all. --- diff --git a/level_0/f_limit/c/limit/private-set.c b/level_0/f_limit/c/limit/private-set.c index ab8640e..4f755be 100644 --- a/level_0/f_limit/c/limit/private-set.c +++ b/level_0/f_limit/c/limit/private-set.c @@ -26,7 +26,7 @@ extern "C" { extern f_status_t private_f_limit_sets_append(const f_limit_set_t source, f_limit_sets_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_limit_sets_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_limit_sets_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -40,7 +40,7 @@ extern "C" { extern f_status_t private_f_limit_sets_append_all(const f_limit_sets_t source, f_limit_sets_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_limit_sets_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_limit_sets_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_limit/c/limit/private-value.c b/level_0/f_limit/c/limit/private-value.c index 1cdb62d..2bb400a 100644 --- a/level_0/f_limit/c/limit/private-value.c +++ b/level_0/f_limit/c/limit/private-value.c @@ -26,7 +26,7 @@ extern "C" { extern f_status_t private_f_limit_values_append(const f_limit_value_t source, f_limit_values_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_limit_values_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_limit_values_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -40,7 +40,7 @@ extern "C" { extern f_status_t private_f_limit_values_append_all(const f_limit_values_t source, f_limit_values_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_limit_values_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_limit_values_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_string/c/string/quantity.c b/level_0/f_string/c/string/quantity.c index 5f94672..1a53234 100644 --- a/level_0/f_string/c/string/quantity.c +++ b/level_0/f_string/c/string/quantity.c @@ -23,7 +23,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_string_quantitys_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_string_quantitys_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_string/c/string/range.c b/level_0/f_string/c/string/range.c index 688d66b..fc9fa28 100644 --- a/level_0/f_string/c/string/range.c +++ b/level_0/f_string/c/string/range.c @@ -23,7 +23,7 @@ extern "C" { #endif // _di_level_0_parameter_checking_ if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_string_ranges_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_string_ranges_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -43,7 +43,7 @@ extern "C" { if (!source.used) return F_data_not; if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_string_ranges_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_string_ranges_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_string/c/string/triple.c b/level_0/f_string/c/string/triple.c index fe1d9f9..68bb6f3 100644 --- a/level_0/f_string/c/string/triple.c +++ b/level_0/f_string/c/string/triple.c @@ -25,7 +25,7 @@ extern "C" { f_status_t status = F_none; if (destination->used + 1 > destination->size) { - status = private_f_string_triples_adjust(destination->used + F_memory_default_allocation_small_d, destination); + status = private_f_string_triples_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -65,7 +65,7 @@ extern "C" { f_status_t status = F_none; if (destination->used + source.used > destination->size) { - status = private_f_string_triples_adjust(destination->used + source.used, destination); + status = private_f_string_triples_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-array_length.c b/level_0/f_type_array/c/type_array/private-array_length.c index a5569ea..b82aacb 100644 --- a/level_0/f_type_array/c/type_array/private-array_length.c +++ b/level_0/f_type_array/c/type_array/private-array_length.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_array_lengths_append(const f_array_length_t source, f_array_lengths_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_array_lengths_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_array_lengths_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_array_lengths_append_all(const f_array_lengths_t source, f_array_lengths_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_array_lengths_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_array_lengths_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-cell.c b/level_0/f_type_array/c/type_array/private-cell.c index 7758230..5943d4b 100644 --- a/level_0/f_type_array/c/type_array/private-cell.c +++ b/level_0/f_type_array/c/type_array/private-cell.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_cells_append(const f_cell_t source, f_cells_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_cells_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_cells_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -40,7 +40,7 @@ extern "C" { extern f_status_t private_f_cells_append_all(const f_cells_t source, f_cells_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_cells_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_cells_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-fll_id.c b/level_0/f_type_array/c/type_array/private-fll_id.c index ddf172a..ab24b42 100644 --- a/level_0/f_type_array/c/type_array/private-fll_id.c +++ b/level_0/f_type_array/c/type_array/private-fll_id.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_fll_ids_append(const f_fll_id_t source, f_fll_ids_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_fll_ids_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_fll_ids_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -42,7 +42,7 @@ extern "C" { extern f_status_t private_f_fll_ids_append_all(const f_fll_ids_t source, f_fll_ids_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_fll_ids_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_fll_ids_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-int128.c b/level_0/f_type_array/c/type_array/private-int128.c index d241cd4..fb629f9 100644 --- a/level_0/f_type_array/c/type_array/private-int128.c +++ b/level_0/f_type_array/c/type_array/private-int128.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_int128s_append(const int128_t source, f_int128s_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_int128s_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_int128s_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_int128s_append_all(const f_int128s_t source, f_int128s_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_int128s_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_int128s_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-int16.c b/level_0/f_type_array/c/type_array/private-int16.c index 2cd16d8..6461206 100644 --- a/level_0/f_type_array/c/type_array/private-int16.c +++ b/level_0/f_type_array/c/type_array/private-int16.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_int16s_append(const int16_t source, f_int16s_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_int16s_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_int16s_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_int16s_append_all(const f_int16s_t source, f_int16s_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_int16s_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_int16s_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-int32.c b/level_0/f_type_array/c/type_array/private-int32.c index 5ced250..263a548 100644 --- a/level_0/f_type_array/c/type_array/private-int32.c +++ b/level_0/f_type_array/c/type_array/private-int32.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_int32s_append(const int32_t source, f_int32s_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_int32s_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_int32s_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_int32s_append_all(const f_int32s_t source, f_int32s_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_int32s_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_int32s_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-int64.c b/level_0/f_type_array/c/type_array/private-int64.c index 1063d7f..9807165 100644 --- a/level_0/f_type_array/c/type_array/private-int64.c +++ b/level_0/f_type_array/c/type_array/private-int64.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_int64s_append(const int64_t source, f_int64s_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_int64s_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_int64s_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_int64s_append_all(const f_int64s_t source, f_int64s_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_int64s_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_int64s_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-int8.c b/level_0/f_type_array/c/type_array/private-int8.c index 32e9835..1d18694 100644 --- a/level_0/f_type_array/c/type_array/private-int8.c +++ b/level_0/f_type_array/c/type_array/private-int8.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_int8s_append(const int8_t source, f_int8s_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_int8s_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_int8s_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_int8s_append_all(const f_int8s_t source, f_int8s_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_int8s_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_int8s_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-state.c b/level_0/f_type_array/c/type_array/private-state.c index 0ac6f92..1ef6608 100644 --- a/level_0/f_type_array/c/type_array/private-state.c +++ b/level_0/f_type_array/c/type_array/private-state.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_states_append(const f_state_t source, f_states_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_states_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_states_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -47,7 +47,7 @@ extern "C" { extern f_status_t private_f_states_append_all(const f_states_t source, f_states_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_states_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_states_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-status.c b/level_0/f_type_array/c/type_array/private-status.c index 8e68dd5..584aee6 100644 --- a/level_0/f_type_array/c/type_array/private-status.c +++ b/level_0/f_type_array/c/type_array/private-status.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_statuss_append(const f_status_t source, f_statuss_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_statuss_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_statuss_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_statuss_append_all(const f_statuss_t source, f_statuss_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_statuss_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_statuss_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-uint128.c b/level_0/f_type_array/c/type_array/private-uint128.c index 7a14d27..240aef9 100644 --- a/level_0/f_type_array/c/type_array/private-uint128.c +++ b/level_0/f_type_array/c/type_array/private-uint128.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_uint128s_append(const uint128_t source, f_uint128s_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_uint128s_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_uint128s_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_uint128s_append_all(const f_uint128s_t source, f_uint128s_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_uint128s_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_uint128s_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-uint16.c b/level_0/f_type_array/c/type_array/private-uint16.c index bb49cf1..1a23e30 100644 --- a/level_0/f_type_array/c/type_array/private-uint16.c +++ b/level_0/f_type_array/c/type_array/private-uint16.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_uint16s_append(const uint16_t source, f_uint16s_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_uint16s_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_uint16s_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_uint16s_append_all(const f_uint16s_t source, f_uint16s_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_uint16s_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_uint16s_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-uint32.c b/level_0/f_type_array/c/type_array/private-uint32.c index 5f9105a..1dbf3da 100644 --- a/level_0/f_type_array/c/type_array/private-uint32.c +++ b/level_0/f_type_array/c/type_array/private-uint32.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_uint32s_append(const uint32_t source, f_uint32s_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_uint32s_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_uint32s_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_uint32s_append_all(const f_uint32s_t source, f_uint32s_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_uint32s_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_uint32s_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-uint64.c b/level_0/f_type_array/c/type_array/private-uint64.c index b2d99b3..a7f238d 100644 --- a/level_0/f_type_array/c/type_array/private-uint64.c +++ b/level_0/f_type_array/c/type_array/private-uint64.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_uint64s_append(const uint64_t source, f_uint64s_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_uint64s_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_uint64s_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_uint64s_append_all(const f_uint64s_t source, f_uint64s_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_uint64s_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_uint64s_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_type_array/c/type_array/private-uint8.c b/level_0/f_type_array/c/type_array/private-uint8.c index 3956357..4475b09 100644 --- a/level_0/f_type_array/c/type_array/private-uint8.c +++ b/level_0/f_type_array/c/type_array/private-uint8.c @@ -25,7 +25,7 @@ extern "C" { extern f_status_t private_f_uint8s_append(const uint8_t source, f_uint8s_t *destination) { if (destination->used + 1 > destination->size) { - const f_status_t status = private_f_uint8s_adjust(destination->used + F_memory_default_allocation_small_d, destination); + const f_status_t status = private_f_uint8s_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -39,7 +39,7 @@ extern "C" { extern f_status_t private_f_uint8s_append_all(const f_uint8s_t source, f_uint8s_t *destination) { if (destination->used + source.used > destination->size) { - const f_status_t status = private_f_uint8s_adjust(destination->used + source.used, destination); + const f_status_t status = private_f_uint8s_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; } diff --git a/level_0/f_utf/c/utf/triple.c b/level_0/f_utf/c/utf/triple.c index 0ba195d..bb79331 100644 --- a/level_0/f_utf/c/utf/triple.c +++ b/level_0/f_utf/c/utf/triple.c @@ -26,7 +26,7 @@ extern "C" { f_status_t status = F_none; if (destination->used + 1 > destination->size) { - status = private_f_utf_string_triples_adjust(destination->used + F_memory_default_allocation_small_d, destination); + status = private_f_utf_string_triples_resize(destination->used + F_memory_default_allocation_small_d, destination); if (F_status_is_error(status)) return status; } @@ -66,7 +66,7 @@ extern "C" { f_status_t status = F_none; if (destination->used + source.used > destination->size) { - status = private_f_utf_string_triples_adjust(destination->used + source.used, destination); + status = private_f_utf_string_triples_resize(destination->used + source.used, destination); if (F_status_is_error(status)) return status; }