ds: formatting tweaks

This commit is contained in:
2026-04-20 22:03:20 +01:00
parent 321622ac16
commit c76008e498
6 changed files with 466 additions and 152 deletions
+11 -4
View File
@@ -31,7 +31,8 @@ static fx_status resize_array(struct fx_array_p *array, size_t new_capacity)
{
if (array->ar_cap < new_capacity) {
void *new_data = realloc(
array->ar_data, new_capacity * sizeof(struct fx_dsref *));
array->ar_data,
new_capacity * sizeof(struct fx_dsref *));
if (!new_data) {
return FX_ERR_NO_MEMORY;
}
@@ -43,7 +44,8 @@ static fx_status resize_array(struct fx_array_p *array, size_t new_capacity)
}
void *new_data = realloc(
array->ar_data, new_capacity * sizeof(struct fx_dsref *));
array->ar_data,
new_capacity * sizeof(struct fx_dsref *));
if (!new_data) {
return FX_ERR_NO_MEMORY;
}
@@ -59,7 +61,10 @@ static fx_status resize_array(struct fx_array_p *array, size_t new_capacity)
return FX_SUCCESS;
}
static fx_status array_insert(struct fx_array_p *array, fx_object *value, size_t at)
static fx_status array_insert(
struct fx_array_p *array,
fx_object *value,
size_t at)
{
if (at == FX_NPOS) {
at = array->ar_len;
@@ -193,7 +198,9 @@ static void array_clear(struct fx_array_p *array)
/*** PUBLIC FUNCTIONS *********************************************************/
fx_array *fx_array_create_with_values(fx_object *const *values, size_t nr_values)
fx_array *fx_array_create_with_values(
fx_object *const *values,
size_t nr_values)
{
fx_array *array = fx_array_create();
if (!array) {