浏览代码

Add DStr move assignment operator

Palana 11 年之前
父节点
当前提交
070f6cb6a6
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      libobs/util/dstr.hpp

+ 6 - 0
libobs/util/dstr.hpp

@@ -31,6 +31,12 @@ public:
 		dstr_move(&str, &other.str);
 	}
 
+	inline DStr &operator=(DStr &&other)
+	{
+		dstr_move(&str, &other.str);
+		return *this;
+	}
+
 	inline ~DStr() {dstr_free(&str);}
 
 	inline operator dstr*()             {return &str;}