Remove OSM link debug printing from public class
This commit is contained in:
committed by
Patrick Niklaus
parent
cac310123b
commit
83d7a57b73
@@ -4,7 +4,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "util/coordinate.hpp"
|
||||
#include "util/to_osm_link.hpp"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
{ \
|
||||
if (!static_cast<bool>(cond)) \
|
||||
{ \
|
||||
::osrm::util::FloatCoordinate c_(loc); \
|
||||
std::cerr << "[Location] " << c_.toOSMLink() << '\n'; \
|
||||
std::cerr << "[Location] " << ::osrm::util::toOSMLink(loc) << '\n'; \
|
||||
} \
|
||||
BOOST_ASSERT_MSG(cond, msg); \
|
||||
} while (0)
|
||||
|
||||
@@ -217,15 +217,6 @@ struct Coordinate
|
||||
friend bool operator==(const Coordinate lhs, const Coordinate rhs);
|
||||
friend bool operator!=(const Coordinate lhs, const Coordinate rhs);
|
||||
friend std::ostream &operator<<(std::ostream &out, const Coordinate coordinate);
|
||||
|
||||
std::string toOSMLink() const
|
||||
{
|
||||
std::stringstream link;
|
||||
link << "http://www.openstreetmap.org/?mlat=" << toFloating(lat)
|
||||
<< "&mlon=" << toFloating(lon) << "#map=19/" << toFloating(lat) << "/"
|
||||
<< toFloating(lon);
|
||||
return link.str();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -267,14 +258,6 @@ struct FloatCoordinate
|
||||
friend bool operator==(const FloatCoordinate lhs, const FloatCoordinate rhs);
|
||||
friend bool operator!=(const FloatCoordinate lhs, const FloatCoordinate rhs);
|
||||
friend std::ostream &operator<<(std::ostream &out, const FloatCoordinate coordinate);
|
||||
|
||||
std::string toOSMLink() const
|
||||
{
|
||||
std::stringstream link;
|
||||
link << "http://www.openstreetmap.org/?mlat=" << lat << "&mlon=" << lon << "#map=19/" << lat
|
||||
<< "/" << lon;
|
||||
return link.str();
|
||||
}
|
||||
};
|
||||
|
||||
bool operator==(const Coordinate lhs, const Coordinate rhs);
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef OSRM_UTIL_TO_OSM_LINK_HPP
|
||||
#define OSRM_UTIL_TO_OSM_LINK_HPP
|
||||
|
||||
#include "util/coordinate.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
inline std::string toOSMLink(const util::FloatCoordinate &c)
|
||||
{
|
||||
std::stringstream link;
|
||||
link << "http://www.openstreetmap.org/?mlat=" << c.lat << "&mlon=" << c.lon << "#map=19/"
|
||||
<< c.lat << "/" << c.lon;
|
||||
return link.str();
|
||||
}
|
||||
|
||||
inline std::string toOSMLink(const util::Coordinate &c)
|
||||
{
|
||||
std::stringstream link;
|
||||
link << "http://www.openstreetmap.org/?mlat=" << toFloating(c.lat)
|
||||
<< "&mlon=" << toFloating(c.lon) << "#map=19/" << toFloating(c.lat) << "/"
|
||||
<< toFloating(c.lon);
|
||||
return link.str();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user