D3MF: Use C++11 range-based for loop
parent
52405bbe1b
commit
8566b9aa90
|
@ -324,8 +324,8 @@ D3MFZipArchive::D3MFZipArchive(IOSystem* pIOHandler, const std::string& rFile)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Destructor.
|
// Destructor.
|
||||||
D3MFZipArchive::~D3MFZipArchive() {
|
D3MFZipArchive::~D3MFZipArchive() {
|
||||||
for( std::map<std::string, ZipFile*>::iterator it(m_ArchiveMap.begin()), end(m_ArchiveMap.end()); it != end; ++it ) {
|
for(auto &file : m_ArchiveMap) {
|
||||||
delete it->second;
|
delete file.second;
|
||||||
}
|
}
|
||||||
m_ArchiveMap.clear();
|
m_ArchiveMap.clear();
|
||||||
|
|
||||||
|
@ -398,8 +398,8 @@ void D3MFZipArchive::Close(IOStream *pFile) {
|
||||||
void D3MFZipArchive::getFileList(std::vector<std::string> &rFileList) {
|
void D3MFZipArchive::getFileList(std::vector<std::string> &rFileList) {
|
||||||
rFileList.clear();
|
rFileList.clear();
|
||||||
|
|
||||||
for(std::map<std::string, ZipFile*>::iterator it(m_ArchiveMap.begin()), end(m_ArchiveMap.end()); it != end; ++it) {
|
for(const auto &file : m_ArchiveMap) {
|
||||||
rFileList.push_back(it->first);
|
rFileList.push_back(file.first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue