table: don't use shared_ptr in Measurements
refs #3164
Change-Id: I7705d00ac155b15b5db69809610b68e96360a0ae
diff --git a/daemon/table/name-tree-entry.cpp b/daemon/table/name-tree-entry.cpp
index 3244059..b094e38 100644
--- a/daemon/table/name-tree-entry.cpp
+++ b/daemon/table/name-tree-entry.cpp
@@ -104,14 +104,14 @@
}
void
-Entry::setMeasurementsEntry(shared_ptr<measurements::Entry> measurementsEntry)
+Entry::setMeasurementsEntry(unique_ptr<measurements::Entry> measurementsEntry)
{
BOOST_ASSERT(measurementsEntry == nullptr || measurementsEntry->m_nameTreeEntry.expired());
if (m_measurementsEntry != nullptr) {
m_measurementsEntry->m_nameTreeEntry.reset();
}
- m_measurementsEntry = measurementsEntry;
+ m_measurementsEntry = std::move(measurementsEntry);
if (m_measurementsEntry != nullptr) {
m_measurementsEntry->m_nameTreeEntry = this->shared_from_this();