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