mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:05:41 +00:00
[REACTOS] Refactor CRegKey usage (#3779)
- [MSPAINT] ReadDWORD(): Improve 'dwValue' handling Addendum to3185db7
(r72158). - [DRWTSN32] Settings_GetOutputPath(): Fix 'key' handling Addendum to1d10606
. - [RAPPS] Remove 2 superfluous 'CRegKey::Close()' calls Follow-up to42e111f
.
This commit is contained in:
parent
a0bf7a05cc
commit
18d15bcc8b
3 changed files with 5 additions and 15 deletions
|
@ -19,10 +19,7 @@ static DWORD ReadDWORD(CRegKey &key, LPCTSTR lpName, DWORD &dwValue, BOOL bCheck
|
|||
{
|
||||
DWORD dwPrev = dwValue;
|
||||
|
||||
if (key.QueryDWORDValue(lpName, dwValue) != ERROR_SUCCESS)
|
||||
dwValue = dwPrev;
|
||||
|
||||
if (bCheckForDef && dwValue == 0)
|
||||
if (key.QueryDWORDValue(lpName, dwValue) != ERROR_SUCCESS || (bCheckForDef && dwValue == 0))
|
||||
dwValue = dwPrev;
|
||||
|
||||
return dwPrev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue