From 48c391da0d544d44d1fc9ac131cb951011c66b43 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 31 Jul 2012 16:56:22 -0700 Subject: [PATCH] reduce copying of svg attributes via @lightmare - refs #1360 --- include/mapnik/svg/svg_converter.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/mapnik/svg/svg_converter.hpp b/include/mapnik/svg/svg_converter.hpp index 7e61a09ff..4ba4c4bff 100644 --- a/include/mapnik/svg/svg_converter.hpp +++ b/include/mapnik/svg/svg_converter.hpp @@ -66,10 +66,10 @@ public: { throw std::runtime_error("end_path : The path was not begun"); } - path_attributes attr = cur_attr(); - unsigned idx = attributes_[attributes_.size() - 1].index; + path_attributes& attr = attributes_[attributes_.size() - 1]; + unsigned idx = attr.index; + attr = cur_attr(); attr.index = idx; - attributes_[attributes_.size() - 1] = attr; } void move_to(double x, double y, bool rel=false) // M, m