Skip to content

Commit a2911fa

Browse files
committed
avoid registing "" string to reduce memory consumption
1 parent 92d9973 commit a2911fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UserDBentry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool CUserDBentry::isValidKey(const std::string key)
4040

4141
void CUserDBentry::set(const std::string key, const std::string value)
4242
{
43-
if (isValidKey(key))
43+
if (!value.empty() && isValidKey(key))
4444
m_db[key] = value;
4545
}
4646

0 commit comments

Comments
 (0)