瀏覽代碼

Make Variant constructors explicit

Michael Ragazzon 6 年之前
父節點
當前提交
7615097bbd
共有 1 個文件被更改,包括 2 次插入1 次删除
  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);
 	Variant variant(value);
 	attributes[name] = variant;
 	attributes[name] = variant;
-	ElementAttributes changed_attributes = { {name, variant} };
+    ElementAttributes changed_attributes;
+    changed_attributes.emplace(name, std::move(variant));
 	OnAttributeChange(changed_attributes);
 	OnAttributeChange(changed_attributes);
 }
 }