Jelajahi Sumber

libobs: Handle noexcept warnings

VC++ wants noexcept for move assignment operators, and move contructors.
jpark37 5 tahun lalu
induk
melakukan
d383efc065
2 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 2 2
      libobs/obs.hpp
  2. 2 2
      libobs/util/util.hpp

+ 2 - 2
libobs/obs.hpp

@@ -236,7 +236,7 @@ public:
 	}
 
 	OBSSignal(const OBSSignal &) = delete;
-	OBSSignal(OBSSignal &&other)
+	OBSSignal(OBSSignal &&other) noexcept
 		: handler(other.handler),
 		  signal(other.signal),
 		  callback(other.callback),
@@ -249,7 +249,7 @@ public:
 	}
 
 	OBSSignal &operator=(const OBSSignal &) = delete;
-	OBSSignal &operator=(OBSSignal &&other)
+	OBSSignal &operator=(OBSSignal &&other) noexcept
 	{
 		Disconnect();
 

+ 2 - 2
libobs/util/util.hpp

@@ -68,7 +68,7 @@ class ConfigFile {
 
 public:
 	inline ConfigFile() : config(NULL) {}
-	inline ConfigFile(ConfigFile &&other) : config(other.config)
+	inline ConfigFile(ConfigFile &&other) noexcept : config(other.config)
 	{
 		other.config = nullptr;
 	}
@@ -120,7 +120,7 @@ class TextLookup {
 
 public:
 	inline TextLookup(lookup_t *lookup = nullptr) : lookup(lookup) {}
-	inline TextLookup(TextLookup &&other) : lookup(other.lookup)
+	inline TextLookup(TextLookup &&other) noexcept : lookup(other.lookup)
 	{
 		other.lookup = nullptr;
 	}