From: Martin Quinson Date: Sun, 2 Oct 2016 11:04:39 +0000 (+0200) Subject: std::unordered_map are sufficient, no need for boost here X-Git-Tag: v3_14~382 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/38fa7b2d3e69aa9aa4957b2b847bec34bc1096ac std::unordered_map are sufficient, no need for boost here + cosmetics in Floyd --- diff --git a/src/kernel/routing/AsFloyd.cpp b/src/kernel/routing/AsFloyd.cpp index 07d2c6c0df..f92328ca0b 100644 --- a/src/kernel/routing/AsFloyd.cpp +++ b/src/kernel/routing/AsFloyd.cpp @@ -3,6 +3,8 @@ /* 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 + #include "xbt/log.h" #include "src/kernel/routing/AsFloyd.hpp" #include "src/surf/network_interface.hpp" @@ -26,9 +28,9 @@ AsFloyd::AsFloyd(const char*name) } AsFloyd::~AsFloyd(){ - int table_size = static_cast(vertices_.size()); if (linkTable_ == nullptr) // Dealing with a parse error in the file? return; + int table_size = vertices_.size(); /* Delete link_table */ for (int i = 0; i < table_size; i++) for (int j = 0; j < table_size; j++) diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index 86ebe14448..6a0a74a6b7 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -61,7 +61,7 @@ extern "C" { namespace simgrid { namespace surf { - boost::unordered_map *Link::links = new boost::unordered_map(); + std::unordered_map *Link::links = new std::unordered_map(); Link *Link::byName(const char* name) { if (links->find(name) == links->end()) return nullptr; diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index fdf56e473a..4c71d84d02 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -9,7 +9,7 @@ #include -#include +#include #include "xbt/fifo.h" #include "xbt/dict.h" @@ -203,9 +203,9 @@ namespace simgrid { private: void *userData = nullptr; - /* List of all links */ + /* List of all links. FIXME: should move to the Engine */ private: - static boost::unordered_map *links; + static std::unordered_map *links; public: static Link *byName(const char* name); static int linksCount();