Skip to content

Commit

Permalink
Removing linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhinJ committed Jul 23, 2023
1 parent 35fd523 commit deb0d96
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion include/drivers/yen/withPoints_ksp_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extern "C" {

Path_rt**, size_t*,
char**, char**, char**);

/*TODO remove on v4*/
int do_pgr_withPointsKsp(
Edge_t *edges, size_t total_edges,
Expand Down
5 changes: 3 additions & 2 deletions include/yen/pgr_ksp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include <algorithm>
#include <set>
#include <limits>
#include <map>

#include "dijkstra/dijkstra.hpp"
#include "cpp_common/pgr_assert.h"
Expand Down Expand Up @@ -246,7 +247,7 @@ namespace algorithms {
G &graph,
const std::map<int64_t, std::set<int64_t>> &combinations,
size_t k,
bool heap_paths){
bool heap_paths) {
std::deque<Path> paths;
pgrouting::yen::Pgr_ksp<G> fn_yen;

Expand All @@ -267,7 +268,7 @@ namespace algorithms {
return paths;
}

} // namespace algorithms
} // namespace algorithms

} // namespace pgrouting

Expand Down
10 changes: 5 additions & 5 deletions src/ksp/withPoints_ksp.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ processv4(
size_t k = (size_t)p_k;

driving_side[0] = (char) tolower(driving_side[0]);
if(!((driving_side[0] == 'r')
|| (driving_side[0] == 'l') || (driving_side[0] == 'b'))){
if (!((driving_side[0] == 'r')
|| (driving_side[0] == 'l') || (driving_side[0] == 'b'))) {
elog(ERROR, "Driving side is not selected or Invalid Values");
return;
}
Expand Down Expand Up @@ -207,7 +207,7 @@ PGDLLEXPORT Datum _pgr_v4withpointsksp(PG_FUNCTION_ARGS) {
funcctx = SRF_FIRSTCALL_INIT();
oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);

if(PG_NARGS() == 9){
if (PG_NARGS() == 9) {
processv4(
text_to_cstring(PG_GETARG_TEXT_P(0)),
text_to_cstring(PG_GETARG_TEXT_P(1)),
Expand All @@ -221,7 +221,7 @@ PGDLLEXPORT Datum _pgr_v4withpointsksp(PG_FUNCTION_ARGS) {
PG_GETARG_BOOL(8),
&result_tuples,
&result_count);
} else/* (PG_NARGS() == 8) */{
} else /* (PG_NARGS() == 8) */ {
processv4(
text_to_cstring(PG_GETARG_TEXT_P(0)),
text_to_cstring(PG_GETARG_TEXT_P(1)),
Expand Down Expand Up @@ -516,4 +516,4 @@ PGDLLEXPORT Datum _pgr_withpointsksp(PG_FUNCTION_ARGS) {
} else {
SRF_RETURN_DONE(funcctx);
}
}
}
2 changes: 1 addition & 1 deletion src/ksp/withPoints_ksp_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,4 +348,4 @@ do_pgr_withPointsKsp(
*log_msg = pgr_msg(log.str().c_str());
}
return 1000;
}
}

0 comments on commit deb0d96

Please sign in to comment.