Browse Source

Make Variant constructors explicit

Michael Ragazzon 6 years ago
parent
commit
7615097bbd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Include/RmlUi/Core/Element.inl

+ 2 - 1
Include/RmlUi/Core/Element.inl

@@ -48,7 +48,8 @@ void Element::SetAttribute(const String& name, const T& value)
 {
 	Variant variant(value);
 	attributes[name] = variant;
-	ElementAttributes changed_attributes = { {name, variant} };
+    ElementAttributes changed_attributes;
+    changed_attributes.emplace(name, std::move(variant));
 	OnAttributeChange(changed_attributes);
 }