remove unused <<operator
This commit is contained in:
parent
6ae59b80af
commit
aaaf82f28c
4 changed files with 8 additions and 111 deletions
|
@ -26,10 +26,6 @@
|
|||
// boost
|
||||
#include <boost/operators.hpp>
|
||||
|
||||
// stl
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
namespace mapnik {
|
||||
template <typename T,int dim>
|
||||
struct coord {
|
||||
|
@ -185,39 +181,6 @@ private:
|
|||
using coord2d = coord<double,2>;
|
||||
using coord2i = coord<int,2>;
|
||||
|
||||
|
||||
template <typename charT,typename traits,typename T ,int dim>
|
||||
inline std::basic_ostream<charT,traits>&
|
||||
operator << (std::basic_ostream<charT,traits>& out,
|
||||
const coord<T,dim>& c);
|
||||
|
||||
template <typename charT,typename traits,typename T>
|
||||
inline std::basic_ostream<charT,traits>&
|
||||
operator << (std::basic_ostream<charT,traits>& out,
|
||||
const coord<T,2>& c)
|
||||
{
|
||||
std::basic_ostringstream<charT,traits> s;
|
||||
s.copyfmt(out);
|
||||
s.width(0);
|
||||
s << "coord2(" << std::setprecision(16)
|
||||
<< c.x << "," << c.y<< ")";
|
||||
out << s.str();
|
||||
return out;
|
||||
}
|
||||
|
||||
template <typename charT,typename traits,typename T>
|
||||
inline std::basic_ostream<charT,traits>&
|
||||
operator << (std::basic_ostream<charT,traits>& out,
|
||||
const coord<T,3>& c)
|
||||
{
|
||||
std::basic_ostringstream<charT,traits> s;
|
||||
s.copyfmt(out);
|
||||
s.width(0);
|
||||
s << "coord3(" << std::setprecision(16)
|
||||
<< c.x << "," << c.y<< "," << c.z<<")";
|
||||
out << s.str();
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // MAPNIK_COORD_HPP
|
||||
|
|
|
@ -27,9 +27,8 @@
|
|||
#include <mapnik/attribute_descriptor.hpp>
|
||||
|
||||
// stl
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -88,21 +87,6 @@ private:
|
|||
std::vector<attribute_descriptor> desc_ar_;
|
||||
};
|
||||
|
||||
template <typename charT,typename traits>
|
||||
inline std::basic_ostream<charT,traits>&
|
||||
operator << (std::basic_ostream<charT,traits>& out,
|
||||
layer_descriptor const& ld)
|
||||
{
|
||||
out << "name: " << ld.get_name() << "\n";
|
||||
out << "encoding: " << ld.get_encoding() << "\n";
|
||||
std::vector<attribute_descriptor> const& desc_ar = ld.get_descriptors();
|
||||
std::vector<attribute_descriptor>::const_iterator pos = desc_ar.begin();
|
||||
while (pos != desc_ar.end())
|
||||
{
|
||||
out << *pos++ << "\n";
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // MAPNIK_FEATURE_LAYER_DESC_HPP
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
#ifndef MAPNIK_PIXEL_POSITION_HPP
|
||||
#define MAPNIK_PIXEL_POSITION_HPP
|
||||
|
||||
// stl
|
||||
#include <iomanip>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
|
@ -33,8 +30,12 @@ struct pixel_position
|
|||
{
|
||||
double x;
|
||||
double y;
|
||||
pixel_position(double x_, double y_) : x(x_), y(y_) { }
|
||||
pixel_position() : x(0), y(0) { }
|
||||
pixel_position(double x_, double y_)
|
||||
: x(x_),
|
||||
y(y_) {}
|
||||
pixel_position()
|
||||
: x(0),
|
||||
y(0) {}
|
||||
pixel_position operator+ (pixel_position const& other) const
|
||||
{
|
||||
return pixel_position(x + other.x, y + other.y);
|
||||
|
@ -74,20 +75,6 @@ inline pixel_position operator* (double factor, pixel_position const& pos)
|
|||
return pixel_position(factor * pos.x, factor * pos.y);
|
||||
}
|
||||
|
||||
template <class charT, class traits>
|
||||
inline std::basic_ostream<charT,traits>&
|
||||
operator << (std::basic_ostream<charT,traits>& out,
|
||||
const pixel_position& e)
|
||||
{
|
||||
std::basic_ostringstream<charT,traits> s;
|
||||
s.copyfmt(out);
|
||||
s.width(0);
|
||||
s << '(' << std::fixed << std::setprecision(16)
|
||||
<< e.x << ", " << e.y << ')';
|
||||
out << s.str();
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#ifndef MAPNIK_VERTEX_HPP
|
||||
#define MAPNIK_VERTEX_HPP
|
||||
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
@ -103,43 +103,6 @@ private:
|
|||
using vertex2d = vertex<double,2>;
|
||||
using vertex2i = vertex<int,2>;
|
||||
|
||||
template <class charT,class traits,class T,int dim>
|
||||
inline std::basic_ostream<charT,traits>&
|
||||
operator << (std::basic_ostream<charT,traits>& out,
|
||||
const vertex<T,dim>& c);
|
||||
|
||||
template <class charT,class traits,class T>
|
||||
inline std::basic_ostream<charT,traits>&
|
||||
operator << (std::basic_ostream<charT,traits>& out,
|
||||
const vertex<T,2>& v)
|
||||
{
|
||||
std::basic_ostringstream<charT,traits> s;
|
||||
s.copyfmt(out);
|
||||
s.width(0);
|
||||
switch (v.cmd)
|
||||
{
|
||||
case SEG_END: s << "End "; break;
|
||||
case SEG_MOVETO: s << "MoveTo "; break;
|
||||
case SEG_LINETO: s << "LineTo "; break;
|
||||
case SEG_CLOSE: s << "Close "; break;
|
||||
}
|
||||
s << "(" << v.x << ", " << v.y << ")";
|
||||
return out << s.str();
|
||||
}
|
||||
|
||||
template <class charT,class traits,class T>
|
||||
inline std::basic_ostream<charT,traits>&
|
||||
operator << (std::basic_ostream<charT,traits>& out,
|
||||
const vertex<T,3>& v)
|
||||
{
|
||||
std::basic_ostringstream<charT,traits> s;
|
||||
s.copyfmt(out);
|
||||
s.width(0);
|
||||
s<<"vertex3("<<v.x<<","<<v.y<<","<<v.z<<",cmd="<<v.cmd<<")";
|
||||
out << s.str();
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // MAPNIK_VERTEX_HPP
|
||||
|
|
Loading…
Add table
Reference in a new issue