diff --git a/include/mapnik/geometry_reprojection_impl.hpp b/include/mapnik/geometry_reprojection_impl.hpp index 3ba4b759a..4021c2292 100644 --- a/include/mapnik/geometry_reprojection_impl.hpp +++ b/include/mapnik/geometry_reprojection_impl.hpp @@ -161,7 +161,7 @@ geometry_collection reproject_internal(geometry_collection const & c, proj for (auto const& g : c) { - geometry new_g(std::move(reproject_copy(g, proj_trans, n_err))); + geometry new_g(reproject_copy(g, proj_trans, n_err)); if (!new_g.template is()) { new_c.emplace_back(std::move(new_g)); diff --git a/include/mapnik/geometry_transform.hpp b/include/mapnik/geometry_transform.hpp index 5a0c263d8..a7bb2f13d 100644 --- a/include/mapnik/geometry_transform.hpp +++ b/include/mapnik/geometry_transform.hpp @@ -114,7 +114,7 @@ struct geometry_transform geometry_collection collection_out; for (auto const& geom : collection) { - collection_out.push_back(std::move((*this)(geom))); + collection_out.push_back((*this)(geom)); } return collection_out; } @@ -128,39 +128,39 @@ struct geometry_transform template geometry operator() (point const& geom) const { - return std::move(transform_geometry(geom, transformer_)); + return transform_geometry(geom, transformer_); } - + template geometry operator() (line_string const& geom) const { - return std::move(transform_geometry(geom, transformer_)); + return transform_geometry(geom, transformer_); } - + template geometry operator() (polygon const& geom) const { - return std::move(transform_geometry(geom, transformer_)); + return transform_geometry(geom, transformer_); } template geometry operator() (multi_point const& geom) const { - return std::move(transform_geometry(geom, transformer_)); + return transform_geometry(geom, transformer_); } - + template geometry operator() (multi_line_string const& geom) const { - return std::move(transform_geometry(geom, transformer_)); + return transform_geometry(geom, transformer_); } - + template geometry operator() (multi_polygon const& geom) const { - return std::move(transform_geometry(geom, transformer_)); + return transform_geometry(geom, transformer_); } - + Transformer const& transformer_; }; diff --git a/src/font_engine_freetype.cpp b/src/font_engine_freetype.cpp index 6c2f01057..ac78916ba 100644 --- a/src/font_engine_freetype.cpp +++ b/src/font_engine_freetype.cpp @@ -136,12 +136,12 @@ bool freetype_engine::register_font_impl(std::string const& file_name, auto range = font_file_mapping.equal_range(name); if (range.first == range.second) // the key was previously absent; insert a pair { - font_file_mapping.emplace_hint(range.first,name,std::move(std::make_pair(i,file_name))); + font_file_mapping.emplace_hint(range.first, name, std::make_pair(i,file_name)); } else // the key was present, replace the associated value { /* some action with value range.first->second about to be overwritten here */ MAPNIK_LOG_WARN(font_engine_freetype) << "registering new " << name << " at '" << file_name << "'"; - range.first->second = std::move(std::make_pair(i,file_name)); // replace value + range.first->second = std::make_pair(i,file_name); // replace value } success = true; } @@ -340,7 +340,7 @@ face_ptr freetype_engine::create_face(std::string const& family_name, #ifdef MAPNIK_THREADSAFE std::lock_guard lock(mutex_); #endif - auto result = global_memory_fonts.emplace(itr->second.second, std::make_pair(std::move(file.data()),file.size())); + auto result = global_memory_fonts.emplace(itr->second.second, std::make_pair(file.data(),file.size())); FT_Face face; FT_Error error = FT_New_Memory_Face(library.get(), reinterpret_cast(result.first->second.first.get()), // data diff --git a/src/image_any.cpp b/src/image_any.cpp index ef62a4f71..bfa3478ba 100644 --- a/src/image_any.cpp +++ b/src/image_any.cpp @@ -237,31 +237,31 @@ MAPNIK_DECL image_any create_image_any(int width, switch (type) { case image_dtype_gray8: - return image_any(std::move(image_gray8(width, height, initialize, premultiplied, painted))); + return image_any(image_gray8(width, height, initialize, premultiplied, painted)); case image_dtype_gray8s: - return image_any(std::move(image_gray8s(width, height, initialize, premultiplied, painted))); + return image_any(image_gray8s(width, height, initialize, premultiplied, painted)); case image_dtype_gray16: - return image_any(std::move(image_gray16(width, height, initialize, premultiplied, painted))); + return image_any(image_gray16(width, height, initialize, premultiplied, painted)); case image_dtype_gray16s: - return image_any(std::move(image_gray16s(width, height, initialize, premultiplied, painted))); + return image_any(image_gray16s(width, height, initialize, premultiplied, painted)); case image_dtype_gray32: - return image_any(std::move(image_gray32(width, height, initialize, premultiplied, painted))); + return image_any(image_gray32(width, height, initialize, premultiplied, painted)); case image_dtype_gray32s: - return image_any(std::move(image_gray32s(width, height, initialize, premultiplied, painted))); + return image_any(image_gray32s(width, height, initialize, premultiplied, painted)); case image_dtype_gray32f: - return image_any(std::move(image_gray32f(width, height, initialize, premultiplied, painted))); + return image_any(image_gray32f(width, height, initialize, premultiplied, painted)); case image_dtype_gray64: - return image_any(std::move(image_gray64(width, height, initialize, premultiplied, painted))); + return image_any(image_gray64(width, height, initialize, premultiplied, painted)); case image_dtype_gray64s: - return image_any(std::move(image_gray64s(width, height, initialize, premultiplied, painted))); + return image_any(image_gray64s(width, height, initialize, premultiplied, painted)); case image_dtype_gray64f: - return image_any(std::move(image_gray64f(width, height, initialize, premultiplied, painted))); + return image_any(image_gray64f(width, height, initialize, premultiplied, painted)); case image_dtype_null: - return image_any(std::move(image_null())); + return image_any(image_null()); case image_dtype_rgba8: case IMAGE_DTYPE_MAX: default: - return image_any(std::move(image_rgba8(width, height, initialize, premultiplied, painted))); + return image_any(image_rgba8(width, height, initialize, premultiplied, painted)); } } diff --git a/src/marker_cache.cpp b/src/marker_cache.cpp index e0fe08d0d..0f63c6d62 100644 --- a/src/marker_cache.cpp +++ b/src/marker_cache.cpp @@ -186,12 +186,12 @@ std::shared_ptr marker_cache::find(std::string const& uri, marker_path->set_dimensions(svg.width(),svg.height()); if (update_cache) { - auto emplace_result = marker_cache_.emplace(uri,std::make_shared(std::move(mapnik::marker_svg(marker_path)))); + auto emplace_result = marker_cache_.emplace(uri,std::make_shared(mapnik::marker_svg(marker_path))); return emplace_result.first->second; } else { - return std::make_shared(std::move(mapnik::marker_svg(marker_path))); + return std::make_shared(mapnik::marker_svg(marker_path)); } } // otherwise assume file-based @@ -218,12 +218,12 @@ std::shared_ptr marker_cache::find(std::string const& uri, marker_path->set_dimensions(svg.width(),svg.height()); if (update_cache) { - auto emplace_result = marker_cache_.emplace(uri,std::make_shared(std::move(mapnik::marker_svg(marker_path)))); + auto emplace_result = marker_cache_.emplace(uri,std::make_shared(mapnik::marker_svg(marker_path))); return emplace_result.first->second; } else { - return std::make_shared(std::move(mapnik::marker_svg(marker_path))); + return std::make_shared(mapnik::marker_svg(marker_path)); } } else @@ -240,14 +240,14 @@ std::shared_ptr marker_cache::find(std::string const& uri, { auto emplace_result = marker_cache_.emplace(uri, std::make_shared( - std::move(util::apply_visitor(detail::visitor_create_marker(), im)) + util::apply_visitor(detail::visitor_create_marker(), im) )); return emplace_result.first->second; } else { return std::make_shared( - std::move(util::apply_visitor(detail::visitor_create_marker(), im)) + util::apply_visitor(detail::visitor_create_marker(), im) ); } } diff --git a/test/unit/geometry/geometry_strategy_test.cpp b/test/unit/geometry/geometry_strategy_test.cpp index a5fe01ffe..50acb721d 100644 --- a/test/unit/geometry/geometry_strategy_test.cpp +++ b/test/unit/geometry/geometry_strategy_test.cpp @@ -62,7 +62,7 @@ SECTION("proj and view strategy") { // Test that both work grouped together passing in geometry using sg_type = strategy_group; sg_type sg(ps, vs); - geometry p1(std::move(point(-97.553098,35.523105))); + geometry p1(point(-97.553098,35.523105)); point r1(58.6287 , 100.945); geometry p2 = transform(p1, sg); REQUIRE(p2.is >()); @@ -73,7 +73,7 @@ SECTION("proj and view strategy") { // Test that it works pulling back int using sg_type = strategy_group; sg_type sg(ps, vs); - geometry p1(std::move(point(-97.553098,35.523105))); + geometry p1(point(-97.553098,35.523105)); point r1(58 , 100); geometry p2 = transform(p1, sg); REQUIRE(p2.is >()); @@ -85,7 +85,7 @@ SECTION("proj and view strategy") { mapnik::geometry::scale_rounding_strategy ss(16); using sg_type = strategy_group; sg_type sg(ps, vs, ss); - geometry p1(std::move(point(-97.553098,35.523105))); + geometry p1(point(-97.553098,35.523105)); point r1(938 , 1615); geometry p2 = transform(p1, sg); REQUIRE(p2.is >()); @@ -97,7 +97,7 @@ SECTION("proj and view strategy") { mapnik::geometry::scale_strategy ss(1.0/16.0); using sg_type = strategy_group_first; sg_type sg(ss, uvs, ps_rev); - geometry p1(std::move(point(938 , 1615))); + geometry p1(point(938 , 1615)); point r1(-97.5586 , 35.5322); geometry p2 = transform(p1, sg); REQUIRE(p2.is >()); @@ -109,7 +109,7 @@ SECTION("proj and view strategy") { mapnik::geometry::scale_rounding_strategy ss(16, 20); using sg_type = strategy_group; sg_type sg(ps, vs, ss); - geometry p1(std::move(point(-97.553098,35.523105))); + geometry p1(point(-97.553098,35.523105)); point r1(958 , 1635); geometry p2 = transform(p1, sg); REQUIRE(p2.is >()); @@ -121,7 +121,7 @@ SECTION("proj and view strategy") { mapnik::geometry::scale_strategy ss(1.0/16.0, -20.0/16.0); using sg_type = strategy_group_first; sg_type sg(ss, uvs, ps_rev); - geometry p1(std::move(point(958 , 1635))); + geometry p1(point(958 , 1635)); point r1(-97.5586 , 35.5322); geometry p2 = transform(p1, sg); REQUIRE(p2.is >()); @@ -133,22 +133,22 @@ SECTION("proj and view strategy") { SECTION("scaling strategies - double to double") { using namespace mapnik::geometry; - - { + + { scale_strategy ss(10.0); point p(-90.3, 35.5); point r(-903.0, 355.0); point o = transform(p, ss); assert_g_equal(r, o); } - { + { scale_strategy ss(0.5, -2.0); point p(-90.3, 35.5); point r(-47.15, 15.75); point o = transform(p, ss); assert_g_equal(r, o); } - { + { scale_rounding_strategy ss(0.5, -2.0); point p(-90.3, 35.5); point r(-47.0, 16.0); @@ -160,22 +160,22 @@ SECTION("scaling strategies - double to double") { SECTION("scaling strategies - double to int64") { using namespace mapnik::geometry; - - { + + { scale_strategy ss(10.0); point p(-90.31, 35.58); point r(-903, 355); point o = transform(p, ss); assert_g_equal(r, o); } - { + { scale_strategy ss(0.5, -2.0); point p(-90.3, 35.5); point r(-47, 15); point o = transform(p, ss); assert_g_equal(r, o); } - { + { scale_rounding_strategy ss(0.5, -2.0); point p(-90.3, 35.5); point r(-47, 16); @@ -185,5 +185,3 @@ SECTION("scaling strategies - double to int64") { } // END SECTION } // END TEST CASE - -