Last batch of C++11 range-based for loops (#816)

This commit is contained in:
J-P Nurmi
2015-02-26 10:52:56 +01:00
parent 05c96a16d1
commit 1d09b41540
8 changed files with 47 additions and 57 deletions

View File

@@ -181,19 +181,19 @@ bool CConfig::Parse(CFile& file, CString& sErrorMsg)
void CConfig::Write(CFile& File, unsigned int iIndentation) {
CString sIndentation = CString(iIndentation, '\t');
for (EntryMapIterator it = m_ConfigEntries.begin(); it != m_ConfigEntries.end(); ++it) {
for (VCString::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) {
File.Write(sIndentation + it->first + " = " + *it2 + "\n");
for (const auto& it : m_ConfigEntries) {
for (const CString& sValue : it.second) {
File.Write(sIndentation + it.first + " = " + sValue + "\n");
}
}
for (SubConfigMapIterator it = m_SubConfigs.begin(); it != m_SubConfigs.end(); ++it) {
for (SubConfig::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) {
for (const auto& it : m_SubConfigs) {
for (const auto& it2 : it.second) {
File.Write("\n");
File.Write(sIndentation + "<" + it->first + " " + it2->first + ">\n");
it2->second.m_pSubConfig->Write(File, iIndentation + 1);
File.Write(sIndentation + "</" + it->first + ">\n");
File.Write(sIndentation + "<" + it.first + " " + it2.first + ">\n");
it2.second.m_pSubConfig->Write(File, iIndentation + 1);
File.Write(sIndentation + "</" + it.first + ">\n");
}
}
}