obs-source: Disallow copy constructor

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-02-14 07:52:28 +01:00
parent 681a586ae9
commit 4baa2360c5
2 changed files with 4 additions and 3 deletions

View File

@ -590,7 +590,7 @@ obs::deprecated_source::deprecated_source(obs_source_t* source, bool ptrack_owne
obs_source_addref(this->_self); obs_source_addref(this->_self);
} }
} }
/*
obs::deprecated_source::deprecated_source(deprecated_source const& other) obs::deprecated_source::deprecated_source(deprecated_source const& other)
{ {
this->_self = other._self; this->_self = other._self;
@ -687,6 +687,7 @@ obs::deprecated_source& obs::deprecated_source::operator=(deprecated_source cons
return *this; return *this;
} }
*/
obs::deprecated_source::deprecated_source(deprecated_source&& other) obs::deprecated_source::deprecated_source(deprecated_source&& other)
: _self(std::move(other._self)), _track_ownership(std::move(other._track_ownership)) : _self(std::move(other._self)), _track_ownership(std::move(other._track_ownership))

View File

@ -78,8 +78,8 @@ namespace obs {
deprecated_source(obs_source_t* source, bool track_ownership = true, bool add_reference = false); deprecated_source(obs_source_t* source, bool track_ownership = true, bool add_reference = false);
public /*copy*/: public /*copy*/:
deprecated_source(deprecated_source const& other); deprecated_source(deprecated_source const& other) = delete;
deprecated_source& operator=(deprecated_source const& other); deprecated_source& operator=(deprecated_source const& other) = delete;
public /*move*/: public /*move*/:
deprecated_source(deprecated_source&& other); deprecated_source(deprecated_source&& other);