Skip to content

Commit 8768b8d

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

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Source/Heavy/OWLExporter.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,12 @@ class OWLExporter : public ExporterBase {
199199
outputFile.getChildFile("web").deleteRecursively();
200200
outputFile.getChildFile("Test").deleteRecursively();
201201
outputFile.getChildFile("Source").deleteRecursively();
202-
outputFile.getChildFile("patch.elf").deleteRecursively();
203-
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();
202+
outputFile.getChildFile("patch.elf").deleteFile();
203+
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)