Avoid using a subtraction.
Instead just use a comparison.
This should be more performant and also avoids potential negative numbers when dealing with unsigned numbers.
if (!amount) return F_data_not;
- if (accounts->size - amount > 0) {
+ if (accounts->size > amount) {
return private_f_accounts_adjust(accounts->size - amount, accounts);
}
if (!amount) return F_data_not;
- if (accounts->size - amount > 0) {
+ if (accounts->size > amount) {
return private_f_accounts_resize(accounts->size - amount, accounts);
}
if (!amount) return F_data_not;
- if (accountss->size - amount > 0) {
+ if (accountss->size > amount) {
return private_f_accountss_adjust(accountss->size - amount, accountss);
}
if (!amount) return F_data_not;
- if (accountss->size - amount > 0) {
+ if (accountss->size > amount) {
return private_f_accountss_resize(accountss->size - amount, accountss);
}
if (!amount) return F_data_not;
- if (nameds->size - amount > 0) {
+ if (nameds->size > amount) {
return private_f_fss_nameds_adjust(nameds->size - amount, nameds);
}
if (!amount) return F_data_not;
- if (nameds->size - amount > 0) {
+ if (nameds->size > amount) {
return private_f_fss_nameds_resize(nameds->size - amount, nameds);
}
if (!amount) return F_data_not;
- if (items->size - amount > 0) {
+ if (items->size > amount) {
return private_f_fss_items_adjust(items->size - amount, items);
}
if (!amount) return F_data_not;
- if (items->size - amount > 0) {
+ if (items->size > amount) {
return private_f_fss_items_resize(items->size - amount, items);
}
if (!amount) return F_data_not;
- if (nest->size - amount > 0) {
+ if (nest->size > amount) {
return private_f_fss_nest_adjust(nest->size - amount, nest);
}
if (!amount) return F_data_not;
- if (nest->size - amount > 0) {
+ if (nest->size > amount) {
return private_f_fss_nest_resize(nest->size - amount, nest);
}
if (!amount) return F_data_not;
- if (nests->size - amount > 0) {
+ if (nests->size > amount) {
return private_f_fss_nests_adjust(nests->size - amount, nests);
}
if (!amount) return F_data_not;
- if (nests->size - amount > 0) {
+ if (nests->size > amount) {
return private_f_fss_nests_resize(nests->size - amount, nests);
}
if (!amount) return F_data_not;
- if (datas->size - amount > 0) {
+ if (datas->size > amount) {
return private_f_iki_datas_adjust(datas->size - amount, datas);
}
if (!amount) return F_data_not;
- if (datas->size - amount > 0) {
+ if (datas->size > amount) {
return private_f_iki_datas_resize(datas->size - amount, datas);
}
if (!amount) return F_data_not;
- if (datass->size - amount > 0) {
+ if (datass->size > amount) {
return private_f_iki_datass_adjust(datass->size - amount, datass);
}
if (!amount) return F_data_not;
- if (datass->size - amount > 0) {
+ if (datass->size > amount) {
return private_f_iki_datass_resize(datass->size - amount, datass);
}
if (!amount) return F_data_not;
- if (sets->size - amount > 0) {
+ if (sets->size > amount) {
return private_f_limit_sets_adjust(sets->size - amount, sets);
}
if (!amount) return F_data_not;
- if (sets->size - amount > 0) {
+ if (sets->size > amount) {
return private_f_limit_sets_resize(sets->size - amount, sets);
}
if (!amount) return F_data_not;
- if (setss->size - amount > 0) {
+ if (setss->size > amount) {
return private_f_limit_setss_adjust(setss->size - amount, setss);
}
if (!amount) return F_data_not;
- if (setss->size - amount > 0) {
+ if (setss->size > amount) {
return private_f_limit_setss_resize(setss->size - amount, setss);
}
if (!amount) return F_data_not;
- if (values->size - amount > 0) {
+ if (values->size > amount) {
return private_f_limit_values_adjust(values->size - amount, values);
}
if (!amount) return F_data_not;
- if (values->size - amount > 0) {
+ if (values->size > amount) {
return private_f_limit_values_resize(values->size - amount, values);
}
if (!amount) return F_data_not;
- if (valuess->size - amount > 0) {
+ if (valuess->size > amount) {
return private_f_limit_valuess_adjust(valuess->size - amount, valuess);
}
if (!amount) return F_data_not;
- if (valuess->size - amount > 0) {
+ if (valuess->size > amount) {
return private_f_limit_valuess_resize(valuess->size - amount, valuess);
}
if (!amount) return F_data_not;
- if (dynamic->size - amount > 0) {
+ if (dynamic->size > amount) {
return private_f_string_dynamic_adjust(dynamic->size - amount, dynamic);
}
if (!amount) return F_data_not;
- if (dynamic->size - amount > 0) {
+ if (dynamic->size > amount) {
return private_f_string_dynamic_resize(dynamic->size - amount, dynamic);
}
if (!amount) return F_data_not;
- if (dynamics->size - amount > 0) {
+ if (dynamics->size > amount) {
return private_f_string_dynamics_adjust(dynamics->size - amount, dynamics);
}
if (!amount) return F_data_not;
- if (dynamics->size - amount > 0) {
+ if (dynamics->size > amount) {
return private_f_string_dynamics_resize(dynamics->size - amount, dynamics);
}
if (!amount) return F_data_not;
- if (dynamicss->size - amount > 0) {
+ if (dynamicss->size > amount) {
return private_f_string_dynamicss_adjust(dynamicss->size - amount, dynamicss);
}
if (!amount) return F_data_not;
- if (dynamicss->size - amount > 0) {
+ if (dynamicss->size > amount) {
return private_f_string_dynamicss_resize(dynamicss->size - amount, dynamicss);
}
if (!amount) return F_data_not;
- if (maps->size - amount > 0) {
+ if (maps->size > amount) {
return private_f_string_maps_adjust(maps->size - amount, maps);
}
if (!amount) return F_data_not;
- if (maps->size - amount > 0) {
+ if (maps->size > amount) {
return private_f_string_maps_resize(maps->size - amount, maps);
}
if (!amount) return F_data_not;
- if (mapss->size - amount > 0) {
+ if (mapss->size > amount) {
return private_f_string_mapss_adjust(mapss->size - amount, mapss);
}
if (!amount) return F_data_not;
- if (mapss->size - amount > 0) {
+ if (mapss->size > amount) {
return private_f_string_mapss_resize(mapss->size - amount, mapss);
}
if (!amount) return F_data_not;
- if (map_multis->size - amount > 0) {
+ if (map_multis->size > amount) {
return private_f_string_map_multis_adjust(map_multis->size - amount, map_multis);
}
if (!amount) return F_data_not;
- if (map_multis->size - amount > 0) {
+ if (map_multis->size > amount) {
return private_f_string_map_multis_resize(map_multis->size - amount, map_multis);
}
if (!amount) return F_data_not;
- if (map_multiss->size - amount > 0) {
+ if (map_multiss->size > amount) {
return private_f_string_map_multiss_adjust(map_multiss->size - amount, map_multiss);
}
if (!amount) return F_data_not;
- if (map_multiss->size - amount > 0) {
+ if (map_multiss->size > amount) {
return private_f_string_map_multiss_resize(map_multiss->size - amount, map_multiss);
}
if (!amount) return F_data_not;
- if (quantitys->size - amount > 0) {
+ if (quantitys->size > amount) {
return private_f_string_quantitys_adjust(quantitys->size - amount, quantitys);
}
if (!amount) return F_data_not;
- if (quantitys->size - amount > 0) {
+ if (quantitys->size > amount) {
return private_f_string_quantitys_resize(quantitys->size - amount, quantitys);
}
if (!amount) return F_data_not;
- if (quantityss->size - amount > 0) {
+ if (quantityss->size > amount) {
return private_f_string_quantityss_adjust(quantityss->size - amount, quantityss);
}
if (!amount) return F_data_not;
- if (quantityss->size - amount > 0) {
+ if (quantityss->size > amount) {
return private_f_string_quantityss_resize(quantityss->size - amount, quantityss);
}
if (!amount) return F_data_not;
- if (ranges->size - amount > 0) {
+ if (ranges->size > amount) {
return private_f_string_ranges_adjust(ranges->size - amount, ranges);
}
if (!amount) return F_data_not;
- if (ranges->size - amount > 0) {
+ if (ranges->size > amount) {
return private_f_string_ranges_resize(ranges->size - amount, ranges);
}
if (!amount) return F_data_not;
- if (rangess->size - amount > 0) {
+ if (rangess->size > amount) {
return private_f_string_rangess_adjust(rangess->size - amount, rangess);
}
if (!amount) return F_data_not;
- if (rangess->size - amount > 0) {
+ if (rangess->size > amount) {
return private_f_string_rangess_resize(rangess->size - amount, rangess);
}
if (!triples) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (triples->size - amount > 0) {
+ if (triples->size > amount) {
return private_f_string_triples_adjust(triples->size - amount, triples);
}
if (!amount) return F_data_not;
- if (triples->size - amount > 0) {
+ if (triples->size > amount) {
return private_f_string_triples_resize(triples->size - amount, triples);
}
if (!amount) return F_data_not;
- if (tripless->size - amount > 0) {
+ if (tripless->size > amount) {
return private_f_string_tripless_adjust(tripless->size - amount, tripless);
}
if (!amount) return F_data_not;
- if (tripless->size - amount > 0) {
+ if (tripless->size > amount) {
return private_f_string_tripless_resize(tripless->size - amount, tripless);
}
if (!amount) return F_data_not;
- if (attributes->size - amount > 0) {
+ if (attributes->size > amount) {
return private_f_thread_attributes_adjust(attributes->size - amount, attributes);
}
if (!amount) return F_data_not;
- if (attributes->size - amount > 0) {
+ if (attributes->size > amount) {
return private_f_thread_attributes_resize(attributes->size - amount, attributes);
}
if (!amount) return F_data_not;
- if (barriers->size - amount > 0) {
+ if (barriers->size > amount) {
return private_f_thread_barriers_adjust(barriers->size - amount, barriers);
}
if (!amount) return F_data_not;
- if (barriers->size - amount > 0) {
+ if (barriers->size > amount) {
return private_f_thread_barriers_resize(barriers->size - amount, barriers);
}
if (!amount) return F_data_not;
- if (attributes->size - amount > 0) {
+ if (attributes->size > amount) {
return private_f_thread_barrier_attributes_adjust(attributes->size - amount, attributes);
}
if (!amount) return F_data_not;
- if (attributes->size - amount > 0) {
+ if (attributes->size > amount) {
return private_f_thread_barrier_attributes_resize(attributes->size - amount, attributes);
}
if (!amount) return F_data_not;
- if (conditions->size - amount > 0) {
+ if (conditions->size > amount) {
return private_f_thread_conditions_adjust(conditions->size - amount, conditions);
}
if (!amount) return F_data_not;
- if (conditions->size - amount > 0) {
+ if (conditions->size > amount) {
return private_f_thread_conditions_resize(conditions->size - amount, conditions);
}
if (!amount) return F_data_not;
- if (attributes->size - amount > 0) {
+ if (attributes->size > amount) {
return private_f_thread_condition_attributes_adjust(attributes->size - amount, attributes);
}
if (!amount) return F_data_not;
- if (attributes->size - amount > 0) {
+ if (attributes->size > amount) {
return private_f_thread_condition_attributes_resize(attributes->size - amount, attributes);
}
if (!amount) return F_data_not;
- if (ids->size - amount > 0) {
+ if (ids->size > amount) {
return private_f_thread_ids_adjust(ids->size - amount, ids);
}
if (!amount) return F_data_not;
- if (ids->size - amount > 0) {
+ if (ids->size > amount) {
return private_f_thread_ids_resize(ids->size - amount, ids);
}
if (!amount) return F_data_not;
- if (keys->size - amount > 0) {
+ if (keys->size > amount) {
return private_f_thread_keys_adjust(keys->size - amount, keys);
}
if (!amount) return F_data_not;
- if (keys->size - amount > 0) {
+ if (keys->size > amount) {
return private_f_thread_keys_resize(keys->size - amount, keys);
}
if (!amount) return F_data_not;
- if (locks->size - amount > 0) {
+ if (locks->size > amount) {
return private_f_thread_locks_adjust(locks->size - amount, locks);
}
if (!amount) return F_data_not;
- if (locks->size - amount > 0) {
+ if (locks->size > amount) {
return private_f_thread_locks_resize(locks->size - amount, locks);
}
if (!amount) return F_data_not;
- if (attributes->size - amount > 0) {
+ if (attributes->size > amount) {
return private_f_thread_lock_attributes_adjust(attributes->size - amount, attributes);
}
if (!amount) return F_data_not;
- if (attributes->size - amount > 0) {
+ if (attributes->size > amount) {
return private_f_thread_lock_attributes_resize(attributes->size - amount, attributes);
}
if (!amount) return F_data_not;
- if (mutexs->size - amount > 0) {
+ if (mutexs->size > amount) {
return private_f_thread_mutexs_adjust(mutexs->size - amount, mutexs);
}
if (!amount) return F_data_not;
- if (mutexs->size - amount > 0) {
+ if (mutexs->size > amount) {
return private_f_thread_mutexs_resize(mutexs->size - amount, mutexs);
}
if (!amount) return F_data_not;
- if (attributes->size - amount > 0) {
+ if (attributes->size > amount) {
return private_f_thread_mutex_attributes_adjust(attributes->size - amount, attributes);
}
if (!amount) return F_data_not;
- if (attributes->size - amount > 0) {
+ if (attributes->size > amount) {
return private_f_thread_mutex_attributes_resize(attributes->size - amount, attributes);
}
if (!amount) return F_data_not;
- if (onces->size - amount > 0) {
+ if (onces->size > amount) {
return private_f_thread_onces_adjust(onces->size - amount, onces);
}
if (!amount) return F_data_not;
- if (onces->size - amount > 0) {
+ if (onces->size > amount) {
return private_f_thread_onces_resize(onces->size - amount, onces);
}
if (!amount) return F_data_not;
- if (semaphores->size - amount > 0) {
+ if (semaphores->size > amount) {
return private_f_thread_semaphores_adjust(semaphores->size - amount, semaphores);
}
if (!amount) return F_data_not;
- if (semaphores->size - amount > 0) {
+ if (semaphores->size > amount) {
return private_f_thread_semaphores_resize(semaphores->size - amount, semaphores);
}
if (!amount) return F_data_not;
- if (sets->size - amount > 0) {
+ if (sets->size > amount) {
return private_f_thread_sets_adjust(sets->size - amount, sets);
}
if (!amount) return F_data_not;
- if (sets->size - amount > 0) {
+ if (sets->size > amount) {
return private_f_thread_sets_resize(sets->size - amount, sets);
}
if (!amount) return F_data_not;
- if (spins->size - amount > 0) {
+ if (spins->size > amount) {
return private_f_thread_spins_adjust(spins->size - amount, spins);
}
if (!amount) return F_data_not;
- if (spins->size - amount > 0) {
+ if (spins->size > amount) {
return private_f_thread_spins_resize(spins->size - amount, spins);
}
if (!amount) return F_data_not;
- if (dynamic->size - amount > 0) {
+ if (dynamic->size > amount) {
return private_f_utf_string_dynamic_adjust(dynamic->size - amount, dynamic);
}
if (!amount) return F_data_not;
- if (dynamic->size - amount > 0) {
+ if (dynamic->size > amount) {
return private_f_utf_string_dynamic_resize(dynamic->size - amount, dynamic);
}
if (!amount) return F_data_not;
- if (dynamics->size - amount > 0) {
+ if (dynamics->size > amount) {
return private_f_utf_string_dynamics_adjust(dynamics->size - amount, dynamics);
}
if (!amount) return F_data_not;
- if (dynamics->size - amount > 0) {
+ if (dynamics->size > amount) {
return private_f_utf_string_dynamics_resize(dynamics->size - amount, dynamics);
}
if (!amount) return F_data_not;
- if (dynamicss->size - amount > 0) {
+ if (dynamicss->size > amount) {
return private_f_utf_string_dynamicss_adjust(dynamicss->size - amount, dynamicss);
}
if (!amount) return F_data_not;
- if (dynamicss->size - amount > 0) {
+ if (dynamicss->size > amount) {
return private_f_utf_string_dynamicss_resize(dynamicss->size - amount, dynamicss);
}
if (!amount) return F_data_not;
- if (maps->size - amount > 0) {
+ if (maps->size > amount) {
return private_f_utf_string_maps_adjust(maps->size - amount, maps);
}
if (!amount) return F_data_not;
- if (maps->size - amount > 0) {
+ if (maps->size > amount) {
return private_f_utf_string_maps_resize(maps->size - amount, maps);
}
if (!amount) return F_data_not;
- if (mapss->size - amount > 0) {
+ if (mapss->size > amount) {
return private_f_utf_string_mapss_adjust(mapss->size - amount, mapss);
}
if (!amount) return F_data_not;
- if (mapss->size - amount > 0) {
+ if (mapss->size > amount) {
return private_f_utf_string_mapss_resize(mapss->size - amount, mapss);
}
if (!amount) return F_data_not;
- if (map_multis->size - amount > 0) {
+ if (map_multis->size > amount) {
return private_f_utf_string_map_multis_adjust(map_multis->size - amount, map_multis);
}
if (!amount) return F_data_not;
- if (map_multis->size - amount > 0) {
+ if (map_multis->size > amount) {
return private_f_utf_string_map_multis_resize(map_multis->size - amount, map_multis);
}
if (!amount) return F_data_not;
- if (map_multiss->size - amount > 0) {
+ if (map_multiss->size > amount) {
return private_f_utf_string_map_multiss_adjust(map_multiss->size - amount, map_multiss);
}
if (!amount) return F_data_not;
- if (map_multiss->size - amount > 0) {
+ if (map_multiss->size > amount) {
return private_f_utf_string_map_multiss_resize(map_multiss->size - amount, map_multiss);
}
if (!triples) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (triples->size - amount > 0) {
+ if (triples->size > amount) {
return private_f_utf_string_triples_adjust(triples->size - amount, triples);
}
if (!amount) return F_data_not;
- if (triples->size - amount > 0) {
+ if (triples->size > amount) {
return private_f_utf_string_triples_resize(triples->size - amount, triples);
}
if (!amount) return F_data_not;
- if (tripless->size - amount > 0) {
+ if (tripless->size > amount) {
return private_f_utf_string_tripless_adjust(tripless->size - amount, tripless);
}
if (!amount) return F_data_not;
- if (tripless->size - amount > 0) {
+ if (tripless->size > amount) {
return private_f_utf_string_tripless_resize(tripless->size - amount, tripless);
}