libobs: Add copy constructor for ComQIPtr

This commit is contained in:
derrod 2023-02-28 19:03:20 +01:00 committed by Rodney
parent 60844505d0
commit f9cce334d2

View file

@ -165,6 +165,12 @@ public:
unk->QueryInterface(__uuidof(T), (void **)&this->ptr);
}
template<class U> inline ComQIPtr(const ComPtr<U> &c)
{
this->ptr = nullptr;
c->QueryInterface(__uuidof(T), (void **)&this->ptr);
}
inline ComPtr<T> &operator=(IUnknown *unk)
{
ComPtr<T>::Clear();