treewide: Avoid some copies in range-based for loops
Most of these have been found by the `performance-for-range-copy` check of `clang-tidy`. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
4e557e544b
commit
493f198e94
@@ -325,8 +325,9 @@ std::vector<std::string> ConverterFactoryBase::names()
|
||||
|
||||
for (ConverterFactoryBase *factory : factories) {
|
||||
list.push_back(factory->name_);
|
||||
for (auto alias : factory->compatibles())
|
||||
list.push_back(alias);
|
||||
|
||||
const auto &compatibles = factory->compatibles();
|
||||
list.insert(list.end(), compatibles.begin(), compatibles.end());
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
Reference in New Issue
Block a user