Use std::any_of rather than std::find_if() != end()
This commit is contained in:
parent
b6b68b789d
commit
653aa32eb2
2 changed files with 3 additions and 3 deletions
|
@ -570,8 +570,8 @@ namespace Automation4 {
|
|||
{
|
||||
using std::placeholders::_1;
|
||||
// Just make this always return true to bitch about unknown script formats in autoload
|
||||
return find_if(Factories().begin(), Factories().end(),
|
||||
[&](ScriptFactory *sf) { return filename.Matches(sf->GetFilenamePattern()); }) != Factories().end();
|
||||
return any_of(Factories().begin(), Factories().end(),
|
||||
[&](ScriptFactory *sf) { return filename.Matches(sf->GetFilenamePattern()); });
|
||||
}
|
||||
|
||||
std::vector<ScriptFactory*>& ScriptFactory::Factories()
|
||||
|
|
|
@ -612,7 +612,7 @@ static void duplicate_lines(agi::Context *c, bool shift) {
|
|||
if (start == end) break;
|
||||
|
||||
// And the last line in this contiguous selection
|
||||
entryIter insert_pos = find_if(start, end, std::not1(sel));
|
||||
entryIter insert_pos = find_if_not(start, end, sel);
|
||||
entryIter last = insert_pos;
|
||||
--last;
|
||||
|
||||
|
|
Loading…
Reference in a new issue