Skip to content

Commit 764b3d5

Browse files
authored
Fix compilation with clang (#93)
Fix compilation with clang for the following packages: - global_planner_tests - nav_grid_iterators
1 parent d0ebe15 commit 764b3d5

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

global_planner_tests/src/heatmap_node.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ int main(int argc, char** argv)
117117
failures[i] += 1;
118118
failures[j] += 1;
119119
}
120-
if (!ros::ok()) return false;
120+
if (!ros::ok()) return EXIT_FAILURE;
121121
}
122122
}
123123

@@ -152,5 +152,5 @@ int main(int argc, char** argv)
152152
}
153153

154154
ROS_INFO("%d/%d valid plans found.", passing_plans, total_plans);
155-
return 0;
155+
return EXIT_SUCCESS;
156156
}

global_planner_tests/src/many_map_test_suite.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ bool many_map_test_suite(nav_core2::GlobalPlanner& planner, TFListenerPtr tf,
7373
bool passes_all = true;
7474

7575
// Check all the Full Coverage Maps
76-
for (const std::string base_filename : config["full_coverage_maps"].as<std::vector<std::string> >())
76+
for (const auto& base_filename : config["full_coverage_maps"].as<std::vector<std::string> >())
7777
{
7878
std::string map_filename = prefix + base_filename;
7979
ROS_INFO("Testing full coverage map \"%s\"", map_filename.c_str());
@@ -86,7 +86,7 @@ bool many_map_test_suite(nav_core2::GlobalPlanner& planner, TFListenerPtr tf,
8686
}
8787

8888
// Check all the No Coverage Maps
89-
for (const std::string base_filename : config["no_coverage_maps"].as<std::vector<std::string> >())
89+
for (const auto& base_filename : config["no_coverage_maps"].as<std::vector<std::string> >())
9090
{
9191
std::string map_filename = prefix + base_filename;
9292
ROS_INFO("Testing no coverage map \"%s\"", map_filename.c_str());

nav_grid_iterators/include/nav_grid_iterators/line/abstract_line_iterator.h

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ class AbstractLineIterator
5353
*/
5454
AbstractLineIterator() {}
5555

56+
/**
57+
* @brief Public Destructor
58+
*/
59+
virtual ~AbstractLineIterator() = default;
60+
5661
/**
5762
* @brief Dereference the iterator
5863
* @return the index to which the iterator is pointing.

0 commit comments

Comments
 (0)