@@ -142,12 +142,12 @@ const std::string& SVGElement::getAttribute(const std::string_view& name) const
142
142
return getAttribute (id);
143
143
}
144
144
145
- bool SVGElement::setAttribute (const std::string_view& name, std::string value)
145
+ bool SVGElement::setAttribute (const std::string_view& name, const std::string& value)
146
146
{
147
147
auto id = propertyid (name);
148
148
if (id == PropertyID::Unknown)
149
149
return false ;
150
- return setAttribute (0x1000 , id, std::move ( value) );
150
+ return setAttribute (0x1000 , id, value);
151
151
}
152
152
153
153
const Attribute* SVGElement::findAttribute (PropertyID id) const
@@ -183,20 +183,20 @@ const std::string& SVGElement::getAttribute(PropertyID id) const
183
183
return emptyString;
184
184
}
185
185
186
- bool SVGElement::setAttribute (int specificity, PropertyID id, std::string value)
186
+ bool SVGElement::setAttribute (int specificity, PropertyID id, const std::string& value)
187
187
{
188
188
for (auto & attribute : m_attributes) {
189
189
if (id == attribute.id ()) {
190
190
if (specificity < attribute.specificity ())
191
191
return false ;
192
192
parseAttribute (id, value);
193
- attribute = Attribute (specificity, id, std::move ( value) );
193
+ attribute = Attribute (specificity, id, value);
194
194
return true ;
195
195
}
196
196
}
197
197
198
198
parseAttribute (id, value);
199
- m_attributes.emplace_front (specificity, id, std::move ( value) );
199
+ m_attributes.emplace_front (specificity, id, value);
200
200
return true ;
201
201
}
202
202
0 commit comments