From ac57b37e968cf10380c752ee5f446bccd859a7a3 Mon Sep 17 00:00:00 2001 From: Thomas Harte <thomas.harte@gmail.com> Date: Sat, 16 Sep 2017 19:46:41 -0400 Subject: [PATCH] Eliminates repetition of the 'untypable character' test. --- StaticAnalyser/AmstradCPC/StaticAnalyser.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/StaticAnalyser/AmstradCPC/StaticAnalyser.cpp b/StaticAnalyser/AmstradCPC/StaticAnalyser.cpp index c1ab5d732..2db9482bb 100644 --- a/StaticAnalyser/AmstradCPC/StaticAnalyser.cpp +++ b/StaticAnalyser/AmstradCPC/StaticAnalyser.cpp @@ -61,10 +61,7 @@ static void InspectCatalogue( // Remove all files with untypable characters. candidate_files.erase( std::remove_if(candidate_files.begin(), candidate_files.end(), [](const Storage::Disk::CPM::File &file) { - for(auto c : file.name) { - if(c < 32) return true; - } - for(auto c : file.type) { + for(auto c : file.name + file.type) { if(c < 32) return true; } return false;