/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <string.h>
-#include <stdio.h>
+#include <cstdio>
+#include <cstring>
#include "xbt/dict.h"
#include "xbt/ex.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict, xbt, "Dictionaries provide the same functionalities as hash tables");
-/**
- * \brief Constructor
- * \return pointer to the destination
- * \see xbt_dict_new_homogenous(), xbt_dict_free()
- *
- * Creates and initialize a new dictionary with a default hashtable size.
- * The dictionary is heterogeneous: each element can have a different free function.
- */
xbt_dict_t xbt_dict_new()
{
XBT_WARN("Function xbt_dict_new() will soon be dropped. Please switch to xbt_dict_new_homogeneous()");
newsize--;
dict->table_size = newsize;
dict->table = currcell;
- XBT_DEBUG("REHASH (%d->%d)", oldsize, newsize);
+ XBT_DEBUG("REHASH (%u->%u)", oldsize, newsize);
for (unsigned i = 0; i < oldsize; i++, currcell++) {
if (*currcell == nullptr) /* empty cell */
}
#ifdef SIMGRID_TEST
-#include <time.h>
+#include "src/internal_config.h"
#include "xbt.h"
#include "xbt/ex.h"
+#include <ctime>
#include <xbt/ex.hpp>
-#include "src/internal_config.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_dict);