Editor/Map Context: made non-const units accessor local to this class
Since having a non-const pure virtual member of display_context was causing crashes, and it was only needed here, I've made it a local class member.
This commit is contained in:
parent
ab4580c6ea
commit
24e40cc0b1
1 changed files with 10 additions and 0 deletions
|
@ -128,12 +128,22 @@ public:
|
|||
|
||||
void replace_schedule(const std::vector<time_of_day>& schedule);
|
||||
|
||||
// Import symbol from base class.
|
||||
using display_context::units;
|
||||
|
||||
/**
|
||||
* Const accessor names needed to implement "display_context" interface
|
||||
*/
|
||||
virtual const unit_map & units() const {
|
||||
return units_;
|
||||
}
|
||||
|
||||
/** Local non-const overload of @ref units */
|
||||
unit_map& units()
|
||||
{
|
||||
return units_;
|
||||
}
|
||||
|
||||
virtual const std::vector<team>& teams() const {
|
||||
return teams_;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue