summaryrefslogtreecommitdiff
path: root/plugins/Boltun
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-17 15:56:52 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-17 15:56:52 +0300
commit3e05d92dcb5f6c2017bc462554901ba27816bdb4 (patch)
tree3276a7c3527006b74afc00c197ab48a3a43b1e9e /plugins/Boltun
parente285d61d903c2616f5a7ea3026a1068ceb59b513 (diff)
MNonCopyable - the common class to avoid declaring fake private constructors
Diffstat (limited to 'plugins/Boltun')
-rw-r--r--plugins/Boltun/src/Engine/PerContactData.h4
-rw-r--r--plugins/Boltun/src/Engine/TalkEngine.h3
-rw-r--r--plugins/Boltun/src/Engine/ValueChooser.h4
-rw-r--r--plugins/Boltun/src/config.h8
4 files changed, 5 insertions, 14 deletions
diff --git a/plugins/Boltun/src/Engine/PerContactData.h b/plugins/Boltun/src/Engine/PerContactData.h
index f573423bd3..5eb276ab28 100644
--- a/plugins/Boltun/src/Engine/PerContactData.h
+++ b/plugins/Boltun/src/Engine/PerContactData.h
@@ -24,10 +24,8 @@
static std::map<unsigned, void*> perContactDataObjects;
template <class Source, class Data, class ContactHandle>
-class PerContactData
+class PerContactData : private MNonCopyable
{
- PerContactData& operator=(const PerContactData&);
-
template <class Source, class Data>
struct InternalData
{
diff --git a/plugins/Boltun/src/Engine/TalkEngine.h b/plugins/Boltun/src/Engine/TalkEngine.h
index 3ddeaf87b9..cd54199a90 100644
--- a/plugins/Boltun/src/Engine/TalkEngine.h
+++ b/plugins/Boltun/src/Engine/TalkEngine.h
@@ -26,9 +26,8 @@
#include "PerContactData.h"
#include "UnrecentChooser.h"
-class TalkBot
+class TalkBot : private MNonCopyable
{
- TalkBot& operator=(const TalkBot&);
public:
struct MessageInfo
diff --git a/plugins/Boltun/src/Engine/ValueChooser.h b/plugins/Boltun/src/Engine/ValueChooser.h
index e442f14530..6ddfc00a5a 100644
--- a/plugins/Boltun/src/Engine/ValueChooser.h
+++ b/plugins/Boltun/src/Engine/ValueChooser.h
@@ -22,7 +22,7 @@
#define StringChooserH
template<class container = std::vector<std::wstring> >
-class ValueChooser
+class ValueChooser : private MNonCopyable
{
private:
int freeNumbers;
@@ -30,8 +30,6 @@ private:
const container data;
bool notifyOnReset;
- ValueChooser& operator=(const ValueChooser&);
-
public:
ValueChooser(const container& vec, bool NotifyOnReset = false)
:data(vec), notifyOnReset(NotifyOnReset)
diff --git a/plugins/Boltun/src/config.h b/plugins/Boltun/src/config.h
index eeb697d4b0..b7b4243963 100644
--- a/plugins/Boltun/src/config.h
+++ b/plugins/Boltun/src/config.h
@@ -24,7 +24,7 @@
class BoltunConfig;
template <class T, class BaseClass>
-class Property
+class Property : private MNonCopyable
{
public:
typedef const T(__thiscall BaseClass::*Getter)();
@@ -37,8 +37,6 @@ private:
bool cacheValid;
T cached;
- Property& operator=(const Property&);
-
public:
Property(Getter g, Setter s)
:getter(g), setter(s), cacheValid(false)
@@ -67,7 +65,7 @@ public:
};
template <class T, class BaseClass>
-class PtrProperty
+class PtrProperty : private MNonCopyable
{
public:
typedef const T* (__thiscall BaseClass::*Getter)();
@@ -80,8 +78,6 @@ private:
bool cacheValid;
const T* cached;
- PtrProperty& operator=(const PtrProperty&);
-
public:
PtrProperty(Getter g, Setter s)
:getter(g), setter(s), cacheValid(false), cached(nullptr)