diff --git a/include/mapnik/hextree.hpp b/include/mapnik/hextree.hpp index c3780a9da..6c88a50ba 100644 --- a/include/mapnik/hextree.hpp +++ b/include/mapnik/hextree.hpp @@ -30,6 +30,7 @@ // boost #include #include +#include // stl #include @@ -256,7 +257,7 @@ public: // find closest match based on mean of r,g,b,a std::vector::const_iterator pit = - std::lower_bound(sorted_pal_.begin(), sorted_pal_.end(), c, rgba::mean_sort_cmp()); + boost::lower_bound(sorted_pal_, c, rgba::mean_sort_cmp()); ind = pit-sorted_pal_.begin(); if (ind == sorted_pal_.size()) ind--; @@ -331,8 +332,8 @@ public: root_ = new node(); // sort palette for binary searching in quantization - std::sort(sorted_pal_.begin(), sorted_pal_.end(), rgba::mean_sort_cmp()); - + boost::sort(sorted_pal_, rgba::mean_sort_cmp()); + // returned palette is rearanged, so that colors with a<255 are at the begining pal_remap_.resize(sorted_pal_.size()); palette.clear();