Skip to content

Commit 415aab9

Browse files
author
NeiroYT
committed
Tidy
1 parent 4a16be0 commit 415aab9

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/graph_transformations/graph_transformations.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ bool run_search(const Graph& graph, const Graph& subgraph,
4343
size_t cur_size = assignments.size();
4444
for (int prev_id = 0; prev_id < static_cast<int>(cur_size); prev_id++) {
4545
size_t amount_connected_s = subgraph.getOutputsSize(prev_id);
46-
for (int j = 0; j < amount_connected_s; j++) {
46+
for (size_t j = 0; j < amount_connected_s; j++) {
4747
int next_id = subgraph.getOutLayers(prev_id)[j];
4848
if (next_id < static_cast<int>(cur_size)) {
4949
if (!has_edge(graph, assignments[prev_id], assignments[next_id])) {
@@ -180,7 +180,7 @@ void changed_subgraphs(const Graph& graph, const Graph& subgraph_from,
180180
if (amount_connected == amount_connected_s) {
181181
continue;
182182
}
183-
for (int k = 0; k < amount_connected; k++) {
183+
for (size_t k = 0; k < amount_connected; k++) {
184184
int id = new_graph.getOutLayers(subs[i][roots[j]])[k];
185185
auto it = std::find(subs[i].begin(), subs[i].end(), id);
186186
if (it == subs[i].end()) {
@@ -190,7 +190,7 @@ void changed_subgraphs(const Graph& graph, const Graph& subgraph_from,
190190
}
191191
for (int leaf : leafs) {
192192
amount_connected = new_graph.getOutputsSize(subs[i][leaf]);
193-
for (int k = 0; k < amount_connected; k++) {
193+
for (size_t k = 0; k < amount_connected; k++) {
194194
int id = new_graph.getOutLayers(subs[i][leaf])[k];
195195
auto it =
196196
std::find(leafs_outs_final.begin(), leafs_outs_final.end(), id);
@@ -301,7 +301,7 @@ void changed_subgraphs(const Graph& graph, const Graph& subgraph_from,
301301
if (amount_connected == amount_connected_s) {
302302
continue;
303303
}
304-
for (int k = 0; k < amount_connected; k++) {
304+
for (size_t k = 0; k < amount_connected; k++) {
305305
int id = new_graph.getOutLayers(subs[i][roots[j]])[k];
306306
auto it = std::find(subs[i].begin(), subs[i].end(), id);
307307
if (it == subs[i].end()) {
@@ -311,7 +311,7 @@ void changed_subgraphs(const Graph& graph, const Graph& subgraph_from,
311311
}
312312
for (size_t j = 0; j < leafs.size(); j++) {
313313
amount_connected = new_graph.getOutputsSize(subs[i][leafs[j]]);
314-
for (int k = 0; k < amount_connected; k++) {
314+
for (size_t k = 0; k < amount_connected; k++) {
315315
int id = new_graph.getOutLayers(subs[i][leafs[j]])[k];
316316
leafs_outs_final[j].push_back(id);
317317
}
@@ -357,19 +357,19 @@ void changed_subgraphs(const Graph& graph, const Graph& subgraph_from,
357357
}
358358
for (int j = 0; j < subgraph_to.getLayersCount(); j++) {
359359
std::vector<int> cur_outs = subgraph_to.getOutLayers(j);
360-
for (int k = 0; k < cur_outs.size(); k++) {
360+
for (size_t k = 0; k < cur_outs.size(); k++) {
361361
new_graph.makeConnection(layers[j], layers[cur_outs[k]]);
362362
}
363363
}
364-
for (int j = 0; j < roots_inps_final.size(); j++) {
365-
for (int k = 0; k < roots_inps_final[j].size(); k++) {
364+
for (size_t j = 0; j < roots_inps_final.size(); j++) {
365+
for (size_t k = 0; k < roots_inps_final[j].size(); k++) {
366366
new_graph.makeConnection(
367367
new_graph.getLayerFromID(roots_inps_final[j][k]),
368368
new_graph.getLayerFromID(roots2[order.in_order[j]]));
369369
}
370370
}
371-
for (int j = 0; j < leafs_outs_final.size(); j++) {
372-
for (int k = 0; k < leafs_outs_final[j].size(); k++) {
371+
for (size_t j = 0; j < leafs_outs_final.size(); j++) {
372+
for (size_t k = 0; k < leafs_outs_final[j].size(); k++) {
373373
new_graph.makeConnection(
374374
new_graph.getLayerFromID(leafs2[order.out_order[j]]),
375375
new_graph.getLayerFromID(leafs_outs_final[j][k]));

0 commit comments

Comments
 (0)