1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-28 09:29:07 +00:00

Eliminates repetition of the 'untypable character' test.

This commit is contained in:
Thomas Harte 2017-09-16 19:46:41 -04:00
parent e3e9baeaa4
commit ac57b37e96

View File

@ -61,10 +61,7 @@ static void InspectCatalogue(
// Remove all files with untypable characters. // Remove all files with untypable characters.
candidate_files.erase( candidate_files.erase(
std::remove_if(candidate_files.begin(), candidate_files.end(), [](const Storage::Disk::CPM::File &file) { std::remove_if(candidate_files.begin(), candidate_files.end(), [](const Storage::Disk::CPM::File &file) {
for(auto c : file.name) { for(auto c : file.name + file.type) {
if(c < 32) return true;
}
for(auto c : file.type) {
if(c < 32) return true; if(c < 32) return true;
} }
return false; return false;