@@ -88,7 +88,7 @@ bool xrCompressor::testSKIP(LPCSTR path)
8888 if (0 == _stricmp (p_ext, " .rc" ))
8989 return true ;
9090
91- for (auto &it : exclude_exts)
91+ for (const auto &it : exclude_exts)
9292 if (PatternMatch (p_ext, it.c_str ()))
9393 return true ;
9494
@@ -430,7 +430,7 @@ void xrCompressor::PerformWork()
430430 int pack_num = 0 ;
431431 OpenPack (target_name.c_str (), pack_num++);
432432
433- for (auto &it : *folders_list)
433+ for (const auto &it : *folders_list)
434434 write_file_header (it, 0 , 0 , 0 , 0 );
435435
436436 if (!bStoreFiles)
@@ -483,7 +483,7 @@ void xrCompressor::GatherFiles(LPCSTR path)
483483 Msg (" ERROR: Unable to open file list:%s" , path);
484484 return ;
485485 }
486- for (auto &it : *i_list)
486+ for (const auto &it : *i_list)
487487 {
488488 xr_string tmp_path = xr_string (path) + xr_string (it);
489489 if (!testSKIP (tmp_path.c_str ()))
@@ -504,7 +504,7 @@ bool xrCompressor::IsFolderAccepted(CInifile& ltx, LPCSTR path, BOOL& recurse)
504504 if (ltx.section_exist (" exclude_folders" ))
505505 {
506506 CInifile::Sect& ef_sect = ltx.r_section (" exclude_folders" );
507- for (auto &it : ef_sect.Data )
507+ for (const auto &it : ef_sect.Data )
508508 {
509509 recurse = CInifile::isBool (it.second .c_str ());
510510 if (recurse)
@@ -535,7 +535,7 @@ void xrCompressor::ProcessLTX(CInifile& ltx)
535535 if (ltx.section_exist (" include_folders" ))
536536 {
537537 CInifile::Sect& if_sect = ltx.r_section (" include_folders" );
538- for (auto &it : if_sect.Data )
538+ for (const auto &it : if_sect.Data )
539539 {
540540 BOOL ifRecurse = CInifile::isBool (it.second .c_str ());
541541 u32 folder_mask = FS_ListFolders | (ifRecurse ? 0 : FS_RootOnly);
@@ -563,7 +563,7 @@ void xrCompressor::ProcessLTX(CInifile& ltx)
563563 continue ;
564564 }
565565
566- for (auto &it : *i_fl_list)
566+ for (const auto &it : *i_fl_list)
567567 {
568568 xr_string tmp_path = xr_string (path) + xr_string (it);
569569 bool val = IsFolderAccepted (ltx, tmp_path.c_str (), efRecurse);
@@ -592,7 +592,7 @@ void xrCompressor::ProcessLTX(CInifile& ltx)
592592 if (ltx.section_exist (" include_files" ))
593593 {
594594 CInifile::Sect& if_sect = ltx.r_section (" include_files" );
595- for (auto &it : if_sect.Data )
595+ for (const auto &it : if_sect.Data )
596596 files_list->push_back (xr_strdup (it.first .c_str ()));
597597 }
598598
0 commit comments