Skip to content

Commit a9f6380

Browse files
committed
Noetic compatibility
1 parent 63d4096 commit a9f6380

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/common.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ bool a_star_to_open_space(std::vector<std::vector<bool> > const &grid, gridNode_
137137
{
138138
Point_t p2 =
139139
{
140-
nn.back().pos.x + dx,
141-
nn.back().pos.y + dy,
140+
static_cast<int>(nn.back().pos.x + dx),
141+
static_cast<int>(nn.back().pos.y + dy),
142142
};
143143

144144
#ifdef DEBUG_PLOT
@@ -161,9 +161,9 @@ bool a_star_to_open_space(std::vector<std::vector<bool> > const &grid, gridNode_
161161
Point_t new_point = { p2.x, p2.y };
162162
gridNode_t new_node =
163163
{
164-
new_point, // Point: x,y
165-
cost + nn.back().cost, // Cost
166-
cost + nn.back().cost + distanceToClosestPoint(p2, open_space) + i,
164+
new_point, // Point: x,y
165+
static_cast<int>(cost + nn.back().cost), // Cost
166+
static_cast<int>(cost + nn.back().cost + distanceToClosestPoint(p2, open_space) + i),
167167
// Heuristic (+i so CCW turns are cheaper)
168168
};
169169
newPath.push_back(new_node);

0 commit comments

Comments
 (0)