summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-09-19 20:19:57 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-09-19 20:19:57 (GMT)
commitec36660ca88b36743c21774426a8c7981e12fb9a (patch)
tree2edb620ceec0144552b5dc85102b49e5cb827495 /Source/kwsys
parent5f2343bf91a723d7768f320f48a5b1601b50f7d0 (diff)
downloadCMake-ec36660ca88b36743c21774426a8c7981e12fb9a.zip
CMake-ec36660ca88b36743c21774426a8c7981e12fb9a.tar.gz
CMake-ec36660ca88b36743c21774426a8c7981e12fb9a.tar.bz2
BUG: Remove warning and try to fix memory problem
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/Registry.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/kwsys/Registry.cxx b/Source/kwsys/Registry.cxx
index 439433a..d7c5f0a 100644
--- a/Source/kwsys/Registry.cxx
+++ b/Source/kwsys/Registry.cxx
@@ -367,6 +367,11 @@ RegistryHelper::~RegistryHelper()
bool RegistryHelper::Open(const char *toplevel, const char *subkey,
int readonly)
{
+ this->EntriesMap.erase(
+ this->EntriesMap.begin(),
+ this->EntriesMap.end());
+ m_Empty = 1;
+
#ifdef _WIN32
if ( m_RegistryType == Registry::WIN32_REGISTRY)
{
@@ -493,10 +498,6 @@ bool RegistryHelper::Close()
{
if ( !m_Changed )
{
- this->EntriesMap.erase(
- this->EntriesMap.begin(),
- this->EntriesMap.end());
- m_Empty = 1;
this->SetSubKey(0);
return true;
}
@@ -786,7 +787,7 @@ kwsys_stl::string RegistryHelper::DecodeValue(const char* str)
kwsys_ios::ostringstream ostr;
while ( *str )
{
- int val;
+ unsigned int val;
switch ( *str )
{
case '%':