Skip to content

Commit 4eb2a64

Browse files
authored
Merge pull request #1385 from vissarion/fix/examples
fix: Compilation errors and warnings in examples
2 parents f78efdf + 0c3228e commit 4eb2a64

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

example/07_a_graph_route_example.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
#include <iomanip>
1818
#include <limits>
1919

20-
#include <boost/tuple/tuple.hpp>
20+
#include <boost/algorithm/string/trim.hpp>
2121
#include <boost/foreach.hpp>
22-
2322
#include <boost/graph/adjacency_list.hpp>
2423
#include <boost/graph/dijkstra_shortest_paths.hpp>
24+
#include <boost/tuple/tuple.hpp>
2525

2626
#include <boost/geometry/geometry.hpp>
2727
#include <boost/geometry/geometries/linestring.hpp>
@@ -46,7 +46,6 @@ void read_wkt(std::string const& filename, std::vector<Tuple>& tuples, Box& box)
4646
{
4747
std::string line;
4848
std::getline(cpp_file, line);
49-
Geometry geometry;
5049
boost::trim(line);
5150
if (! line.empty() && ! boost::starts_with(line, "#"))
5251
{

example/07_b_graph_route_example.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
#include <iomanip>
2222
#include <limits>
2323

24-
#include <boost/tuple/tuple.hpp>
24+
#include <boost/algorithm/string/trim.hpp>
2525
#include <boost/foreach.hpp>
26-
2726
#include <boost/graph/adjacency_list.hpp>
2827
#include <boost/graph/dijkstra_shortest_paths.hpp>
28+
#include <boost/tuple/tuple.hpp>
2929

3030
#include <boost/geometry/geometry.hpp>
3131
#include <boost/geometry/geometries/linestring.hpp>
@@ -51,7 +51,6 @@ void read_wkt(std::string const& filename, std::vector<Tuple>& tuples, Box& box)
5151
{
5252
std::string line;
5353
std::getline(cpp_file, line);
54-
Geometry geometry;
5554
boost::trim(line);
5655
if (! line.empty() && ! boost::starts_with(line, "#"))
5756
{

example/c04_a_custom_triangle_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ BOOST_GEOMETRY_REGISTER_RING(triangle)
4141
namespace boost { namespace geometry {
4242

4343
template<>
44-
inline double area<triangle>(const triangle& t)
44+
inline auto area<triangle>(const triangle& t)
4545
{
4646
/* C
4747
/ \

0 commit comments

Comments
 (0)