[RAPPS] Introduce 'SizeBytes' DB entry and use it for display

This will allow us to reduce the DB size a little by avoiding
duplication for each and every entry.
Original patch by JIRA user "swyter"

CORE-10310
This commit is contained in:
Alexander Shaposhnikov 2018-04-07 19:17:22 +03:00
parent da6a46c6ac
commit 627739aed9
No known key found for this signature in database
GPG key ID: 2BC6459908479EFC
6 changed files with 35 additions and 10 deletions

View file

@ -354,7 +354,7 @@ VOID CConfigParser::CacheINILocale()
m_szCachedINISectionLocaleNeutral = m_szCachedINISectionLocale + m_szLocaleID.Right(2);
}
UINT CConfigParser::GetString(const ATL::CStringW& KeyName, ATL::CStringW& ResultString)
BOOL CConfigParser::GetString(const ATL::CStringW& KeyName, ATL::CStringW& ResultString)
{
DWORD dwResult;
@ -392,10 +392,12 @@ UINT CConfigParser::GetString(const ATL::CStringW& KeyName, ATL::CStringW& Resul
return (dwResult != 0 ? TRUE : FALSE);
}
UINT CConfigParser::GetInt(const ATL::CStringW& KeyName)
BOOL CConfigParser::GetInt(const ATL::CStringW& KeyName, INT& iResult)
{
ATL::CStringW Buffer;
iResult = 0;
// grab the text version of our entry
if (!GetString(KeyName, Buffer))
return FALSE;
@ -404,8 +406,9 @@ UINT CConfigParser::GetInt(const ATL::CStringW& KeyName)
return FALSE;
// convert it to an actual integer
INT result = StrToIntW(Buffer.GetString());
iResult = StrToIntW(Buffer.GetString());
return (UINT) (result <= 0) ? 0 : result;
// we only care about values > 0
return (iResult > 0);
}
// CConfigParser