mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 13:55:36 +08:00
refs #884 CValueCache::getAllValues should skip empty values.
This commit is contained in:
@@ -205,6 +205,7 @@ namespace BlackMisc
|
|||||||
CVariantMap map;
|
CVariantMap map;
|
||||||
for (const auto &element : elementsStartingWith(keyPrefix))
|
for (const auto &element : elementsStartingWith(keyPrefix))
|
||||||
{
|
{
|
||||||
|
if (! element->m_value.isValid()) { continue; }
|
||||||
implementationOf(map).insert(map.cend(), element->m_key, element->m_value);
|
implementationOf(map).insert(map.cend(), element->m_key, element->m_value);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
@@ -217,7 +218,9 @@ namespace BlackMisc
|
|||||||
for (const auto &key : keys)
|
for (const auto &key : keys)
|
||||||
{
|
{
|
||||||
auto it = m_elements.constFind(key);
|
auto it = m_elements.constFind(key);
|
||||||
if (it != m_elements.cend()) { map.insert(key, (*it)->m_value); }
|
if (it == m_elements.cend()) { continue; }
|
||||||
|
if (! (*it)->m_value.isValid()) { continue; }
|
||||||
|
map.insert(key, (*it)->m_value);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@@ -228,6 +231,7 @@ namespace BlackMisc
|
|||||||
CValueCachePacket map;
|
CValueCachePacket map;
|
||||||
for (const auto &element : elementsStartingWith(keyPrefix))
|
for (const auto &element : elementsStartingWith(keyPrefix))
|
||||||
{
|
{
|
||||||
|
if (! element->m_value.isValid()) { continue; }
|
||||||
map.insert(element->m_key, element->m_value, element->m_timestamp);
|
map.insert(element->m_key, element->m_value, element->m_timestamp);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
|||||||
Reference in New Issue
Block a user