table: don't use shared_ptr in Measurements
refs #3164
Change-Id: I7705d00ac155b15b5db69809610b68e96360a0ae
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 69c1a39..bb41fba 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -235,7 +235,7 @@
std::tuple<Name, shared_ptr<AccessStrategy::MtInfo>>
AccessStrategy::findPrefixMeasurements(const pit::Entry& pitEntry)
{
- shared_ptr<measurements::Entry> me = this->getMeasurements().findLongestPrefixMatch(pitEntry);
+ measurements::Entry* me = this->getMeasurements().findLongestPrefixMatch(pitEntry);
if (me == nullptr) {
return std::forward_as_tuple(Name(), nullptr);
}
@@ -250,8 +250,8 @@
shared_ptr<AccessStrategy::MtInfo>
AccessStrategy::addPrefixMeasurements(const Data& data)
{
- shared_ptr<measurements::Entry> me;
- if (data.getName().size() >= 1) {
+ measurements::Entry* me = nullptr;
+ if (!data.getName().empty()) {
me = this->getMeasurements().get(data.getName().getPrefix(-1));
}
if (me == nullptr) { // parent of Data Name is not in this strategy, or Data Name is empty