xbt_dict_size() can now be safely removed.
/* friends, we're ready. Come and play */
XBT_INFO("Wait for peers for a while. I need %d peers",
- xbt_dict_size(pals_int));
- while (xbt_dynar_length(peers) < xbt_dict_size(pals_int)) {
+ xbt_dict_length(pals_int));
+ while (xbt_dynar_length(peers) < xbt_dict_length(pals_int)) {
TRY {
gras_msg_handle(20);
}
}
res = MSG_main();
- if (xbt_dict_size(action_queues)) {
+ if (!xbt_dict_is_empty(action_queues)) {
XBT_WARN
("Not all actions got consumed. If the simulation ended successfully (without deadlock), you may want to add new processes to your deployment file.");
if(size == 0) {
xbt_fifo_free(fifo);
xbt_dict_remove(gap_lookup, action->sender.link_name);
- size = xbt_dict_size(gap_lookup);
+ size = xbt_dict_length(gap_lookup);
if(size == 0) {
xbt_dict_free(&gap_lookup);
}
random_id, random->min, random->max, random->mean, random->std,
random->generator, random->seed, random_radical);
- if (xbt_dict_size(random_value) == 0)
+ if (!random_value)
random_value = xbt_dict_new();
if (!strcmp(random_radical, "")) {
*/
XBT_INLINE int xbt_dict_is_empty(xbt_dict_t dict)
{
- return (xbt_dict_size(dict) == 0);
+ return !dict || (xbt_dict_length(dict) == 0);
}
/**