Skip to content

Commit 6385d49

Browse files
authored
Use template hgetall, because we will tune the return types of library functions (sonic-net#759)
The template version of hgetall() could work with either map or unordered_map.
1 parent 1f87590 commit 6385d49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

syncd/RedisClient.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,9 @@ std::unordered_map<std::string, std::string> RedisClient::getAttributesFromAsicK
672672
{
673673
SWSS_LOG_ENTER();
674674

675-
return m_dbAsic->hgetall(key);
675+
std::unordered_map<std::string, std::string> map;
676+
m_dbAsic->hgetall(key, std::inserter(map, map.end()));
677+
return map;
676678
}
677679

678680
bool RedisClient::hasNoHiddenKeysDefined() const

0 commit comments

Comments
 (0)