Skip to content

Commit 49582e1

Browse files
maxintSajjad Ali
authored and
Sajjad Ali
committed
Fix warnings: "-Wrange-loop-construct" in gapi
1 parent fa82b01 commit 49582e1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

modules/gapi/src/backends/fluid/gfluidbackend.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ namespace
952952
using namespace cv::gimpl;
953953
GModel::Graph g(graph);
954954
GFluidModel fg(graph);
955-
for (const auto node : g.nodes())
955+
for (const auto& node : g.nodes())
956956
{
957957
if (g.metadata(node).get<NodeType>().t == NodeType::DATA)
958958
{
@@ -1440,7 +1440,7 @@ void GFluidBackendImpl::addMetaSensitiveBackendPasses(ade::ExecutionEngineSetupC
14401440
{
14411441
// Add FluidData to all data nodes inside island,
14421442
// set internal = true if node is not a slot in terms of higher-level GIslandModel
1443-
for (const auto node : isl->contents())
1443+
for (const auto& node : isl->contents())
14441444
{
14451445
if (g.metadata(node).get<NodeType>().t == NodeType::DATA &&
14461446
!fg.metadata(node).contains<FluidData>())

modules/gapi/src/compiler/passes/exec.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ namespace
7171

7272
all.insert(src_g.nodes().begin(), src_g.nodes().end());
7373

74-
for (const auto nh : proto.in_nhs)
74+
for (const auto& nh : proto.in_nhs)
7575
{
7676
all.erase(nh);
7777
in_ops.insert(nh->outNodes().begin(), nh->outNodes().end());
7878
}
79-
for (const auto nh : proto.out_nhs)
79+
for (const auto& nh : proto.out_nhs)
8080
{
8181
all.erase(nh);
8282
out_ops.insert(nh->inNodes().begin(), nh->inNodes().end());
@@ -90,12 +90,12 @@ namespace
9090

9191
auto ih = GIslandModel::mkIslandNode(g, std::move(isl));
9292

93-
for (const auto nh : proto.in_nhs)
93+
for (const auto& nh : proto.in_nhs)
9494
{
9595
auto slot = GIslandModel::mkSlotNode(g, nh);
9696
g.link(slot, ih);
9797
}
98-
for (const auto nh : proto.out_nhs)
98+
for (const auto& nh : proto.out_nhs)
9999
{
100100
auto slot = GIslandModel::mkSlotNode(g, nh);
101101
g.link(ih, slot);

0 commit comments

Comments
 (0)