Skip to content

Commit 3d2e90a

Browse files
committed
Fixing some issues from rabbit
1 parent 36e75d6 commit 3d2e90a

7 files changed

Lines changed: 12 additions & 11 deletions

File tree

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ To see all issues & pull requests closed by this release see the
1919
* [#3055](https://github.com/pgRouting/pgrouting/issues/3055): bdDijkstra: use the shortest_path process and driver
2020
* [#3056](https://github.com/pgRouting/pgrouting/issues/3056): edwardMoore: use the shortest_path process and driver
2121
* [#3060](https://github.com/pgRouting/pgrouting/issues/3060): dagShortestPath: use the shortest_path process and driver
22-
* [#3064](https://github.com/pgRouting/pgrouting/issues/3064): Astar: create an use a process & driverAstar
22+
* [#3064](https://github.com/pgRouting/pgrouting/issues/3064): Astar: create and use a process and driver for Astar
2323

2424
## pgRouting 4.0
2525

doc/src/release_notes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ To see all issues & pull requests closed by this release see the
4444
* :issue:`3055`: bdDijkstra: use the shortest_path process and driver
4545
* :issue:`3056`: edwardMoore: use the shortest_path process and driver
4646
* :issue:`3060`: dagShortestPath: use the shortest_path process and driver
47-
* :issue:`3064`: Astar: create an use a process & driverAstar
47+
* :issue:`3064`: Astar: create and use a process and driver for Astar
4848

4949
pgRouting 4.0
5050
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

include/c_common/enums.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ enum Which {
3737
FLOYD = 31, JOHNSON,
3838
/** metrics **/
3939
BANDWIDTH,
40-
/* with edges that have x y*/
40+
/** with edges that have x y */
4141
ASTAR = 400, BDASTAR
4242
};
4343

src/astar/astar_driver.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ void do_astar(
104104
hint = combinations_sql;
105105
auto combinations = get_combinations(combinations_sql, starts, ends, normal, is_matrix);
106106
hint = "";
107-
log << "is matrix" << is_matrix;
108107

109108
if (combinations.empty() && !combinations_sql.empty()) {
110109
notice << "No (source, target) pairs found";

src/astar/astar_process.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ void pgr_process_astar(
9292
time_msg(name.c_str(), start_t, clock());
9393

9494
if (!err.str().empty() && (*result_tuples)) {
95-
if (*result_tuples) pfree(*result_tuples);
96-
(*result_tuples) = nullptr;
9795
(*result_count) = 0;
9896
}
9997

src/cpp_common/combinations.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,12 @@ get_combinations(
158158
using pgrouting::pgget::get_combinations;
159159
std::map<int64_t, std::set<int64_t>> result;
160160

161-
auto starts = startsArr? (normal? get_intSet(startsArr) : get_intSet(endsArr)) : std::set<int64_t>();
162-
auto ends = endsArr? (normal? get_intSet(endsArr) : get_intSet(startsArr)) : std::set<int64_t>();
161+
std::set<int64_t> starts;
162+
std::set<int64_t> end;
163+
if (startsArr && endsArr) {
164+
starts = normal? get_intSet(startsArr) : get_intSet(endsArr);
165+
ends = normal? get_intSet(endsArr) : get_intSet(startsArr);
166+
}
163167

164168
/* TODO Read query storing like std::map<int64_t , std::set<int64_t>> */
165169
/* queries are stored in vectors */

src/cpp_common/utilities.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ get_name(Which which, bool is_only_cost, bool is_near, bool is_matrix) {
7575
break;
7676
case BDDIJKSTRA :
7777
base = "pgr_bdDijkstra";
78-
suffix = std::string(is_only_cost? "Cost" : "") + (is_matrix? "Matrix" : "");
78+
suffix = std::string(is_only_cost? "Cost" : "") + (is_only_cost && is_matrix? "Matrix" : "");
7979
break;
8080
case EDWARDMOORE:
8181
base = "pgr_edwardMoore";
@@ -86,7 +86,7 @@ get_name(Which which, bool is_only_cost, bool is_near, bool is_matrix) {
8686
case OLD_WITHPOINTS:
8787
case WITHPOINTS:
8888
base = "pgr_withPoints";
89-
suffix = std::string(is_only_cost? "Cost" : "") + (is_matrix? "Matrix" : "");
89+
suffix = std::string(is_only_cost? "Cost" : "") + (is_only_cost && is_matrix? "Matrix" : "");
9090
break;
9191
default : base = "unknown";
9292
}
@@ -106,7 +106,7 @@ get_name(Which which, bool is_only_cost, bool is_matrix) {
106106
break;
107107
case BDASTAR :
108108
base = "pgr_bdAstar";
109-
suffix = std::string(is_only_cost? "Cost" : "") + (is_matrix? "Matrix" : "");
109+
suffix = std::string(is_only_cost? "Cost" : "") + (is_only_cost && is_matrix? "Matrix" : "");
110110
break;
111111
default : base = "unknown";
112112
}

0 commit comments

Comments
 (0)