Skip to content

Commit eb55e3c

Browse files
committed
cleaner way to cleanup loose files
1 parent e9974fc commit eb55e3c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Source/Heavy/OWLExporter.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,10 @@ class OWLExporter : public ExporterBase {
201201
outputFile.getChildFile("Source").deleteRecursively();
202202
outputFile.getChildFile("patch.elf").deleteRecursively();
203203

204-
Array<String> file_ext = { "h", "cpp", "o", "d" };
205-
for (int i = 0; i < file_ext.size(); i++)
206-
{
207-
auto files = outputFile.findChildFiles(2, false, "*." + file_ext[i]);
208-
for (int j = 0; j < files.size(); j++)
209-
files[j].deleteRecursively();
204+
for (auto const& extension : StringArray("h", "cpp", "o", "d")) {
205+
for (auto& file : outputFile.findChildFiles(2, false, "*." + extension)) {
206+
file.deleteFile();
207+
}
210208
}
211209

212210
// rename binary

0 commit comments

Comments
 (0)