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

pull/18598/head
Alexander Alekhin 4 years ago
commit b494de6a01
  1. 4
      modules/gapi/src/backends/fluid/gfluidbackend.cpp
  2. 8
      modules/gapi/src/compiler/passes/exec.cpp

@ -952,7 +952,7 @@ namespace
using namespace cv::gimpl; using namespace cv::gimpl;
GModel::Graph g(graph); GModel::Graph g(graph);
GFluidModel fg(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) 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, // Add FluidData to all data nodes inside island,
// set internal = true if node is not a slot in terms of higher-level GIslandModel // 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 && if (g.metadata(node).get<NodeType>().t == NodeType::DATA &&
!fg.metadata(node).contains<FluidData>()) !fg.metadata(node).contains<FluidData>())

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

Loading…
Cancel
Save