Skip to content

Commit

Permalink
(tidy) Fixing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvergara committed Oct 21, 2024
1 parent f8eaa95 commit 73a2abb
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion include/breadthFirstSearch/breadthFirstSearch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include <vector>
#include <set>

#include <visitors/edges_order_bfs_visitor.hpp>
#include <boost/config.hpp>
#include <boost/graph/breadth_first_search.hpp>

#include "cpp_common/base_graph.hpp"
#include "cpp_common/interruption.hpp"
#include "c_types/mst_rt.h"
#include "visitors/edges_order_bfs_visitor.hpp"

//******************************************

Expand Down
2 changes: 1 addition & 1 deletion include/lineGraph/lineGraphFull.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Pgr_lineGraphFull : public Pgr_base_graph<G, T_V, T_E, t_directed> {
typedef typename boost::graph_traits < G >::in_edge_iterator EI_i;


explicit Pgr_lineGraphFull< G, T_V, T_E, t_directed>(bool directed)
explicit Pgr_lineGraphFull< G, T_V, T_E, t_directed>()
: Pgr_base_graph<G, T_V, T_E, t_directed>(),
m_num_edges(0) {
}
Expand Down
2 changes: 2 additions & 0 deletions src/breadthFirstSearch/breadthFirstSearch_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ pgr_do_breadthFirstSearch(
char *hint = nullptr;

try {
// NOLINTBEGIN(clang-analyzer-cplusplus.NewDelete)
pgassert(!(*log_msg));
pgassert(!(*notice_msg));
pgassert(!(*err_msg));
pgassert(!(*return_tuples));
pgassert(*return_count == 0);
// NOLINTEND(clang-analyzer-cplusplus.NewDelete)



Expand Down
2 changes: 2 additions & 0 deletions src/coloring/bipartite_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ pgr_do_bipartite(


try {
// NOLINTBEGIN(clang-analyzer-cplusplus.NewDelete)
pgassert(!(*log_msg));
pgassert(!(*notice_msg));
pgassert(!(*err_msg));
pgassert(!(*return_tuples));
pgassert(*return_count == 0);
// NOLINTEND(clang-analyzer-cplusplus.NewDelete)

hint = edges_sql;
auto edges = pgrouting::pgget::get_edges(std::string(edges_sql), true, false);
Expand Down
2 changes: 2 additions & 0 deletions src/coloring/edgeColoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ Pgr_edgeColoring::Pgr_edgeColoring(const std::vector<Edge_t> &edges) {
auto v1 = get_boost_vertex(edge.source);
auto v2 = get_boost_vertex(edge.target);
auto e_exists = boost::edge(v1, v2, graph);
// NOLINTNEXTLINE
if (e_exists.second) continue;

if (edge.source == edge.target) continue;

if (edge.cost < 0 && edge.reverse_cost < 0) continue;

E e;
// NOLINTNEXTLINE
boost::tie(e, added) = boost::add_edge(v1, v2, graph);

E_to_id.insert(std::make_pair(e, edge.id));
Expand Down
1 change: 1 addition & 0 deletions src/components/components.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ biconnectedComponents(
boost::associative_property_map<Edge_map> bimap(bicmp_map);
size_t num_comps;
try {
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDelete)
num_comps = biconnected_components(graph.graph, bimap);
} catch (...) {
throw;
Expand Down
2 changes: 1 addition & 1 deletion src/driving_distance/driving_distance_withPoints.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ process(
}
} else {
/* TODO remove on v4 */
char d_side = (char)tolower(driving_side[0]);
d_side = (char)tolower(driving_side[0]);
if (!((d_side == 'r') || (d_side == 'l'))) d_side = 'b';
}

Expand Down
2 changes: 1 addition & 1 deletion src/pickDeliver/optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Optimize::swap_worse(Vehicle_pickDeliver &to, Vehicle_pickDeliver &from) {
}
}

return false && swapped;
return swapped;
}


Expand Down
2 changes: 2 additions & 0 deletions src/spanningTree/kruskal_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ pgr_do_kruskal(
char *hint = nullptr;

try {
// NOLINTBEGIN(clang-analyzer-cplusplus.NewDelete)
pgassert(!(*log_msg));
pgassert(!(*notice_msg));
pgassert(!(*err_msg));
pgassert(!(*return_tuples));
pgassert(*return_count == 0);
// NOLINTEND(clang-analyzer-cplusplus.NewDelete)

auto roots = get_intArray(starts, false);

Expand Down
2 changes: 2 additions & 0 deletions src/spanningTree/prim_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ pgr_do_prim(
char *hint = nullptr;

try {
// NOLINTBEGIN(clang-analyzer-cplusplus.NewDelete)
pgassert(!(*log_msg));
pgassert(!(*notice_msg));
pgassert(!(*err_msg));
pgassert(!(*return_tuples));
pgassert(*return_count == 0);
// NOLINTEND(clang-analyzer-cplusplus.NewDelete)

auto roots = get_intArray(starts, false);

Expand Down

0 comments on commit 73a2abb

Please sign in to comment.