COMP: Remove some more warnings
This commit is contained in:
parent
6d9aee1e22
commit
3548c51e7d
|
@ -482,7 +482,6 @@ bool RegistryHelper::Close()
|
|||
#endif
|
||||
if ( m_RegistryType == Registry::UNIX_REGISTRY )
|
||||
{
|
||||
int res = 0;
|
||||
if ( !m_Changed )
|
||||
{
|
||||
this->EntriesMap.erase(
|
||||
|
@ -490,24 +489,24 @@ bool RegistryHelper::Close()
|
|||
this->EntriesMap.end());
|
||||
m_Empty = 1;
|
||||
this->SetSubKey(0);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
kwsys_ios::ostringstream str;
|
||||
if ( !getenv("HOME") )
|
||||
{
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
str << getenv("HOME") << "/." << this->GetTopLevel() << "rc";
|
||||
kwsys_ios::ofstream *ofs = new kwsys_ios::ofstream(str.str().c_str(), kwsys_ios::ios::out);
|
||||
if ( !ofs )
|
||||
{
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
if ( ofs->fail())
|
||||
{
|
||||
delete ofs;
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
*ofs << "# This file is automatically generated by the application" << kwsys_ios::endl
|
||||
<< "# If you change any lines or add new lines, note that all" << kwsys_ios::endl
|
||||
|
@ -531,10 +530,9 @@ bool RegistryHelper::Close()
|
|||
this->EntriesMap.end());
|
||||
ofs->close();
|
||||
delete ofs;
|
||||
res = 1;
|
||||
this->SetSubKey(0);
|
||||
m_Empty = 1;
|
||||
return res;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -557,18 +555,18 @@ bool RegistryHelper::ReadValue(const char *skey, char *value)
|
|||
#endif
|
||||
if ( m_RegistryType == Registry::UNIX_REGISTRY )
|
||||
{
|
||||
int res = 0;
|
||||
bool res = false;
|
||||
char *key = this->CreateKey( skey );
|
||||
if ( !key )
|
||||
{
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
RegistryHelper::StringToStringMap::iterator it
|
||||
= this->EntriesMap.find(key);
|
||||
if ( it != this->EntriesMap.end() )
|
||||
{
|
||||
strcpy(value, it->second.c_str());
|
||||
res = 1;
|
||||
res = true;
|
||||
}
|
||||
delete [] key;
|
||||
return res;
|
||||
|
@ -590,7 +588,7 @@ bool RegistryHelper::DeleteKey(const char* key)
|
|||
if ( m_RegistryType == Registry::UNIX_REGISTRY )
|
||||
{
|
||||
(void)key;
|
||||
int res = 0;
|
||||
bool res = false;
|
||||
return res;
|
||||
}
|
||||
return false;
|
||||
|
@ -612,11 +610,11 @@ bool RegistryHelper::DeleteValue(const char *skey)
|
|||
char *key = this->CreateKey( skey );
|
||||
if ( !key )
|
||||
{
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
this->EntriesMap.erase(key);
|
||||
delete [] key;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue