Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Checks: >
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-slicing

Expand Down
2 changes: 1 addition & 1 deletion include/c_common/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef INCLUDE_C_COMMON_ENUMS_H_
#define INCLUDE_C_COMMON_ENUMS_H_

enum Which {
enum Which { // NOLINT(cppcoreguidelines-use-enum-class)
/** undirected graph + results: vertex id */
SLOAN = 0, CUTCHILL, KING,
/** directed graph + results: vertex id */
Expand Down
4 changes: 2 additions & 2 deletions include/c_types/ii_t_rt.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#endif

struct II_t_rt {
union {int64_t id; int64_t source; int64_t start_vid;} d1;
union {int64_t value; int64_t target; int64_t end_vid;} d2;
int64_t d1;
int64_t d2;
};


Expand Down
2 changes: 1 addition & 1 deletion include/coloring/bipartite_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Pgr_Bipartite : public pgrouting::Pgr_messages {
int64_t vid = graph[*v].id;
boost::get(partition_map, *v) ==
boost::color_traits <boost::default_color_type>::white() ?
results.push_back({{vid}, {0}}) : results.push_back({{vid}, {1}});
results.push_back({vid, 0}) : results.push_back({vid, 1});
}
return results;
}
Expand Down
4 changes: 2 additions & 2 deletions include/coloring/sequentialVertexColoring.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ class Pgr_sequentialVertexColoring {
for (boost::tie(v, vend) = vertices(graph.graph); v != vend; ++v) {
int64_t node = graph[*v].id;
auto color = colors[*v];
results.push_back({{node}, {static_cast<int64_t>(color + 1)}});
results.push_back({node, static_cast<int64_t>(color + 1)});
}

// ordering the results in an increasing order of the node id
std::sort(results.begin(), results.end(),
[](const II_t_rt row1, const II_t_rt row2) {
return row1.d1.id < row2.d1.id;
return row1.d1 < row2.d1;
});

return results;
Expand Down
2 changes: 1 addition & 1 deletion include/components/makeConnected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Pgr_makeConnected : public pgrouting::Pgr_messages {
int64_t tgt = graph[graph.target(*ei)].id;
log<< "src:" << src<< "tgt:" << tgt <<"\n";
if (newEdge >= edgeCount) {
results[i] = {{src}, {tgt}};
results[i] = {src, tgt};
i++;
}
newEdge++;
Expand Down
2 changes: 1 addition & 1 deletion include/cpp_common/info_t.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

namespace pgrouting {

enum expectType {
enum class expectType {
ANY_INTEGER,
ANY_NUMERICAL,
TEXT,
Expand Down
2 changes: 1 addition & 1 deletion include/trsp/trspHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class TrspHandler : public pgrouting::Pgr_messages {
*
* The "legal" values are indices to vectors
*/
enum Position {ILLEGAL = -1, RC_EDGE = 0, C_EDGE = 1};
enum Position {ILLEGAL = -1, RC_EDGE = 0, C_EDGE = 1}; // NOLINT(cppcoreguidelines-use-enum-class)


class Predecessor {
Expand Down
2 changes: 1 addition & 1 deletion include/vrp/initials_code.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace pgrouting {
namespace vrp {

/*! Different kinds to insert an order into the vehicle */
enum Initials_code {
enum Initials_code { // NOLINT(cppcoreguidelines-use-enum-class)
OneTruck, /*! All orders in one truck */
OnePerTruck, /*! One Order per truck */
FrontTruck, /*! Insertion, at the front of the truck */
Expand Down
2 changes: 1 addition & 1 deletion include/vrp/tw_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace vrp {
*/
class Tw_node : public Dnode {
public:
typedef enum {
typedef enum { // NOLINT(cppcoreguidelines-use-enum-class)
kStart = 0, ///< starting site
kPickup, ///< pickup site
kDelivery, ///< delivery site
Expand Down
4 changes: 2 additions & 2 deletions src/coloring/bipartite.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ _pgr_bipartite(PG_FUNCTION_ARGS) {
for (i = 0; i < numb; ++i) {
nulls[i] = false;
}
values[0] = Int64GetDatum(result_tuples[call_cntr].d1.id);
values[1] = Int64GetDatum(result_tuples[call_cntr].d2.value);
values[0] = Int64GetDatum(result_tuples[call_cntr].d1);
values[1] = Int64GetDatum(result_tuples[call_cntr].d2);
tuple = heap_form_tuple(tuple_desc, values, nulls);
result = HeapTupleGetDatum(tuple);
SRF_RETURN_NEXT(funcctx, result);
Expand Down
4 changes: 2 additions & 2 deletions src/coloring/edgeColoring.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ PGDLLEXPORT Datum _pgr_edgecoloring(PG_FUNCTION_ARGS) {
nulls[i] = false;
}

values[0] = Int64GetDatum(result_tuples[funcctx->call_cntr].d1.id);
values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].d2.value);
values[0] = Int64GetDatum(result_tuples[funcctx->call_cntr].d1);
values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].d2);

tuple = heap_form_tuple(tuple_desc, values, nulls);
result = HeapTupleGetDatum(tuple);
Expand Down
2 changes: 1 addition & 1 deletion src/coloring/edgeColoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Pgr_edgeColoring::edgeColoring() {
for (auto e_i : boost::make_iterator_range(boost::edges(graph))) {
auto edge = get_edge_id(e_i);
int64_t color = graph[e_i];
results.push_back({{edge}, {(color + 1)}});
results.push_back({edge, (color + 1)});
}
return results;
}
Expand Down
4 changes: 2 additions & 2 deletions src/coloring/sequentialVertexColoring.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ PGDLLEXPORT Datum _pgr_sequentialvertexcoloring(PG_FUNCTION_ARGS) {
nulls[i] = false;
}

values[0] = Int64GetDatum(result_tuples[funcctx->call_cntr].d1.id);
values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].d2.value);
values[0] = Int64GetDatum(result_tuples[funcctx->call_cntr].d1);
values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].d2);

tuple = heap_form_tuple(tuple_desc, values, nulls);
result = HeapTupleGetDatum(tuple);
Expand Down
4 changes: 2 additions & 2 deletions src/components/biconnectedComponents.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ PGDLLEXPORT Datum _pgr_biconnectedcomponents(PG_FUNCTION_ARGS) {
}

values[0] = Int64GetDatum((int64_t)funcctx->call_cntr + 1);
values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].d2.value);
values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].d1.id);
values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].d2);
values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].d1);

tuple = heap_form_tuple(tuple_desc, values, nulls);
result = HeapTupleGetDatum(tuple);
Expand Down
Loading