Skip to content

Commit

Permalink
(lint) fixing lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Sep 22, 2024
1 parent 78644d1 commit d38f00f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/max_flow/pgr_maximumcardinalitymatching.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ class PgrCardinalityGraph {
++vi) {
boost::tie(e, exists) =
boost::edge(*vi, mate_map[*vi], boost_graph);
if (((uint64_t)mate_map[*vi]
if ((static_cast<uint64_t>(mate_map[*vi])
!= boost::graph_traits<G>::null_vertex())
&& (*vi < (uint64_t)mate_map[*vi])) {
&& (*vi < static_cast<uint64_t>(mate_map[*vi]))) {
Only_int_rt matched_couple;
matched_couple.source = get_vertex_id(*vi);
matched_couple.target = get_vertex_id(mate_map[*vi]);
Expand Down
4 changes: 2 additions & 2 deletions src/cpp_common/get_check_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,10 @@ int64_t getBigInt(
throw std::string("Unexpected Null value in column ") + info.name;
switch (info.type) {
case INT2OID:
value = (int64_t) DatumGetInt16(binval);
value = static_cast<int64_t>(DatumGetInt16(binval));
break;
case INT4OID:
value = (int64_t) DatumGetInt32(binval);
value = static_cast<int64_t>(DatumGetInt32(binval));
break;
case INT8OID:
value = DatumGetInt64(binval);
Expand Down
8 changes: 4 additions & 4 deletions src/max_flow/pgr_maxflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void PgrFlowGraph::insert_edges_push_relabel(
boost::add_edge(v2, v1, graph);
E_to_id.insert(std::pair<E, int64_t>(e1, edge.id));
E_to_id.insert(std::pair<E, int64_t>(e1_rev, edge.id));
capacity[e1] = (int64_t) edge.cost;
capacity[e1] = static_cast<int64_t>(edge.cost);
capacity[e1_rev] = 0;
rev[e1] = e1_rev;
rev[e1_rev] = e1;
Expand All @@ -96,7 +96,7 @@ void PgrFlowGraph::insert_edges_push_relabel(
boost::add_edge(v1, v2, graph);
E_to_id.insert(std::pair<E, int64_t>(e2, edge.id));
E_to_id.insert(std::pair<E, int64_t>(e2_rev, edge.id));
capacity[e2] = (int64_t) edge.reverse_cost;
capacity[e2] = static_cast<int64_t>(edge.reverse_cost);
capacity[e2_rev] = 0;
rev[e2] = e2_rev;
rev[e2_rev] = e2;
Expand All @@ -119,9 +119,9 @@ void PgrFlowGraph::insert_edges(
boost::add_edge(v2, v1, graph);
E_to_id.insert(std::pair<E, int64_t>(e, edge.id));
E_to_id.insert(std::pair<E, int64_t>(e_rev, edge.id));
capacity[e] = edge.cost > 0 ? (int64_t) edge.cost : 0;
capacity[e] = edge.cost > 0 ? static_cast<int64_t>(edge.cost) : 0;
capacity[e_rev] = edge.reverse_cost > 0
? (int64_t) edge.reverse_cost : 0;
? static_cast<int64_t>(edge.reverse_cost) : 0;
rev[e] = e_rev;
rev[e_rev] = e;
}
Expand Down

0 comments on commit d38f00f

Please sign in to comment.