Skip to content

Commit

Permalink
+ make rewind() const
Browse files Browse the repository at this point in the history
  • Loading branch information
artemp committed Oct 1, 2012
1 parent 30f14e0 commit f03e08b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions include/mapnik/simplify_converter.hpp
Expand Up @@ -101,10 +101,11 @@ struct MAPNIK_DECL simplify_converter
{
public:
simplify_converter(Geometry& geom)
: geom_(geom)
, tolerance_(0.0)
, status_(initial)
, algorithm_(radial_distance)
: geom_(geom),
tolerance_(0.0),
status_(initial),
algorithm_(radial_distance),
pos_(0)
{}

enum status
Expand All @@ -121,8 +122,10 @@ struct MAPNIK_DECL simplify_converter
return algorithm_;
}

void set_simplify_algorithm(simplify_algorithm_e value) {
if (algorithm_ != value) {
void set_simplify_algorithm(simplify_algorithm_e value)
{
if (algorithm_ != value)
{
algorithm_ = value;
reset();
}
Expand All @@ -149,7 +152,7 @@ struct MAPNIK_DECL simplify_converter
pos_ = 0;
}

void rewind(unsigned int)
void rewind(unsigned int) const
{
pos_ = 0;
}
Expand Down Expand Up @@ -437,10 +440,10 @@ struct MAPNIK_DECL simplify_converter
double tolerance_;
status status_;
simplify_algorithm_e algorithm_;
size_t pos_;
std::deque<vertex2d> vertices_;
std::deque<vertex2d> sleeve_cont_;
vertex2d previous_vertex_;
mutable size_t pos_;
};


Expand Down

0 comments on commit f03e08b

Please sign in to comment.