From 28c07426861c6c0b4e2333b803bf67f643b4a1c2 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 6 Aug 2015 00:52:49 +0200 Subject: [PATCH] Reduce the amount of (protected) multiple includes Move the #include within the multiple-inclusion protection. --- src/surf/network_interface.hpp | 7 ++++--- src/surf/surf_routing_cluster.hpp | 6 +++--- src/surf/surf_routing_cluster_fat_tree.hpp | 4 ++-- src/surf/surf_routing_cluster_torus.hpp | 8 ++++---- src/surf/surf_routing_floyd.hpp | 2 +- src/surf/surf_routing_full.hpp | 4 ++-- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index 0f925a1e1e..ae9ce5dcae 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -4,17 +4,18 @@ /* 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. */ +#ifndef SURF_NETWORK_INTERFACE_HPP_ +#define SURF_NETWORK_INTERFACE_HPP_ + #include #include "xbt/fifo.h" +#include "xbt/dict.h" #include "surf_interface.hpp" #include "surf_routing.hpp" #include "simgrid/link.h" -#ifndef SURF_NETWORK_INTERFACE_HPP_ -#define SURF_NETWORK_INTERFACE_HPP_ - /*********** * Classes * ***********/ diff --git a/src/surf/surf_routing_cluster.hpp b/src/surf/surf_routing_cluster.hpp index 5e834c1575..e0f85d6355 100644 --- a/src/surf/surf_routing_cluster.hpp +++ b/src/surf/surf_routing_cluster.hpp @@ -4,12 +4,12 @@ /* 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 "surf_routing_none.hpp" -#include "network_interface.hpp" - #ifndef SURF_ROUTING_CLUSTER_HPP_ #define SURF_ROUTING_CLUSTER_HPP_ +#include "surf_routing_none.hpp" +#include "network_interface.hpp" + /*********** * Classes * ***********/ diff --git a/src/surf/surf_routing_cluster_fat_tree.hpp b/src/surf/surf_routing_cluster_fat_tree.hpp index ae7e2c09a4..2180d06939 100644 --- a/src/surf/surf_routing_cluster_fat_tree.hpp +++ b/src/surf/surf_routing_cluster_fat_tree.hpp @@ -4,11 +4,11 @@ /* 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 "surf_routing_cluster.hpp" - #ifndef SURF_ROUTING_CLUSTER_FAT_TREE_HPP_ #define SURF_ROUTING_CLUSTER_FAT_TREE_HPP_ +#include "surf_routing_cluster.hpp" + /** \file surf_routing_cluster_fat_tree.cpp * The class AsClusterFatTree describes PGFT, as introduced by Eitan Zahavi diff --git a/src/surf/surf_routing_cluster_torus.hpp b/src/surf/surf_routing_cluster_torus.hpp index d324d520b6..bd1f9e7f5a 100644 --- a/src/surf/surf_routing_cluster_torus.hpp +++ b/src/surf/surf_routing_cluster_torus.hpp @@ -4,14 +4,14 @@ /* 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 "surf_routing_none.hpp" -#include "network_interface.hpp" -#include "surf_routing_cluster.hpp" - #ifndef SURF_ROUTING_CLUSTER_TORUS_HPP_ #define SURF_ROUTING_CLUSTER_TORUS_HPP_ +#include "surf_routing_none.hpp" +#include "network_interface.hpp" +#include "surf_routing_cluster.hpp" + class AsClusterTorus: public AsCluster { public: AsClusterTorus(); diff --git a/src/surf/surf_routing_floyd.hpp b/src/surf/surf_routing_floyd.hpp index 8cf9f28448..ed39b19747 100644 --- a/src/surf/surf_routing_floyd.hpp +++ b/src/surf/surf_routing_floyd.hpp @@ -4,11 +4,11 @@ /* 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 "surf_routing_generic.hpp" #ifndef SURF_ROUTING_FLOYD_HPP_ #define SURF_ROUTING_FLOYD_HPP_ +#include "surf_routing_generic.hpp" /*********** * Classes * diff --git a/src/surf/surf_routing_full.hpp b/src/surf/surf_routing_full.hpp index 397f2ca0a6..e4bc28d302 100644 --- a/src/surf/surf_routing_full.hpp +++ b/src/surf/surf_routing_full.hpp @@ -4,11 +4,11 @@ /* 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 "surf_routing_generic.hpp" - #ifndef SURF_ROUTING_FULL_HPP_ #define SURF_ROUTING_FULL_HPP_ +#include "surf_routing_generic.hpp" + /*********** * Classes * ***********/ -- 2.20.1