Skip to content

Commit a37cb59

Browse files
committed
TeamLocality: Make team const
1 parent 25eb93a commit a37cb59

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: dash/include/dash/util/TeamLocality.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class TeamLocality
7272
* locality domain of a specified team.
7373
*/
7474
TeamLocality(
75-
dash::Team & team,
75+
const dash::Team & team,
7676
Scope_t scope = Scope_t::Global,
7777
std::string domain_tag = ".");
7878

@@ -81,7 +81,7 @@ class TeamLocality
8181
* a specified team and locality domain.
8282
*/
8383
TeamLocality(
84-
dash::Team & team,
84+
const dash::Team & team,
8585
LocalityDomain_t & domain);
8686

8787
/**
@@ -190,7 +190,7 @@ class TeamLocality
190190
return _domain.num_cores();
191191
}
192192

193-
inline dash::Team & team() const
193+
inline const dash::Team & team() const
194194
{
195195
return (nullptr == _team) ? dash::Team::Null() : *_team;
196196
}
@@ -235,7 +235,7 @@ class TeamLocality
235235
}
236236

237237
private:
238-
dash::Team * _team = nullptr;
238+
const dash::Team * _team = nullptr;
239239
/// Parent scope of the team locality domain hierarchy.
240240
Scope_t _scope = Scope_t::Undefined;
241241
/// Locality domain of the team.

Diff for: dash/src/util/TeamLocality.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
dash::util::TeamLocality::TeamLocality(
17-
dash::Team & team,
17+
const dash::Team & team,
1818
dash::util::Locality::Scope scope,
1919
std::string domain_tag)
2020
: _team(&team),
@@ -44,7 +44,7 @@ dash::util::TeamLocality::TeamLocality(
4444
}
4545

4646
dash::util::TeamLocality::TeamLocality(
47-
dash::Team & team,
47+
const dash::Team & team,
4848
dash::util::LocalityDomain & domain)
4949
: _team(&team),
5050
_scope(domain.scope()),

0 commit comments

Comments
 (0)