Browse Source

Projucer: Fix assigned-but-not-read variable

v7.0.9
reuk 2 years ago
parent
commit
36627a2216
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
1 changed files with 9 additions and 12 deletions
  1. +9
    -12
      extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp

+ 9
- 12
extras/Projucer/Source/Utility/PIPs/jucer_PIPGenerator.cpp View File

@@ -62,18 +62,15 @@ static String ensureCorrectWhitespace (StringRef input)
static bool isJUCEExample (const File& pipFile)
{
int numLinesToTest = 10; // license should be at the top of the file so no need to
// check all lines
for (auto line : StringArray::fromLines (pipFile.loadFileAsString()))
{
if (line.contains ("This file is part of the JUCE examples."))
return true;
--numLinesToTest;
}
return false;
const auto numLinesToTest = 10; // license should be at the top of the file so no need to check all lines
const auto lines = StringArray::fromLines (pipFile.loadFileAsString());
return std::any_of (lines.begin(),
lines.begin() + (std::min (lines.size(), numLinesToTest)),
[] (const auto& line)
{
return line.contains ("This file is part of the JUCE examples.");
});
}
static bool isValidExporterIdentifier (const Identifier& exporterIdentifier)


Loading…
Cancel
Save