소스 검색

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;}