Ещё удалены конструкторы и операторы присвоения по умолчанию

This commit is contained in:
Andrei Astafev 2020-04-23 14:17:08 +03:00
parent d244c67cba
commit 36a2a1d2c6
2 changed files with 11 additions and 4 deletions

View File

@ -89,10 +89,13 @@ class Paths
protected:
Paths();
~Paths() = default;
Paths( const Paths& ) = delete; // NOLINT
Paths& operator=( const Paths& ) = delete; // NOLINT
public:
Paths( const Paths& ) = delete;
Paths& operator=( const Paths& ) = delete;
Paths( Paths&& ) = delete;
Paths& operator=( Paths&& ) = delete;
/**
* @brief getInstance
* @return Уникальный экземпляр класса Paths

View File

@ -30,13 +30,17 @@ class PathsMT : public Paths
{
PathsMT();
~PathsMT() = default;
PathsMT( const PathsMT& ) = delete; // NOLINT
PathsMT& operator=( const PathsMT& ) = delete; // NOLINT
static std::atomic< PathsMT* > mInstance;
static std::mutex mMutex;
public:
PathsMT( const PathsMT& ) = delete;
PathsMT& operator=( const PathsMT& ) = delete;
PathsMT( PathsMT&& ) = delete;
PathsMT& operator=( PathsMT&& ) = delete;
/**
* @brief getInstance
* @return Уникальный экземпляр класса PathsMT