mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 11:39:41 +00:00
Use explicit default ctors call
Special change for MSVC2015.
This commit is contained in:
parent
5f5773f7df
commit
264ea99af6
1 changed files with 11 additions and 5 deletions
|
@ -38,19 +38,25 @@ namespace Misc
|
||||||
class ScopeGuarded
|
class ScopeGuarded
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScopeGuarded() = default;
|
ScopeGuarded()
|
||||||
|
: mMutex()
|
||||||
|
, mValue()
|
||||||
|
{}
|
||||||
|
|
||||||
ScopeGuarded(const T& value)
|
ScopeGuarded(const T& value)
|
||||||
: mValue(value)
|
: mMutex()
|
||||||
|
, mValue(value)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ScopeGuarded(T&& value)
|
ScopeGuarded(T&& value)
|
||||||
: mValue(std::move(value))
|
: mMutex()
|
||||||
|
, mValue(std::move(value))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <class ... Args>
|
template <class ... Args>
|
||||||
ScopeGuarded(Args&& ... args)
|
ScopeGuarded(Args&& ... args)
|
||||||
: mValue(std::forward<Args>(args) ...)
|
: mMutex()
|
||||||
|
, mValue(std::forward<Args>(args) ...)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ScopeGuarded(const ScopeGuarded& other)
|
ScopeGuarded(const ScopeGuarded& other)
|
||||||
|
@ -83,7 +89,7 @@ namespace Misc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SharedGuarded()
|
SharedGuarded()
|
||||||
: mMutex(std::make_shared<std::mutex>())
|
: mMutex(std::make_shared<std::mutex>()), mValue()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
SharedGuarded(std::shared_ptr<T> value)
|
SharedGuarded(std::shared_ptr<T> value)
|
||||||
|
|
Loading…
Reference in a new issue