From 31717acca9960c34597be9aae60d9ddf076c7f9c Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 11 Feb 2016 10:42:21 +0100 Subject: [PATCH] kill obscure dead code --- src/surf/surf_routing_generic.cpp | 48 ------------------------------- src/surf/surf_routing_generic.hpp | 3 -- 2 files changed, 51 deletions(-) diff --git a/src/surf/surf_routing_generic.cpp b/src/surf/surf_routing_generic.cpp index 6072cd8d20..fb94ab5d70 100644 --- a/src/surf/surf_routing_generic.cpp +++ b/src/surf/surf_routing_generic.cpp @@ -396,54 +396,6 @@ sg_platf_route_cbarg_t AsGeneric::newExtendedRoute(e_surf_routing_hierarchy_t hi return result; } - - -As *AsGeneric::asExist(As *to_find) -{ - xbt_dict_cursor_t cursor = NULL; - char *key; - AsGeneric *elem; - - xbt_dict_foreach(p_routingSons, cursor, key, elem) - if (to_find == elem || elem->asExist(to_find)) - return to_find; - - return NULL; -} - -As *AsGeneric::autonomousSystemExist(char *element) -{ - As *element_as, *result, *elem; - xbt_dict_cursor_t cursor = NULL; - char *key; - element_as = ((NetCard*) - xbt_lib_get_or_null(as_router_lib, element, - ROUTING_ASR_LEVEL))->getRcComponent(); - result = ((As*) - 1); - if (element_as != this) - result = asExist(element_as); - - int found = 0; - if (result) { - xbt_dict_foreach(element_as->p_routingSons, cursor, key, elem) { - found = !strcmp(elem->p_name, element); - if (found) - break; - } - if (found) - return element_as; - } - return NULL; -} - -As *AsGeneric::processingUnitsExist(char *element) -{ - As *element_as = sg_host_by_name(element)->pimpl_netcard ->getRcComponent(); - if (element_as == this) - return element_as; - return asExist(element_as); -} - void AsGeneric::srcDstCheck(NetCard *src, NetCard *dst) { if (src == NULL || dst == NULL) diff --git a/src/surf/surf_routing_generic.hpp b/src/surf/surf_routing_generic.hpp index 96ffd16dbf..29c4dd686e 100644 --- a/src/surf/surf_routing_generic.hpp +++ b/src/surf/surf_routing_generic.hpp @@ -36,9 +36,6 @@ public: virtual void parseBypassroute(sg_platf_route_cbarg_t e_route) override; virtual sg_platf_route_cbarg_t newExtendedRoute(e_surf_routing_hierarchy_t hierarchy, sg_platf_route_cbarg_t routearg, int change_order); - virtual As *asExist(As *to_find); - virtual As *autonomousSystemExist(char *element); - virtual As *processingUnitsExist(char *element); virtual void srcDstCheck(NetCard *src, NetCard *dst); }; -- 2.20.1