diff --git a/include/mapnik/text/harfbuzz_shaper.hpp b/include/mapnik/text/harfbuzz_shaper.hpp index 766019c27..4d0ab729f 100644 --- a/include/mapnik/text/harfbuzz_shaper.hpp +++ b/include/mapnik/text/harfbuzz_shaper.hpp @@ -113,7 +113,7 @@ static void shape_text(text_line & line, tmp.offset.set(positions[i].x_offset * tmp.scale_multiplier, positions[i].y_offset * tmp.scale_multiplier); width_map[glyphs[i].cluster] += tmp.advance(); - line.add_glyph(std::move(tmp), scale_factor); + line.add_glyph(tmp, scale_factor); } } line.update_max_char_height(face->get_char_height(size)); diff --git a/include/mapnik/text/icu_shaper.hpp b/include/mapnik/text/icu_shaper.hpp index b93c993f3..92df713e1 100644 --- a/include/mapnik/text/icu_shaper.hpp +++ b/include/mapnik/text/icu_shaper.hpp @@ -107,7 +107,7 @@ static void shape_text(text_line & line, face->glyph_dimensions(tmp); tmp.scale_multiplier = size / face->get_face()->units_per_EM; width_map[i] += tmp.advance(); - line.add_glyph(std::move(tmp), scale_factor); + line.add_glyph(tmp, scale_factor); ++i; } } diff --git a/include/mapnik/text/text_line.hpp b/include/mapnik/text/text_line.hpp index 96dd50b6b..36694bbee 100644 --- a/include/mapnik/text/text_line.hpp +++ b/include/mapnik/text/text_line.hpp @@ -43,7 +43,7 @@ public: text_line(unsigned first_char, unsigned last_char); // Append glyph. - void add_glyph(glyph_info && glyph, double scale_factor_); + void add_glyph(glyph_info const& glyph, double scale_factor_); // Preallocate memory. void reserve(glyph_vector::size_type length); diff --git a/src/text/text_line.cpp b/src/text/text_line.cpp index f6c82f9a0..28d48fe77 100644 --- a/src/text/text_line.cpp +++ b/src/text/text_line.cpp @@ -36,7 +36,7 @@ text_line::text_line(unsigned first_char, unsigned last_char) first_line_(false) {} -void text_line::add_glyph(glyph_info && glyph, double scale_factor_) +void text_line::add_glyph(glyph_info const& glyph, double scale_factor_) { line_height_ = std::max(line_height_, glyph.line_height() + glyph.format->line_spacing); double advance = glyph.advance(); @@ -49,7 +49,7 @@ void text_line::add_glyph(glyph_info && glyph, double scale_factor_) // Only add character spacing if the character is not a zero-width part of a cluster. width_ += advance + glyphs_.back().format->character_spacing * scale_factor_; } - glyphs_.push_back(std::move(glyph)); + glyphs_.push_back(glyph); }