remove static std::map<marker_placement_e, boost::function<markers_placement(Locator &locator,Detector &detector,markers_placement_params const& params)>
^ it was hurting compile times badly
This commit is contained in:
parent
6b1a2621b5
commit
1d5f1f12f0
1 changed files with 15 additions and 14 deletions
|
@ -30,8 +30,6 @@
|
||||||
#include <mapnik/markers_placements/vertext_last.hpp>
|
#include <mapnik/markers_placements/vertext_last.hpp>
|
||||||
#include <mapnik/symbolizer_enumerations.hpp>
|
#include <mapnik/symbolizer_enumerations.hpp>
|
||||||
#include <mapnik/util/variant.hpp>
|
#include <mapnik/util/variant.hpp>
|
||||||
#include <boost/functional/value_factory.hpp>
|
|
||||||
#include <boost/function.hpp>
|
|
||||||
|
|
||||||
namespace mapnik
|
namespace mapnik
|
||||||
{
|
{
|
||||||
|
@ -86,18 +84,21 @@ private:
|
||||||
Detector &detector,
|
Detector &detector,
|
||||||
markers_placement_params const& params)
|
markers_placement_params const& params)
|
||||||
{
|
{
|
||||||
static const std::map<marker_placement_e, boost::function<markers_placement(
|
switch (placement_type)
|
||||||
Locator &locator,
|
{
|
||||||
Detector &detector,
|
case MARKER_POINT_PLACEMENT:
|
||||||
markers_placement_params const& params)>> factories =
|
return markers_point_placement<Locator, Detector>(locator,detector,params);
|
||||||
{
|
case MARKER_INTERIOR_PLACEMENT:
|
||||||
{ MARKER_POINT_PLACEMENT, boost::value_factory<markers_point_placement<Locator, Detector>>() },
|
return markers_interior_placement<Locator, Detector>(locator,detector,params);
|
||||||
{ MARKER_INTERIOR_PLACEMENT, boost::value_factory<markers_interior_placement<Locator, Detector>>() },
|
case MARKER_LINE_PLACEMENT:
|
||||||
{ MARKER_LINE_PLACEMENT, boost::value_factory<markers_line_placement<Locator, Detector>>() },
|
return markers_line_placement<Locator, Detector>(locator,detector,params);
|
||||||
{ MARKER_VERTEX_FIRST_PLACEMENT, boost::value_factory<markers_vertex_first_placement<Locator, Detector>>() },
|
case MARKER_VERTEX_FIRST_PLACEMENT:
|
||||||
{ MARKER_VERTEX_LAST_PLACEMENT, boost::value_factory<markers_vertex_last_placement<Locator, Detector>>() }
|
return markers_vertex_first_placement<Locator, Detector>(locator,detector,params);
|
||||||
};
|
case MARKER_VERTEX_LAST_PLACEMENT:
|
||||||
return factories.at(placement_type)(locator, detector, params);
|
return markers_vertex_last_placement<Locator, Detector>(locator,detector,params);
|
||||||
|
default: // point
|
||||||
|
return markers_point_placement<Locator, Detector>(locator,detector,params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
markers_placement placement_;
|
markers_placement placement_;
|
||||||
|
|
Loading…
Reference in a new issue