Commit 4690fc8d authored by Ben Boeckel's avatar Ben Boeckel
Browse files

SystemTools: use strings in registry function

Change-Id: I38069a6a6a98074178ac638e95df3dd77e1a0ade
parent 0dfbe56d
......@@ -772,7 +772,7 @@ void SystemTools::ReplaceString(kwsys_stl::string& source,
#endif
#if defined(_WIN32) && !defined(__CYGWIN__)
static bool SystemToolsParseRegistryKey(const char* key,
static bool SystemToolsParseRegistryKey(const kwsys_stl::string& key,
HKEY& primaryKey,
kwsys_stl::string& second,
kwsys_stl::string& valuename)
......@@ -843,7 +843,7 @@ static DWORD SystemToolsMakeRegistryMode(DWORD mode,
#if defined(_WIN32) && !defined(__CYGWIN__)
bool
SystemTools::GetRegistrySubKeys(const char *key,
SystemTools::GetRegistrySubKeys(const kwsys_stl::string& key,
kwsys_stl::vector<kwsys_stl::string>& subkeys,
KeyWOW64 view)
{
......@@ -882,7 +882,7 @@ SystemTools::GetRegistrySubKeys(const char *key,
return true;
}
#else
bool SystemTools::GetRegistrySubKeys(const char *,
bool SystemTools::GetRegistrySubKeys(const kwsys_stl::string&,
kwsys_stl::vector<kwsys_stl::string>&,
KeyWOW64)
{
......@@ -898,7 +898,7 @@ bool SystemTools::GetRegistrySubKeys(const char *,
// => will return the data of the "Root" value of the key
#if defined(_WIN32) && !defined(__CYGWIN__)
bool SystemTools::ReadRegistryValue(const char *key, kwsys_stl::string &value,
bool SystemTools::ReadRegistryValue(const kwsys_stl::string& key, kwsys_stl::string &value,
KeyWOW64 view)
{
bool valueset = false;
......@@ -955,7 +955,7 @@ bool SystemTools::ReadRegistryValue(const char *key, kwsys_stl::string &value,
return valueset;
}
#else
bool SystemTools::ReadRegistryValue(const char *, kwsys_stl::string &,
bool SystemTools::ReadRegistryValue(const kwsys_stl::string&, kwsys_stl::string &,
KeyWOW64)
{
return false;
......@@ -971,7 +971,8 @@ bool SystemTools::ReadRegistryValue(const char *, kwsys_stl::string &,
// => will set the data of the "Root" value of the key
#if defined(_WIN32) && !defined(__CYGWIN__)
bool SystemTools::WriteRegistryValue(const char *key, const char *value,
bool SystemTools::WriteRegistryValue(const kwsys_stl::string& key,
const kwsys_stl::string& value,
KeyWOW64 view)
{
HKEY primaryKey = HKEY_CURRENT_USER;
......@@ -1011,7 +1012,7 @@ bool SystemTools::WriteRegistryValue(const char *key, const char *value,
return false;
}
#else
bool SystemTools::WriteRegistryValue(const char *, const char *, KeyWOW64)
bool SystemTools::WriteRegistryValue(const kwsys_stl::string&, const kwsys_stl::string&, KeyWOW64)
{
return false;
}
......@@ -1025,7 +1026,7 @@ bool SystemTools::WriteRegistryValue(const char *, const char *, KeyWOW64)
// => will delete the data of the "Root" value of the key
#if defined(_WIN32) && !defined(__CYGWIN__)
bool SystemTools::DeleteRegistryValue(const char *key, KeyWOW64 view)
bool SystemTools::DeleteRegistryValue(const kwsys_stl::string& key, KeyWOW64 view)
{
HKEY primaryKey = HKEY_CURRENT_USER;
kwsys_stl::string second;
......@@ -1056,7 +1057,7 @@ bool SystemTools::DeleteRegistryValue(const char *key, KeyWOW64 view)
return false;
}
#else
bool SystemTools::DeleteRegistryValue(const char *, KeyWOW64)
bool SystemTools::DeleteRegistryValue(const kwsys_stl::string&, KeyWOW64)
{
return false;
}
......
......@@ -755,26 +755,26 @@ public:
/**
* Get a list of subkeys.
*/
static bool GetRegistrySubKeys(const char *key,
static bool GetRegistrySubKeys(const kwsys_stl::string& key,
kwsys_stl::vector<kwsys_stl::string>& subkeys,
KeyWOW64 view = KeyWOW64_Default);
/**
* Read a registry value
*/
static bool ReadRegistryValue(const char *key, kwsys_stl::string &value,
static bool ReadRegistryValue(const kwsys_stl::string& key, kwsys_stl::string &value,
KeyWOW64 view = KeyWOW64_Default);
/**
* Write a registry value
*/
static bool WriteRegistryValue(const char *key, const char *value,
static bool WriteRegistryValue(const kwsys_stl::string& key, const kwsys_stl::string& value,
KeyWOW64 view = KeyWOW64_Default);
/**
* Delete a registry value
*/
static bool DeleteRegistryValue(const char *key,
static bool DeleteRegistryValue(const kwsys_stl::string& key,
KeyWOW64 view = KeyWOW64_Default);
/** -----------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment