summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-17 18:22:25 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-17 18:22:25 +0300
commit533172dc2df60406e2c7f08f36de3742721f8079 (patch)
tree3cdd02c2876a8eaeb8d852384e6214ecac13739c /src
parentfed37f530d063cbce6a9bba7f1a878c42e10367e (diff)
downloadmanaplus-533172dc2df60406e2c7f08f36de3742721f8079.tar.gz
manaplus-533172dc2df60406e2c7f08f36de3742721f8079.tar.bz2
manaplus-533172dc2df60406e2c7f08f36de3742721f8079.tar.xz
manaplus-533172dc2df60406e2c7f08f36de3742721f8079.zip
Add missing A_DEFAULT_COPY / A_DELETE_COPY into other files.
Diffstat (limited to 'src')
-rw-r--r--src/actormanager.cpp6
-rw-r--r--src/client.cpp10
-rw-r--r--src/configmanager.h2
-rw-r--r--src/configuration.h10
-rw-r--r--src/dirs.h2
-rw-r--r--src/equipment.h5
-rw-r--r--src/events/actionevent.h2
-rw-r--r--src/events/selectionevent.h2
-rw-r--r--src/game.h8
-rw-r--r--src/guild.cpp2
-rw-r--r--src/localconsts.h2
-rw-r--r--src/mumblemanager.h18
-rw-r--r--src/navigationmanager.cpp2
-rw-r--r--src/options.h2
-rw-r--r--src/party.cpp2
-rw-r--r--src/position.h8
-rw-r--r--src/render/mockdrawitem.h2
-rw-r--r--src/render/shaders/shadersmanager.h5
-rw-r--r--src/settings.h2
-rw-r--r--src/units.cpp4
-rw-r--r--src/variabledata.h17
-rw-r--r--src/vector.h6
22 files changed, 115 insertions, 4 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 0bea659f3..9f8985d7e 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -76,6 +76,8 @@ ActorManager *actorManager = nullptr;
class FindBeingFunctor final
{
public:
+ A_DEFAULT_COPY(FindBeingFunctor)
+
bool operator() (const ActorSprite *const actor) const
{
if (!actor
@@ -105,6 +107,8 @@ class FindBeingFunctor final
class FindBeingEqualFunctor final
{
public:
+ A_DEFAULT_COPY(FindBeingEqualFunctor)
+
bool operator() (const Being *const being) const
{
if (!being || !findBeing)
@@ -118,6 +122,8 @@ class FindBeingEqualFunctor final
class SortBeingFunctor final
{
public:
+ A_DEFAULT_COPY(SortBeingFunctor)
+
bool operator() (const Being *const being1,
const Being *const being2) const
{
diff --git a/src/client.cpp b/src/client.cpp
index 644950cc0..40fa743d7 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -207,6 +207,11 @@ namespace
class AccountListener final : public ActionListener
{
public:
+ AccountListener()
+ { }
+
+ A_DELETE_COPY(AccountListener)
+
void action(const ActionEvent &) override final
{
client->setState(State::CHAR_SELECT);
@@ -216,6 +221,11 @@ namespace
class LoginListener final : public ActionListener
{
public:
+ LoginListener()
+ { }
+
+ A_DELETE_COPY(LoginListener)
+
void action(const ActionEvent &) override final
{
client->setState(State::PRE_LOGIN);
diff --git a/src/configmanager.h b/src/configmanager.h
index c4673aa8d..16e72d558 100644
--- a/src/configmanager.h
+++ b/src/configmanager.h
@@ -30,6 +30,8 @@
class ConfigManager final
{
public:
+ A_DELETE_COPY(ConfigManager)
+
static void initConfiguration();
static void initServerConfig(const std::string &serverName);
diff --git a/src/configuration.h b/src/configuration.h
index 852666a39..111f85d63 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -47,6 +47,11 @@ template <class T, class CONT>
class ConfigurationListManager notfinal
{
public:
+ ConfigurationListManager()
+ { }
+
+ A_DELETE_COPY(ConfigurationListManager)
+
/**
* Writes a value into a configuration object
*
@@ -69,7 +74,8 @@ class ConfigurationListManager notfinal
CONT container)
const A_WARN_UNUSED = 0;
- virtual ~ConfigurationListManager() {}
+ virtual ~ConfigurationListManager()
+ { }
};
/**
@@ -83,6 +89,8 @@ class ConfigurationObject notfinal
friend class Configuration;
public:
+ A_DELETE_COPY(ConfigurationObject)
+
virtual ~ConfigurationObject();
/**
diff --git a/src/dirs.h b/src/dirs.h
index 7773ab73c..aa43f34d0 100644
--- a/src/dirs.h
+++ b/src/dirs.h
@@ -28,6 +28,8 @@
class Dirs final
{
public:
+ A_DELETE_COPY(Dirs)
+
static void initUsersDir();
static void updateDataPath();
diff --git a/src/equipment.h b/src/equipment.h
index 16b8f8da6..265108eb7 100644
--- a/src/equipment.h
+++ b/src/equipment.h
@@ -48,6 +48,11 @@ class Equipment final
class Backend notfinal
{
public:
+ Backend()
+ { }
+
+ A_DELETE_COPY(Backend)
+
virtual const Item *getEquipment(const int index)
const A_WARN_UNUSED = 0;
diff --git a/src/events/actionevent.h b/src/events/actionevent.h
index 290dff628..11655fa03 100644
--- a/src/events/actionevent.h
+++ b/src/events/actionevent.h
@@ -108,6 +108,8 @@ class ActionEvent final : public Event
{
}
+ A_DELETE_COPY(ActionEvent)
+
/**
* Destructor.
*/
diff --git a/src/events/selectionevent.h b/src/events/selectionevent.h
index 40fe10ab0..02682af07 100644
--- a/src/events/selectionevent.h
+++ b/src/events/selectionevent.h
@@ -87,6 +87,8 @@ class SelectionEvent final: public Event
Event(source)
{ }
+ A_DELETE_COPY(SelectionEvent)
+
/**
* Destructor.
*/
diff --git a/src/game.h b/src/game.h
index 2ab6207a2..b80f9c3ee 100644
--- a/src/game.h
+++ b/src/game.h
@@ -39,6 +39,14 @@ class Map;
struct LastKey final
{
+ A_DELETE_COPY(LastKey)
+
+ LastKey() :
+ time(0),
+ key(InputAction::NO_VALUE),
+ cnt(0)
+ { }
+
time_t time;
InputActionT key;
int cnt;
diff --git a/src/guild.cpp b/src/guild.cpp
index 4fada0f9c..9f166d9d3 100644
--- a/src/guild.cpp
+++ b/src/guild.cpp
@@ -35,6 +35,8 @@ namespace
static class SortGuildFunctor final
{
public:
+ A_DEFAULT_COPY(SortGuildFunctor)
+
bool operator() (const GuildMember *const m1,
const GuildMember *const m2) const
{
diff --git a/src/localconsts.h b/src/localconsts.h
index 4833fac55..d5bd0ebc1 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -39,6 +39,8 @@
+ __clang_patchlevel__)
#endif // __clang__
+#define A_DEFAULT_COPY(func)
+
#if !defined(__GXX_EXPERIMENTAL_CXX0X__)
#undef nullptr
#define nullptr 0
diff --git a/src/mumblemanager.h b/src/mumblemanager.h
index 5f785ac06..4a3361a75 100644
--- a/src/mumblemanager.h
+++ b/src/mumblemanager.h
@@ -21,6 +21,24 @@
struct LinkedMem final
{
+ LinkedMem() :
+ uiVersion(0U),
+ uiTick(0U),
+ fAvatarPosition(),
+ fAvatarFront(),
+ fAvatarTop(),
+ name(),
+ fCameraPosition(),
+ fCameraFront(),
+ fCameraTop(),
+ identity(),
+ context_len(0U),
+ context(),
+ description()
+ { }
+
+ A_DELETE_COPY(LinkedMem)
+
uint32_t uiVersion;
uint32_t uiTick;
float fAvatarPosition[3];
diff --git a/src/navigationmanager.cpp b/src/navigationmanager.cpp
index 925329764..46fc40cbe 100644
--- a/src/navigationmanager.cpp
+++ b/src/navigationmanager.cpp
@@ -43,6 +43,8 @@ namespace
{
}
+ A_DEFAULT_COPY(Cell)
+
int x;
int y;
};
diff --git a/src/options.h b/src/options.h
index 5cec7a4f3..bd6663de7 100644
--- a/src/options.h
+++ b/src/options.h
@@ -66,6 +66,8 @@ struct Options final
testMode(false)
{}
+ A_DELETE_COPY(Options)
+
std::string username;
std::string password;
std::string character;
diff --git a/src/party.cpp b/src/party.cpp
index 4b14aa32b..5dd1715d8 100644
--- a/src/party.cpp
+++ b/src/party.cpp
@@ -34,6 +34,8 @@ namespace
static class SortPartyFunctor final
{
public:
+ A_DEFAULT_COPY(SortPartyFunctor)
+
bool operator() (const PartyMember *const p1,
const PartyMember *const p2) const
{
diff --git a/src/position.h b/src/position.h
index 08d69d695..513448021 100644
--- a/src/position.h
+++ b/src/position.h
@@ -33,10 +33,14 @@
*/
struct Position final
{
- Position(const int x0, const int y0) :
- x(x0), y(y0)
+ Position(const int x0,
+ const int y0) :
+ x(x0),
+ y(y0)
{ }
+ A_DEFAULT_COPY(Position)
+
int x;
int y;
};
diff --git a/src/render/mockdrawitem.h b/src/render/mockdrawitem.h
index 94198329a..784e61861 100644
--- a/src/render/mockdrawitem.h
+++ b/src/render/mockdrawitem.h
@@ -44,6 +44,8 @@ struct MockDrawItem final
{
}
+ A_DEFAULT_COPY(MockDrawItem)
+
const Image *image;
MockDrawTypeT drawType;
int x;
diff --git a/src/render/shaders/shadersmanager.h b/src/render/shaders/shadersmanager.h
index 9f6bd894f..8e45290c4 100644
--- a/src/render/shaders/shadersmanager.h
+++ b/src/render/shaders/shadersmanager.h
@@ -33,6 +33,11 @@ class ShaderProgram;
class ShadersManager final
{
public:
+ ShadersManager()
+ { }
+
+ A_DELETE_COPY(ShadersManager)
+
Shader *createShader(const unsigned int type,
const std::string &fileName) A_WARN_UNUSED;
diff --git a/src/settings.h b/src/settings.h
index cc4f958c6..914532977 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -90,6 +90,8 @@ class Settings final
uselonglivesprites(false)
{ }
+ A_DELETE_COPY(Settings)
+
void init();
std::string updateHost;
diff --git a/src/units.cpp b/src/units.cpp
index ec2a356a9..cc68c7463 100644
--- a/src/units.cpp
+++ b/src/units.cpp
@@ -33,6 +33,8 @@
struct UnitLevel final
{
+ A_DEFAULT_COPY(UnitLevel)
+
std::string symbol;
int count;
int round;
@@ -41,6 +43,8 @@ struct UnitLevel final
struct UnitDescription final
{
+ A_DEFAULT_COPY(UnitDescription)
+
std::vector<struct UnitLevel> levels;
double conversion;
bool mix;
diff --git a/src/variabledata.h b/src/variabledata.h
index 05363c646..89b166482 100644
--- a/src/variabledata.h
+++ b/src/variabledata.h
@@ -38,6 +38,11 @@ class VariableData notfinal
DATA_BOOL
};
+ VariableData()
+ { }
+
+ A_DELETE_COPY(VariableData)
+
virtual ~VariableData()
{}
@@ -48,9 +53,12 @@ class IntData final : public VariableData
{
public:
explicit IntData(const int value) :
+ VariableData(),
mData(value)
{ }
+ A_DELETE_COPY(IntData)
+
int getData() const noexcept2 A_WARN_UNUSED
{ return mData; }
@@ -65,9 +73,12 @@ class StringData final : public VariableData
{
public:
explicit StringData(const std::string &value) :
+ VariableData(),
mData(value)
{ }
+ A_DELETE_COPY(StringData)
+
const std::string &getData() const noexcept2 A_WARN_UNUSED
{ return mData; }
@@ -82,9 +93,12 @@ class FloatData final : public VariableData
{
public:
explicit FloatData(const double value) :
+ VariableData(),
mData(value)
{ }
+ A_DELETE_COPY(FloatData)
+
double getData() const noexcept2 A_WARN_UNUSED
{ return mData; }
@@ -99,9 +113,12 @@ class BoolData final : public VariableData
{
public:
explicit BoolData(const bool value) :
+ VariableData(),
mData(value)
{ }
+ A_DELETE_COPY(BoolData)
+
bool getData() const noexcept2 A_WARN_UNUSED
{ return mData; }
diff --git a/src/vector.h b/src/vector.h
index c607484fd..6c06d90d9 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -50,7 +50,9 @@ class Vector final
/**
* Constructor.
*/
- Vector(const float x0, const float y0, const float z0 = 0.0F) :
+ Vector(const float x0,
+ const float y0,
+ const float z0 = 0.0F) :
x(x0),
y(y0),
z(z0)
@@ -65,6 +67,8 @@ class Vector final
z(v.z)
{}
+ A_DEFAULT_COPY(Vector)
+
/**
* Returns true if all coordinates are set to 0, otherwise returns
* false.