table: simplify StrategyChoice with C++11 features
refs #2100
Change-Id: If0082c8561d706df86e92c14cb87762962ff200b
diff --git a/daemon/mgmt/strategy-choice-manager.cpp b/daemon/mgmt/strategy-choice-manager.cpp
index 962349d..e93353b 100644
--- a/daemon/mgmt/strategy-choice-manager.cpp
+++ b/daemon/mgmt/strategy-choice-manager.cpp
@@ -162,7 +162,9 @@
if (m_strategyChoice.insert(prefix, selectedStrategy))
{
NFD_LOG_DEBUG("strategy-choice result: SUCCESS");
- parameters.setStrategy(*m_strategyChoice.get(prefix));
+ auto currentStrategyChoice = m_strategyChoice.get(prefix);
+ BOOST_ASSERT(currentStrategyChoice.first);
+ parameters.setStrategy(currentStrategyChoice.second);
setResponse(response, 200, "Success", parameters.wireEncode());
}
else