From a37cb59bb4a52bcc5615cd384aa28bfe4b94f0b1 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Mon, 2 Mar 2020 16:34:06 +0100 Subject: [PATCH] TeamLocality: Make `team` const --- dash/include/dash/util/TeamLocality.h | 8 ++++---- dash/src/util/TeamLocality.cc | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dash/include/dash/util/TeamLocality.h b/dash/include/dash/util/TeamLocality.h index f12a1f469..9cb92ec6e 100644 --- a/dash/include/dash/util/TeamLocality.h +++ b/dash/include/dash/util/TeamLocality.h @@ -72,7 +72,7 @@ class TeamLocality * locality domain of a specified team. */ TeamLocality( - dash::Team & team, + const dash::Team & team, Scope_t scope = Scope_t::Global, std::string domain_tag = "."); @@ -81,7 +81,7 @@ class TeamLocality * a specified team and locality domain. */ TeamLocality( - dash::Team & team, + const dash::Team & team, LocalityDomain_t & domain); /** @@ -190,7 +190,7 @@ class TeamLocality return _domain.num_cores(); } - inline dash::Team & team() const + inline const dash::Team & team() const { return (nullptr == _team) ? dash::Team::Null() : *_team; } @@ -235,7 +235,7 @@ class TeamLocality } private: - dash::Team * _team = nullptr; + const dash::Team * _team = nullptr; /// Parent scope of the team locality domain hierarchy. Scope_t _scope = Scope_t::Undefined; /// Locality domain of the team. diff --git a/dash/src/util/TeamLocality.cc b/dash/src/util/TeamLocality.cc index 6444172e7..44dba5978 100644 --- a/dash/src/util/TeamLocality.cc +++ b/dash/src/util/TeamLocality.cc @@ -14,7 +14,7 @@ dash::util::TeamLocality::TeamLocality( - dash::Team & team, + const dash::Team & team, dash::util::Locality::Scope scope, std::string domain_tag) : _team(&team), @@ -44,7 +44,7 @@ dash::util::TeamLocality::TeamLocality( } dash::util::TeamLocality::TeamLocality( - dash::Team & team, + const dash::Team & team, dash::util::LocalityDomain & domain) : _team(&team), _scope(domain.scope()),