From a2911fa5c348de3be0b293853db13330ba06b90e Mon Sep 17 00:00:00 2001 From: SASANO Takayoshi Date: Fri, 6 Mar 2020 21:56:00 +0900 Subject: [PATCH] avoid registing "" string to reduce memory consumption --- UserDBentry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UserDBentry.cpp b/UserDBentry.cpp index 5b66c59..28c4ca5 100644 --- a/UserDBentry.cpp +++ b/UserDBentry.cpp @@ -40,7 +40,7 @@ bool CUserDBentry::isValidKey(const std::string key) void CUserDBentry::set(const std::string key, const std::string value) { - if (isValidKey(key)) + if (!value.empty() && isValidKey(key)) m_db[key] = value; }