|
@@ -195,8 +195,8 @@ Q3BSPZipArchive::Q3BSPZipArchive(IOSystem* pIOHandler, const std::string& rFile)
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
// Destructor.
|
|
|
Q3BSPZipArchive::~Q3BSPZipArchive() {
|
|
|
- for( std::map<std::string, ZipFile*>::iterator it(m_ArchiveMap.begin()), end(m_ArchiveMap.end()); it != end; ++it ) {
|
|
|
- delete it->second;
|
|
|
+ for(auto &file : m_ArchiveMap) {
|
|
|
+ delete file.second;
|
|
|
}
|
|
|
m_ArchiveMap.clear();
|
|
|
|
|
@@ -269,8 +269,8 @@ void Q3BSPZipArchive::Close(IOStream *pFile) {
|
|
|
void Q3BSPZipArchive::getFileList(std::vector<std::string> &rFileList) {
|
|
|
rFileList.clear();
|
|
|
|
|
|
- for(std::map<std::string, ZipFile*>::iterator it(m_ArchiveMap.begin()), end(m_ArchiveMap.end()); it != end; ++it) {
|
|
|
- rFileList.push_back(it->first);
|
|
|
+ for(auto &file : m_ArchiveMap) {
|
|
|
+ rFileList.push_back(file.first);
|
|
|
}
|
|
|
}
|
|
|
|