Improve and simplify code with modern C++ features
Change-Id: I83bf5513c2a1f90ba5a59e93c473306864b27d94
diff --git a/daemon/fw/asf-measurements.hpp b/daemon/fw/asf-measurements.hpp
index ee5885d..b5b1f8e 100644
--- a/daemon/fw/asf-measurements.hpp
+++ b/daemon/fw/asf-measurements.hpp
@@ -254,8 +254,7 @@
const FaceInfoTable::iterator
insert(FaceId faceId)
{
- const auto& pair = m_fit.insert(std::make_pair(faceId, FaceInfo()));
- return pair.first;
+ return m_fit.emplace(faceId, FaceInfo()).first;
}
bool
@@ -317,7 +316,7 @@
extendLifetime(measurements::Entry& me);
public:
- static constexpr time::microseconds MEASUREMENTS_LIFETIME = time::seconds(300);
+ static constexpr time::microseconds MEASUREMENTS_LIFETIME = 300_s;
private:
MeasurementsAccessor& m_measurements;