|
|
|
|
@ -242,11 +242,8 @@ void KvpFrame::for_each_slot_prefix(std::string const & prefix,
|
|
|
|
|
std::for_each (m_valuemap.begin(), m_valuemap.end(),
|
|
|
|
|
[&prefix,&func](const KvpFrameImpl::map_type::value_type & a)
|
|
|
|
|
{
|
|
|
|
|
std::string temp_key {a.first};
|
|
|
|
|
if (temp_key.size() < prefix.size())
|
|
|
|
|
return;
|
|
|
|
|
/* Testing for prefix matching */
|
|
|
|
|
if (std::mismatch(prefix.begin(), prefix.end(), temp_key.begin()).first == prefix.end())
|
|
|
|
|
if (strncmp(a.first, prefix.c_str(), prefix.size()) == 0)
|
|
|
|
|
func (&a.first[prefix.size()], a.second);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
@ -259,11 +256,8 @@ void KvpFrame::for_each_slot_prefix(std::string const & prefix,
|
|
|
|
|
std::for_each (m_valuemap.begin(), m_valuemap.end(),
|
|
|
|
|
[&prefix,&func,&data](const KvpFrameImpl::map_type::value_type & a)
|
|
|
|
|
{
|
|
|
|
|
std::string temp_key {a.first};
|
|
|
|
|
if (temp_key.size() < prefix.size())
|
|
|
|
|
return;
|
|
|
|
|
/* Testing for prefix matching */
|
|
|
|
|
if (std::mismatch(prefix.begin(), prefix.end(), temp_key.begin()).first == prefix.end())
|
|
|
|
|
if (strncmp(a.first, prefix.c_str(), prefix.size()) == 0)
|
|
|
|
|
func (&a.first[prefix.size()], a.second, data);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|