X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2e6f84f33cb3de2fd4caa15b22953d84cbf56597..79d9a0eadea4d00dbf2de0c19f6a8c0451f40e34:/src/xbt/dict.cpp diff --git a/src/xbt/dict.cpp b/src/xbt/dict.cpp index 178b151bc7..94be19e07d 100644 --- a/src/xbt/dict.cpp +++ b/src/xbt/dict.cpp @@ -19,6 +19,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict, xbt, "Dictionaries provide the same functionalities as hash tables"); +constexpr int MAX_FILL_PERCENT = 80; + /** * @brief Constructor * @param free_ctn function to call with (@a data as argument) when @a data is removed from the dictionary @@ -395,40 +397,6 @@ int xbt_dict_is_empty(xbt_dict_t dict) return not dict || (xbt_dict_length(dict) == 0); } -/** - * @brief Outputs the content of the structure (debugging purpose) - * - * @param dict the exibitionist - * @param output a function to dump each data in the tree - * - * Outputs the content of the structure. (for debugging purpose). - * @a output is a function to output the data. If nullptr, data won't be displayed. - */ -void xbt_dict_dump(xbt_dict_t dict, void_f_pvoid_t output) -{ - xbt_dictelm_t element; - printf("Dict %p:\n", dict); - if (dict != nullptr) { - for (int i = 0; i < dict->table_size; i++) { - element = dict->table[i]; - if (element) { - printf("[\n"); - while (element != nullptr) { - printf(" %s -> '", element->key); - if (output != nullptr) { - output(element->content); - } - printf("'\n"); - element = element->next; - } - printf("]\n"); - } else { - printf("[]\n"); - } - } - } -} - /** * Create the dict mallocators. * This is an internal XBT function called during the lib initialization.