summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/Registry.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/Registry.cxx')
-rw-r--r--Source/kwsys/Registry.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/kwsys/Registry.cxx b/Source/kwsys/Registry.cxx
index 97d854d..3c0be26 100644
--- a/Source/kwsys/Registry.cxx
+++ b/Source/kwsys/Registry.cxx
@@ -367,9 +367,7 @@ RegistryHelper::~RegistryHelper()
bool RegistryHelper::Open(const char *toplevel, const char *subkey,
int readonly)
{
- this->EntriesMap.erase(
- this->EntriesMap.begin(),
- this->EntriesMap.end());
+ this->EntriesMap.clear();
m_Empty = 1;
#ifdef _WIN32
@@ -416,7 +414,7 @@ bool RegistryHelper::Open(const char *toplevel, const char *subkey,
}
}
m_HomeDirectory = homeDirectory;
- str << m_HomeDirectory << "/." << toplevel << "rc";
+ str << m_HomeDirectory.c_str() << "/." << toplevel << "rc";
if ( readonly == Registry::READWRITE )
{
kwsys_ios::ofstream ofs( str.str().c_str(), kwsys_ios::ios::out|kwsys_ios::ios::app );
@@ -503,7 +501,7 @@ bool RegistryHelper::Close()
}
kwsys_ios::ostringstream str;
- str << m_HomeDirectory << "/." << this->GetTopLevel() << "rc";
+ str << m_HomeDirectory.c_str() << "/." << this->GetTopLevel() << "rc";
kwsys_ios::ofstream *ofs = new kwsys_ios::ofstream(str.str().c_str(), kwsys_ios::ios::out);
if ( !ofs )
{
@@ -531,9 +529,7 @@ bool RegistryHelper::Close()
*ofs << it->first.c_str() << " = " << this->EncodeValue(it->second.c_str()).c_str() << kwsys_ios::endl;
}
}
- this->EntriesMap.erase(
- this->EntriesMap.begin(),
- this->EntriesMap.end());
+ this->EntriesMap.clear();
ofs->close();
delete ofs;
this->SetSubKey(0);
@@ -673,7 +669,8 @@ kwsys_stl::string RegistryHelper::CreateKey( const char *key )
return "";
}
kwsys_ios::ostringstream ostr;
- ostr << this->EncodeKey(this->m_SubKey.c_str()) << "\\" << this->EncodeKey(key);
+ ostr << this->EncodeKey(this->m_SubKey.c_str()).c_str()
+ << "\\" << this->EncodeKey(key).c_str();
return ostr.str();
}