1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-26 02:14:22 +00:00

Removed the (rather pointless) granularity value from the array objects. Converted a few macros into functions and other misc code clean-ups.

This commit is contained in:
Julian Storer 2010-01-13 18:58:40 +00:00
parent c368805559
commit 97035bb3a1
69 changed files with 218 additions and 369 deletions

View file

@ -72,7 +72,7 @@ static HKEY findKeyForPath (String name,
const String PlatformUtilities::getRegistryValue (const String& regValuePath,
const String& defaultValue)
{
String valueName, s;
String valueName, result (defaultValue);
HKEY k = findKeyForPath (regValuePath, false, valueName);
if (k != 0)
@ -82,14 +82,17 @@ const String PlatformUtilities::getRegistryValue (const String& regValuePath,
DWORD type = REG_SZ;
if (RegQueryValueEx (k, valueName, 0, &type, (LPBYTE) buffer, &bufferSize) == ERROR_SUCCESS)
s = buffer;
else
s = defaultValue;
{
if (type == REG_SZ)
result = buffer;
else if (type == REG_DWORD)
result = String ((int) *(DWORD*) buffer);
}
RegCloseKey (k);
}
return s;
return result;
}
void PlatformUtilities::setRegistryValue (const String& regValuePath,