Base: apply std::ranges
This commit is contained in:
@@ -333,7 +333,7 @@ bool FileInfo::hasExtension(const char* Ext) const
|
||||
|
||||
bool FileInfo::hasExtension(std::initializer_list<const char*> Exts) const
|
||||
{
|
||||
return std::any_of(Exts.begin(), Exts.end(), [this](const char* ext) {
|
||||
return std::ranges::any_of(Exts, [this](const char* ext) {
|
||||
return hasExtension(ext);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -479,8 +479,7 @@ bool Base::XMLReader::hasFilenames() const
|
||||
|
||||
bool Base::XMLReader::hasReadFailed(const std::string& filename) const
|
||||
{
|
||||
auto it = std::find(FailedFiles.begin(), FailedFiles.end(), filename);
|
||||
return (it != FailedFiles.end());
|
||||
return std::ranges::find(FailedFiles, filename) != FailedFiles.end();
|
||||
}
|
||||
|
||||
bool Base::XMLReader::isRegistered(Base::Persistence* Object) const
|
||||
|
||||
@@ -51,8 +51,7 @@ struct SequencerP
|
||||
}
|
||||
static void removeInstance(SequencerBase* sb)
|
||||
{
|
||||
std::vector<SequencerBase*>::iterator it;
|
||||
it = std::find(_instances.begin(), _instances.end(), sb);
|
||||
const auto it = std::ranges::find(_instances, sb);
|
||||
_instances.erase(it);
|
||||
}
|
||||
static SequencerBase& getInstance()
|
||||
|
||||
Reference in New Issue
Block a user