Merge pull request #18559 from maxint:fix-rang-loop-construct-warnings

This commit is contained in:
Alexander Alekhin 2020-10-14 10:17:16 +00:00
commit b494de6a01
2 changed files with 6 additions and 6 deletions

View File

@ -952,7 +952,7 @@ namespace
using namespace cv::gimpl;
GModel::Graph g(graph);
GFluidModel fg(graph);
for (const auto node : g.nodes())
for (const auto& node : g.nodes())
{
if (g.metadata(node).get<NodeType>().t == NodeType::DATA)
{
@ -1440,7 +1440,7 @@ void GFluidBackendImpl::addMetaSensitiveBackendPasses(ade::ExecutionEngineSetupC
{
// Add FluidData to all data nodes inside island,
// set internal = true if node is not a slot in terms of higher-level GIslandModel
for (const auto node : isl->contents())
for (const auto& node : isl->contents())
{
if (g.metadata(node).get<NodeType>().t == NodeType::DATA &&
!fg.metadata(node).contains<FluidData>())

View File

@ -71,12 +71,12 @@ namespace
all.insert(src_g.nodes().begin(), src_g.nodes().end());
for (const auto nh : proto.in_nhs)
for (const auto& nh : proto.in_nhs)
{
all.erase(nh);
in_ops.insert(nh->outNodes().begin(), nh->outNodes().end());
}
for (const auto nh : proto.out_nhs)
for (const auto& nh : proto.out_nhs)
{
all.erase(nh);
out_ops.insert(nh->inNodes().begin(), nh->inNodes().end());
@ -90,12 +90,12 @@ namespace
auto ih = GIslandModel::mkIslandNode(g, std::move(isl));
for (const auto nh : proto.in_nhs)
for (const auto& nh : proto.in_nhs)
{
auto slot = GIslandModel::mkSlotNode(g, nh);
g.link(slot, ih);
}
for (const auto nh : proto.out_nhs)
for (const auto& nh : proto.out_nhs)
{
auto slot = GIslandModel::mkSlotNode(g, nh);
g.link(ih, slot);