Explorar o código

Add DStr move assignment operator

Palana %!s(int64=11) %!d(string=hai) anos
pai
achega
070f6cb6a6
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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;}