Skip to content

Commit

Permalink
remove dead code from polyline formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Nov 17, 2014
1 parent 6f155f1 commit bc04015
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
23 changes: 0 additions & 23 deletions Algorithms/polyline_formatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <osrm/Coordinate.h>

JSON::String
PolylineFormatter::printEncodedString(const std::vector<SegmentInformation> &polyline) const
{
return JSON::String(PolylineCompressor().get_encoded_string(polyline));
}

JSON::Array
PolylineFormatter::printUnencodedString(const std::vector<SegmentInformation> &polyline) const
{
JSON::Array json_geometry_array;
for (const auto &segment : polyline)
{
if (segment.necessary)
{
JSON::Array json_coordinate;
json_coordinate.values.push_back(segment.location.lat / COORDINATE_PRECISION);
json_coordinate.values.push_back(segment.location.lon / COORDINATE_PRECISION);
json_geometry_array.values.push_back(json_coordinate);
}
}
return json_geometry_array;
}

std::string PolylineFormatter::printEncodedStr(const std::vector<SegmentInformation> &polyline) const
{
return PolylineCompressor().get_encoded_string(polyline);
Expand Down
6 changes: 0 additions & 6 deletions Algorithms/polyline_formatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

struct SegmentInformation;

#include "../DataStructures/JSONContainer.h"

#include <string>
#include <vector>

Expand All @@ -46,10 +44,6 @@ struct PolylineFormatter
std::string printEncodedStr(const std::vector<SegmentInformation> &polyline) const;

std::vector<std::string> printUnencodedStr(const std::vector<SegmentInformation> &polyline) const;

JSON::String printEncodedString(const std::vector<SegmentInformation> &polyline) const;

JSON::Array printUnencodedString(const std::vector<SegmentInformation> &polyline) const;
};

#endif /* POLYLINE_FORMATTER_H_ */

0 comments on commit bc04015

Please sign in to comment.