table: attach unique_ptr<strategy_choice::Entry> onto NameTree
refs #3164 Change-Id: I5cce7e43dba77cdaaa07347ec7ffca13f242113c
This commit is contained in:
1 parent
af9aa366fd
commit
ff10da6575
7 files changed
+57
-52
No files matched your search
@@ -119,15 +119,15 @@ Entry::setMeasurementsEntry(shared_ptr<measurements::Entry> measurementsEntry)
|
||||
}
|
||||
|
||||
void
|
||||
Entry::setStrategyChoiceEntry(shared_ptr<strategy_choice::Entry> strategyChoiceEntry)
|
||||
Entry::setStrategyChoiceEntry(unique_ptr<strategy_choice::Entry> strategyChoiceEntry)
|
||||
{
|
||||
BOOST_ASSERT(strategyChoiceEntry == nullptr || strategyChoiceEntry->m_nameTreeEntry.expired());
|
||||
|
||||
if (m_strategyChoiceEntry != nullptr) {
|
||||
m_strategyChoiceEntry->m_nameTreeEntry.reset();
|
||||
}
|
||||
m_strategyChoiceEntry = std::move(strategyChoiceEntry);
|
||||
|
||||
m_strategyChoiceEntry = strategyChoiceEntry;
|
||||
if (m_strategyChoiceEntry != nullptr) {
|
||||
m_strategyChoiceEntry->m_nameTreeEntry = this->shared_from_this();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user