From a645eb9a210f6d56c2d50df0f0739b5cdbb92cee Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 21 Feb 2013 12:50:53 -0800 Subject: [PATCH] Revert "+ use boost::move to emulate 'move' semantics" This reverts commit fe9ff21ba9da6dabef4747f139eaf97b715aae82. --- .../mapnik/feature_style_processor_impl.hpp | 10 ++++----- include/mapnik/rule_cache.hpp | 21 ++----------------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/include/mapnik/feature_style_processor_impl.hpp b/include/mapnik/feature_style_processor_impl.hpp index 50be9a91b..4395efa2d 100644 --- a/include/mapnik/feature_style_processor_impl.hpp +++ b/include/mapnik/feature_style_processor_impl.hpp @@ -51,7 +51,6 @@ #include #include #include -#include // stl #include @@ -372,7 +371,8 @@ void feature_style_processor::apply_to_layer(layer const& lay, Proces attribute_collector collector(names); double filt_factor = 1.0; directive_collector d_collector(filt_factor); - boost::container::vector rule_caches; + boost::ptr_vector rule_caches; + // iterate through all named styles collecting active styles and attribute names BOOST_FOREACH(std::string const& style_name, style_names) { @@ -388,12 +388,12 @@ void feature_style_processor::apply_to_layer(layer const& lay, Proces std::vector const& rules = style->get_rules(); bool active_rules = false; - rule_cache rc; + std::auto_ptr rc(new rule_cache); BOOST_FOREACH(rule const& r, rules) { if (r.active(scale_denom)) { - rc.add_rule(r); + rc->add_rule(r); active_rules = true; if (ds->type() == datasource::Vector) { @@ -404,7 +404,7 @@ void feature_style_processor::apply_to_layer(layer const& lay, Proces } if (active_rules) { - rule_caches.push_back(boost::move(rc)); + rule_caches.push_back(rc); active_styles.push_back(&(*style)); } } diff --git a/include/mapnik/rule_cache.hpp b/include/mapnik/rule_cache.hpp index 3a098925c..4a805b990 100644 --- a/include/mapnik/rule_cache.hpp +++ b/include/mapnik/rule_cache.hpp @@ -29,7 +29,6 @@ // boost #include -#include // stl #include @@ -39,8 +38,6 @@ namespace mapnik class rule_cache { -private: - BOOST_MOVABLE_BUT_NOT_COPYABLE(rule_cache) public: typedef std::vector rule_ptrs; rule_cache() @@ -48,20 +45,6 @@ public: else_rules_(), also_rules_() {} - rule_cache(BOOST_RV_REF(rule_cache) rhs) // move ctor - : if_rules_(boost::move(rhs.if_rules_)), - else_rules_(boost::move(rhs.else_rules_)), - also_rules_(boost::move(rhs.also_rules_)) - {} - - rule_cache& operator=(BOOST_RV_REF(rule_cache) rhs) // move assign - { - std::swap(if_rules_, rhs.if_rules_); - std::swap(else_rules_,rhs.else_rules_); - std::swap(also_rules_, rhs.also_rules_); - return *this; - } - void add_rule(rule const& r) { if (r.has_else_filter()) @@ -82,12 +65,12 @@ public: { return if_rules_; } - + rule_ptrs const& get_else_rules() const { return else_rules_; } - + rule_ptrs const& get_also_rules() const { return also_rules_;