From 804216acb197dfb9902b523b20b43e5f6d644143 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 26 Jun 2018 17:17:11 +0200 Subject: [PATCH] Make member variables "private". --- include/simgrid/kernel/routing/NetZoneImpl.hpp | 4 ++-- include/simgrid/s4u/NetZone.hpp | 3 +-- src/kernel/routing/RoutedZone.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/simgrid/kernel/routing/NetZoneImpl.hpp b/include/simgrid/kernel/routing/NetZoneImpl.hpp index 39d737c36e..9e8090536b 100644 --- a/include/simgrid/kernel/routing/NetZoneImpl.hpp +++ b/include/simgrid/kernel/routing/NetZoneImpl.hpp @@ -54,8 +54,6 @@ protected: explicit NetZoneImpl(NetZoneImpl* father, std::string name); virtual ~NetZoneImpl(); - s4u::NetZone piface_; - public: s4u::NetZone* get_iface() { return &piface_; } @@ -89,6 +87,8 @@ protected: /* OUT */ std::vector& links, double* latency); private: + s4u::NetZone piface_; + // our content, as known to our graph routing algorithm (maps vertex_id -> vertex) std::vector vertices_; diff --git a/include/simgrid/s4u/NetZone.hpp b/include/simgrid/s4u/NetZone.hpp index f43ca18e33..2e3d15ce47 100644 --- a/include/simgrid/s4u/NetZone.hpp +++ b/include/simgrid/s4u/NetZone.hpp @@ -30,8 +30,6 @@ protected: explicit NetZone(kernel::routing::NetZoneImpl* impl); ~NetZone(); - kernel::routing::NetZoneImpl* pimpl_; - public: /** @brief Retrieves the name of that netzone as a C++ string */ const std::string& get_name() const; @@ -46,6 +44,7 @@ public: kernel::routing::NetZoneImpl* get_impl() { return pimpl_; } private: + kernel::routing::NetZoneImpl* pimpl_; std::unordered_map properties_; public: diff --git a/src/kernel/routing/RoutedZone.cpp b/src/kernel/routing/RoutedZone.cpp index 1a2058b83b..db0fb9a399 100644 --- a/src/kernel/routing/RoutedZone.cpp +++ b/src/kernel/routing/RoutedZone.cpp @@ -199,7 +199,7 @@ void RoutedZone::add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* dstName, gw_dst->get_cname()); } - piface_.on_route_creation(symmetrical, src, dst, gw_src, gw_dst, link_list); + get_iface()->on_route_creation(symmetrical, src, dst, gw_src, gw_dst, link_list); } } } -- 2.20.1