mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:55:42 +00:00
[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:
parent
da6a46c6ac
commit
627739aed9
6 changed files with 35 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue