summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actor.h2
-rw-r--r--src/actorsprite.h2
-rw-r--r--src/actorspritemanager.h2
-rw-r--r--src/animatedsprite.h2
-rw-r--r--src/animationdelayload.h2
-rw-r--r--src/animationparticle.h2
-rw-r--r--src/auctionmanager.h2
-rw-r--r--src/avatar.h4
-rw-r--r--src/being.cpp2
-rw-r--r--src/being.h4
-rw-r--r--src/channel.h2
-rw-r--r--src/channelmanager.h1
-rw-r--r--src/chatlogger.h2
-rw-r--r--src/client.h3
-rw-r--r--src/commandhandler.h2
-rw-r--r--src/compoundsprite.h4
-rw-r--r--src/configuration.h2
-rw-r--r--src/dropshortcut.h2
-rw-r--r--src/effectmanager.h3
-rw-r--r--src/emoteshortcut.h2
-rw-r--r--src/equipment.h2
-rw-r--r--src/flooritem.h2
-rw-r--r--src/game.h2
-rw-r--r--src/graphics.h7
-rw-r--r--src/graphicsmanager.h2
-rw-r--r--src/graphicsvertexes.h8
-rw-r--r--src/gui/beingpopup.h2
-rw-r--r--src/gui/botcheckerwindow.h2
-rw-r--r--src/gui/buydialog.h2
-rw-r--r--src/gui/buyselldialog.h2
-rw-r--r--src/gui/changeemaildialog.h2
-rw-r--r--src/gui/changepassworddialog.h2
-rw-r--r--src/gui/charcreatedialog.h2
-rw-r--r--src/gui/charselectdialog.h2
-rw-r--r--src/gui/chatwindow.h2
-rw-r--r--src/gui/confirmdialog.h2
-rw-r--r--src/gui/connectiondialog.h2
-rw-r--r--src/gui/debugwindow.h10
-rw-r--r--src/gui/didyouknowwindow.h2
-rw-r--r--src/gui/editdialog.h2
-rw-r--r--src/gui/editserverdialog.h2
-rw-r--r--src/gui/equipmentwindow.h4
-rw-r--r--src/gui/focushandler.h6
-rw-r--r--src/gui/gui.cpp2
-rw-r--r--src/gui/gui.h2
-rw-r--r--src/gui/helpwindow.h2
-rw-r--r--src/gui/inventorywindow.h2
-rw-r--r--src/gui/itemamountwindow.h2
-rw-r--r--src/gui/itempopup.h2
-rw-r--r--src/gui/killstats.h2
-rw-r--r--src/gui/logindialog.h2
-rw-r--r--src/gui/minimap.h3
-rw-r--r--src/gui/ministatuswindow.h2
-rw-r--r--src/gui/npcdialog.h2
-rw-r--r--src/gui/npcpostdialog.h2
-rw-r--r--src/gui/okdialog.h2
-rw-r--r--src/gui/outfitwindow.h2
-rw-r--r--src/gui/palette.h2
-rw-r--r--src/gui/popupmenu.h6
-rw-r--r--src/gui/questswindow.h2
-rw-r--r--src/gui/quitdialog.h2
-rw-r--r--src/gui/registerdialog.h6
-rw-r--r--src/gui/sdlfont.h2
-rw-r--r--src/gui/sdlinput.cpp4
-rw-r--r--src/gui/sdlinput.h2
-rw-r--r--src/gui/selldialog.h2
-rw-r--r--src/gui/serverdialog.h4
-rw-r--r--src/gui/setup.h3
-rw-r--r--src/gui/setup_audio.h2
-rw-r--r--src/gui/setup_chat.h2
-rw-r--r--src/gui/setup_colors.h4
-rw-r--r--src/gui/setup_input.h2
-rw-r--r--src/gui/setup_joystick.h2
-rw-r--r--src/gui/setup_other.h2
-rw-r--r--src/gui/setup_perfomance.h2
-rw-r--r--src/gui/setup_players.h2
-rw-r--r--src/gui/setup_relations.h4
-rw-r--r--src/gui/setup_theme.h4
-rw-r--r--src/gui/setup_video.h4
-rw-r--r--src/gui/setup_visual.h2
-rw-r--r--src/gui/shopwindow.h2
-rw-r--r--src/gui/shortcutwindow.h2
-rw-r--r--src/gui/skilldialog.h4
-rw-r--r--src/gui/socialwindow.h2
-rw-r--r--src/gui/specialswindow.h2
-rw-r--r--src/gui/speechbubble.h2
-rw-r--r--src/gui/spellpopup.h2
-rw-r--r--src/gui/statuspopup.h2
-rw-r--r--src/gui/statuswindow.h2
-rw-r--r--src/gui/textcommandeditor.h2
-rw-r--r--src/gui/textdialog.h2
-rw-r--r--src/gui/textpopup.h2
-rw-r--r--src/gui/theme.cpp50
-rw-r--r--src/gui/theme.h11
-rw-r--r--src/gui/tradewindow.h2
-rw-r--r--src/gui/unregisterdialog.h2
-rw-r--r--src/gui/updaterwindow.h2
-rw-r--r--src/gui/userpalette.h2
-rw-r--r--src/gui/viewport.h2
-rw-r--r--src/gui/whoisonline.h4
-rw-r--r--src/gui/widgets/avatarlistbox.h2
-rw-r--r--src/gui/widgets/battletab.h2
-rw-r--r--src/gui/widgets/browserbox.h2
-rw-r--r--src/gui/widgets/button.h2
-rw-r--r--src/gui/widgets/channeltab.h1
-rw-r--r--src/gui/widgets/chattab.h2
-rw-r--r--src/gui/widgets/checkbox.h2
-rw-r--r--src/gui/widgets/desktop.h3
-rw-r--r--src/gui/widgets/dropdown.h2
-rw-r--r--src/gui/widgets/dropshortcutcontainer.h2
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.h2
-rw-r--r--src/gui/widgets/extendedlistbox.h2
-rw-r--r--src/gui/widgets/extendednamesmodel.h2
-rw-r--r--src/gui/widgets/flowcontainer.h2
-rw-r--r--src/gui/widgets/guildchattab.h2
-rw-r--r--src/gui/widgets/guitable.h2
-rw-r--r--src/gui/widgets/horizontcontainer.h2
-rw-r--r--src/gui/widgets/icon.h2
-rw-r--r--src/gui/widgets/inttextfield.h2
-rw-r--r--src/gui/widgets/itemcontainer.h2
-rw-r--r--src/gui/widgets/itemlinkhandler.h2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.h2
-rw-r--r--src/gui/widgets/label.h2
-rw-r--r--src/gui/widgets/layout.h2
-rw-r--r--src/gui/widgets/layouthelper.h2
-rw-r--r--src/gui/widgets/listbox.h2
-rw-r--r--src/gui/widgets/namesmodel.h2
-rw-r--r--src/gui/widgets/passwordfield.h2
-rw-r--r--src/gui/widgets/playerbox.h2
-rw-r--r--src/gui/widgets/popup.h2
-rw-r--r--src/gui/widgets/progressbar.h2
-rw-r--r--src/gui/widgets/progressindicator.h16
-rw-r--r--src/gui/widgets/radiobutton.h2
-rw-r--r--src/gui/widgets/radiogroup.h2
-rw-r--r--src/gui/widgets/scrollarea.h2
-rw-r--r--src/gui/widgets/setupitem.h20
-rw-r--r--src/gui/widgets/setuptab.h46
-rw-r--r--src/gui/widgets/setuptabscroll.h2
-rw-r--r--src/gui/widgets/shopitems.h2
-rw-r--r--src/gui/widgets/shoplistbox.h2
-rw-r--r--src/gui/widgets/shortcutcontainer.h2
-rw-r--r--src/gui/widgets/slider.h2
-rw-r--r--src/gui/widgets/sliderlist.h2
-rw-r--r--src/gui/widgets/spellshortcutcontainer.h2
-rw-r--r--src/gui/widgets/tab.h3
-rw-r--r--src/gui/widgets/tabbedarea.h2
-rw-r--r--src/gui/widgets/tablemodel.h2
-rw-r--r--src/gui/widgets/tabstrip.h2
-rw-r--r--src/gui/widgets/textbox.h2
-rw-r--r--src/gui/widgets/textfield.h2
-rw-r--r--src/gui/widgets/textpreview.h2
-rw-r--r--src/gui/widgets/tradetab.h2
-rw-r--r--src/gui/widgets/vertcontainer.h2
-rw-r--r--src/gui/widgets/whispertab.h2
-rw-r--r--src/gui/widgets/widgetgroup.h2
-rw-r--r--src/gui/widgets/window.h2
-rw-r--r--src/gui/windowmenu.h2
-rw-r--r--src/gui/worldselectdialog.h2
-rw-r--r--src/guild.h4
-rw-r--r--src/guildmanager.h2
-rw-r--r--src/imageparticle.h2
-rw-r--r--src/imagesprite.h2
-rw-r--r--src/inputmanager.h2
-rw-r--r--src/inventory.cpp1
-rw-r--r--src/inventory.h2
-rw-r--r--src/item.h4
-rw-r--r--src/itemshortcut.h2
-rw-r--r--src/joystick.h2
-rw-r--r--src/keyboardconfig.h2
-rw-r--r--src/keyevent.h2
-rw-r--r--src/localconsts.h7
-rw-r--r--src/localplayer.h2
-rw-r--r--src/logger.h2
-rw-r--r--src/map.h6
-rw-r--r--src/maplayer.h15
-rw-r--r--src/mumblemanager.h2
-rw-r--r--src/normalopenglgraphics.h2
-rw-r--r--src/particle.h2
-rw-r--r--src/particlecontainer.h7
-rw-r--r--src/party.h3
-rw-r--r--src/playerrelations.h5
-rw-r--r--src/rotationalparticle.h2
-rw-r--r--src/safeopenglgraphics.h3
-rw-r--r--src/shopitem.h2
-rw-r--r--src/simpleanimation.h2
-rw-r--r--src/sound.h3
-rw-r--r--src/spellmanager.h2
-rw-r--r--src/spellshortcut.h2
-rw-r--r--src/statuseffect.h2
-rw-r--r--src/text.h4
-rw-r--r--src/textcommand.h2
-rw-r--r--src/textmanager.h12
-rw-r--r--src/textparticle.h2
-rw-r--r--src/textrenderer.h2
-rw-r--r--src/tileset.h2
-rw-r--r--src/units.h2
196 files changed, 567 insertions, 65 deletions
diff --git a/src/actor.h b/src/actor.h
index 6a1a18e95..cb7046cc0 100644
--- a/src/actor.h
+++ b/src/actor.h
@@ -39,6 +39,8 @@ class Actor
public:
Actor();
+ A_DELETE_COPY(Actor);
+
virtual ~Actor();
/**
diff --git a/src/actorsprite.h b/src/actorsprite.h
index e9dbdb529..94778e49e 100644
--- a/src/actorsprite.h
+++ b/src/actorsprite.h
@@ -68,6 +68,8 @@ public:
ActorSprite(const int id);
+ A_DELETE_COPY(ActorSprite);
+
~ActorSprite();
int getId() const
diff --git a/src/actorspritemanager.h b/src/actorspritemanager.h
index 3c134406a..682b39054 100644
--- a/src/actorspritemanager.h
+++ b/src/actorspritemanager.h
@@ -38,6 +38,8 @@ class ActorSpriteManager final: public ConfigListener
public:
ActorSpriteManager();
+ A_DELETE_COPY(ActorSpriteManager);
+
~ActorSpriteManager();
/**
diff --git a/src/animatedsprite.h b/src/animatedsprite.h
index 38fc73214..a56d4bff3 100644
--- a/src/animatedsprite.h
+++ b/src/animatedsprite.h
@@ -44,6 +44,8 @@ class AnimatedSprite final : public Sprite
*/
AnimatedSprite(SpriteDef *const sprite);
+ A_DELETE_COPY(AnimatedSprite);
+
/**
* An helper function, which will request the sprite to animate
* from the resource manager.
diff --git a/src/animationdelayload.h b/src/animationdelayload.h
index 2d24e4a99..9e86f67db 100644
--- a/src/animationdelayload.h
+++ b/src/animationdelayload.h
@@ -33,6 +33,8 @@ class AnimationDelayLoad final
AnimationDelayLoad(const std::string &fileName,
const int variant, AnimatedSprite *const sprite);
+ A_DELETE_COPY(AnimationDelayLoad);
+
~AnimationDelayLoad();
void clearSprite();
diff --git a/src/animationparticle.h b/src/animationparticle.h
index 8fd55f38b..e744cd332 100644
--- a/src/animationparticle.h
+++ b/src/animationparticle.h
@@ -39,6 +39,8 @@ class AnimationParticle final : public ImageParticle
AnimationParticle(Map *const map, XmlNodePtr const animationNode,
const std::string& dyePalettes = std::string());
+ A_DELETE_COPY(AnimationParticle);
+
~AnimationParticle();
virtual bool update() override;
diff --git a/src/auctionmanager.h b/src/auctionmanager.h
index b43a3914b..ef025b6fc 100644
--- a/src/auctionmanager.h
+++ b/src/auctionmanager.h
@@ -34,6 +34,8 @@ class AuctionManager final
public:
AuctionManager();
+ A_DELETE_COPY(AuctionManager);
+
~AuctionManager();
static void init();
diff --git a/src/avatar.h b/src/avatar.h
index d329f81a9..51505bfbc 100644
--- a/src/avatar.h
+++ b/src/avatar.h
@@ -23,6 +23,8 @@
#ifndef AVATAR_H
#define AVATAR_H
+#include "localconsts.h"
+
#include <string>
enum AvatarType
@@ -35,6 +37,8 @@ class Avatar
public:
Avatar(const std::string &name = "");
+ A_DELETE_COPY(Avatar);
+
virtual ~Avatar()
{ }
diff --git a/src/being.cpp b/src/being.cpp
index c55fba9dd..3b35ad9f0 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -86,6 +86,8 @@ class BeingCacheEntry final
{
}
+ A_DELETE_COPY(BeingCacheEntry);
+
int getId() const
{ return mId; }
diff --git a/src/being.h b/src/being.h
index d16670dbb..37b752551 100644
--- a/src/being.h
+++ b/src/being.h
@@ -76,6 +76,8 @@ class BeingEquipBackend final : public Equipment::Backend
public:
BeingEquipBackend(Being *const being);
+ A_DELETE_COPY(BeingEquipBackend);
+
virtual ~BeingEquipBackend();
Item *getEquipment(const int index) const;
@@ -169,6 +171,8 @@ class Being : public ActorSprite, public ConfigListener
Being(const int id, const Type type, const uint16_t subtype,
Map *const map);
+ A_DELETE_COPY(Being);
+
virtual ~Being();
Type getType() const
diff --git a/src/channel.h b/src/channel.h
index 5041e0735..63826082b 100644
--- a/src/channel.h
+++ b/src/channel.h
@@ -43,6 +43,8 @@ class Channel final
const std::string &name,
const std::string &announcement = std::string());
+ A_DELETE_COPY(Channel);
+
~Channel();
/**
diff --git a/src/channelmanager.h b/src/channelmanager.h
index 3a0f33301..209897db8 100644
--- a/src/channelmanager.h
+++ b/src/channelmanager.h
@@ -34,6 +34,7 @@ class ChannelManager final
{
public:
ChannelManager();
+ A_DELETE_COPY(ChannelManager);
~ChannelManager();
Channel *findById(const int id) const;
diff --git a/src/chatlogger.h b/src/chatlogger.h
index a2a344800..c94890ad4 100644
--- a/src/chatlogger.h
+++ b/src/chatlogger.h
@@ -36,6 +36,8 @@ class ChatLogger final
*/
ChatLogger();
+ A_DELETE_COPY(ChatLogger);
+
/**
* Destructor, closes log file.
*/
diff --git a/src/client.h b/src/client.h
index 76a98d554..f25e30297 100644
--- a/src/client.h
+++ b/src/client.h
@@ -199,6 +199,9 @@ public:
};
Client(const Options &options);
+
+ A_DELETE_COPY(Client);
+
~Client();
/**
diff --git a/src/commandhandler.h b/src/commandhandler.h
index 980c39b5c..3063db970 100644
--- a/src/commandhandler.h
+++ b/src/commandhandler.h
@@ -45,6 +45,8 @@ class CommandHandler final
*/
CommandHandler();
+ A_DELETE_COPY(CommandHandler);
+
/**
* Destructor
*/
diff --git a/src/compoundsprite.h b/src/compoundsprite.h
index b18b9a3ae..e53c5a463 100644
--- a/src/compoundsprite.h
+++ b/src/compoundsprite.h
@@ -36,6 +36,8 @@ class CompoundItem final
public:
CompoundItem();
+ A_DELETE_COPY(CompoundItem);
+
~CompoundItem();
// float alpha;
@@ -52,6 +54,8 @@ public:
CompoundSprite();
+ A_DELETE_COPY(CompoundSprite);
+
~CompoundSprite();
virtual bool reset() override;
diff --git a/src/configuration.h b/src/configuration.h
index 46ba4165a..8e2df7ca6 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -227,6 +227,8 @@ class Configuration final : public ConfigurationObject
public:
Configuration();
+ A_DELETE_COPY(Configuration);
+
~Configuration();
/**
diff --git a/src/dropshortcut.h b/src/dropshortcut.h
index 8294163d6..3e23a10fd 100644
--- a/src/dropshortcut.h
+++ b/src/dropshortcut.h
@@ -40,6 +40,8 @@ class DropShortcut final
*/
DropShortcut();
+ A_DELETE_COPY(DropShortcut);
+
/**
* Destructor.
*/
diff --git a/src/effectmanager.h b/src/effectmanager.h
index b877b2cf1..4fbebc42b 100644
--- a/src/effectmanager.h
+++ b/src/effectmanager.h
@@ -42,6 +42,9 @@ class EffectManager final
};
EffectManager();
+
+ A_DELETE_COPY(EffectManager);
+
~EffectManager();
/**
diff --git a/src/emoteshortcut.h b/src/emoteshortcut.h
index cbef84cd0..91f7c1d76 100644
--- a/src/emoteshortcut.h
+++ b/src/emoteshortcut.h
@@ -37,6 +37,8 @@ class EmoteShortcut final
*/
EmoteShortcut();
+ A_DELETE_COPY(EmoteShortcut);
+
/**
* Destructor.
*/
diff --git a/src/equipment.h b/src/equipment.h
index 5b38a7f2d..9bbb3e0bf 100644
--- a/src/equipment.h
+++ b/src/equipment.h
@@ -38,6 +38,8 @@ class Equipment
Equipment(): mBackend(nullptr)
{ }
+ A_DELETE_COPY(Equipment);
+
/**
* Destructor.
*/
diff --git a/src/flooritem.h b/src/flooritem.h
index 59786a8e0..ef0bc454d 100644
--- a/src/flooritem.h
+++ b/src/flooritem.h
@@ -50,6 +50,8 @@ class FloorItem final : public ActorSprite
Map *const map, const int amount, const unsigned char color,
int subX, int subY);
+ A_DELETE_COPY(FloorItem);
+
Type getType() const override
{ return FLOOR_ITEM; }
diff --git a/src/game.h b/src/game.h
index 5bada817a..6be43c169 100644
--- a/src/game.h
+++ b/src/game.h
@@ -57,6 +57,8 @@ class Game final
*/
Game();
+ A_DELETE_COPY(Game);
+
/**
* Destructor, cleans up the game.
*/
diff --git a/src/graphics.h b/src/graphics.h
index efe5d56b5..076633269 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -55,6 +55,11 @@ static const int defaultScreenHeight = 600;
class ImageRect final
{
public:
+ ImageRect()
+ { }
+
+ A_DELETE_COPY(ImageRect);
+
enum ImagePosition
{
UPPER_LEFT = 0,
@@ -88,6 +93,8 @@ class Graphics : public gcn::SDLGraphics
*/
Graphics();
+ A_DELETE_COPY(Graphics);
+
/**
* Destructor.
*/
diff --git a/src/graphicsmanager.h b/src/graphicsmanager.h
index db2a8afc4..3f2007919 100644
--- a/src/graphicsmanager.h
+++ b/src/graphicsmanager.h
@@ -46,6 +46,8 @@ class GraphicsManager final
public:
GraphicsManager();
+ A_DELETE_COPY(GraphicsManager);
+
virtual ~GraphicsManager();
void initGraphics(bool noOpenGL);
diff --git a/src/graphicsvertexes.h b/src/graphicsvertexes.h
index c7e9b1961..880370beb 100644
--- a/src/graphicsvertexes.h
+++ b/src/graphicsvertexes.h
@@ -54,6 +54,8 @@ class SDLGraphicsVertexes final
public:
SDLGraphicsVertexes();
+ A_DELETE_COPY(SDLGraphicsVertexes);
+
~SDLGraphicsVertexes();
std::vector<DoubleRect*> mList;
@@ -69,6 +71,8 @@ class NormalOpenGLGraphicsVertexes final
public:
NormalOpenGLGraphicsVertexes();
+ A_DELETE_COPY(NormalOpenGLGraphicsVertexes);
+
~NormalOpenGLGraphicsVertexes();
GLfloat *switchFloatTexArray();
@@ -124,6 +128,8 @@ class ImageVertexes final
public:
ImageVertexes();
+ A_DELETE_COPY(ImageVertexes);
+
~ImageVertexes();
Image *image;
@@ -139,6 +145,8 @@ class GraphicsVertexes final
public:
GraphicsVertexes();
+ A_DELETE_COPY(GraphicsVertexes);
+
~GraphicsVertexes();
static void setLoadAsOpenGL(int useOpenGL);
diff --git a/src/gui/beingpopup.h b/src/gui/beingpopup.h
index a1f5c0cbd..c0c8f46ea 100644
--- a/src/gui/beingpopup.h
+++ b/src/gui/beingpopup.h
@@ -38,6 +38,8 @@ class BeingPopup final : public Popup
*/
BeingPopup();
+ A_DELETE_COPY(BeingPopup);
+
/**
* Destructor. Cleans up the being popup on deletion.
*/
diff --git a/src/gui/botcheckerwindow.h b/src/gui/botcheckerwindow.h
index b4159f9fb..0d93cc14c 100644
--- a/src/gui/botcheckerwindow.h
+++ b/src/gui/botcheckerwindow.h
@@ -59,6 +59,8 @@ class BotCheckerWindow final : public Window,
*/
BotCheckerWindow();
+ A_DELETE_COPY(BotCheckerWindow);
+
/**
* Destructor.
*/
diff --git a/src/gui/buydialog.h b/src/gui/buydialog.h
index 95e232acd..3bdf3a845 100644
--- a/src/gui/buydialog.h
+++ b/src/gui/buydialog.h
@@ -62,6 +62,8 @@ class BuyDialog final : public Window, public gcn::ActionListener,
*/
BuyDialog(std::string nick);
+ A_DELETE_COPY(BuyDialog);
+
/**
* Destructor
*/
diff --git a/src/gui/buyselldialog.h b/src/gui/buyselldialog.h
index 298c292c2..1eb6d34f4 100644
--- a/src/gui/buyselldialog.h
+++ b/src/gui/buyselldialog.h
@@ -50,6 +50,8 @@ class BuySellDialog final : public Window, public gcn::ActionListener
BuySellDialog(std::string nick);
+ A_DELETE_COPY(BuySellDialog);
+
virtual ~BuySellDialog();
void init();
diff --git a/src/gui/changeemaildialog.h b/src/gui/changeemaildialog.h
index 2110fbed7..c8e99a2c5 100644
--- a/src/gui/changeemaildialog.h
+++ b/src/gui/changeemaildialog.h
@@ -52,6 +52,8 @@ class ChangeEmailDialog final : public Window, public gcn::ActionListener
*/
ChangeEmailDialog(LoginData *const data);
+ A_DELETE_COPY(ChangeEmailDialog);
+
/**
* Destructor.
*/
diff --git a/src/gui/changepassworddialog.h b/src/gui/changepassworddialog.h
index aeece4d33..6dd987a32 100644
--- a/src/gui/changepassworddialog.h
+++ b/src/gui/changepassworddialog.h
@@ -52,6 +52,8 @@ class ChangePasswordDialog final : public Window, public gcn::ActionListener
*/
ChangePasswordDialog(LoginData *const data);
+ A_DELETE_COPY(ChangePasswordDialog);
+
/**
* Destructor
*/
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index beedd7a5e..256b49465 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -56,6 +56,8 @@ class CharCreateDialog final : public Window,
*/
CharCreateDialog(CharSelectDialog *const parent, const int slot);
+ A_DELETE_COPY(CharCreateDialog);
+
/**
* Destructor.
*/
diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h
index 7f0ebfb2f..91cfa7e43 100644
--- a/src/gui/charselectdialog.h
+++ b/src/gui/charselectdialog.h
@@ -68,6 +68,8 @@ class CharSelectDialog final : public Window,
*/
CharSelectDialog(LoginData *const data);
+ A_DELETE_COPY(CharSelectDialog);
+
~CharSelectDialog();
void action(const gcn::ActionEvent &event) override;
diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h
index 012666d97..a9531b404 100644
--- a/src/gui/chatwindow.h
+++ b/src/gui/chatwindow.h
@@ -96,6 +96,8 @@ class ChatWindow final : public Window,
*/
ChatWindow();
+ A_DELETE_COPY(ChatWindow);
+
/**
* Destructor: used to write back values to the config file
*/
diff --git a/src/gui/confirmdialog.h b/src/gui/confirmdialog.h
index fc5e77889..471cc8a4d 100644
--- a/src/gui/confirmdialog.h
+++ b/src/gui/confirmdialog.h
@@ -48,6 +48,8 @@ class ConfirmDialog : public Window, public gcn::ActionListener
const bool ignore = false, const bool modal = false,
Window *const parent = nullptr);
+ A_DELETE_COPY(ConfirmDialog);
+
/**
* Called when receiving actions from the widgets.
*/
diff --git a/src/gui/connectiondialog.h b/src/gui/connectiondialog.h
index eb528868d..0241c0184 100644
--- a/src/gui/connectiondialog.h
+++ b/src/gui/connectiondialog.h
@@ -47,6 +47,8 @@ class ConnectionDialog final : public Window, private gcn::ActionListener
*/
ConnectionDialog(const std::string &text, const State cancelState);
+ A_DELETE_COPY(ConnectionDialog);
+
/**
* Called when the user presses Cancel. Restores the global state to
* the previous one.
diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h
index 95c2dd468..4d438921b 100644
--- a/src/gui/debugwindow.h
+++ b/src/gui/debugwindow.h
@@ -41,6 +41,8 @@ class DebugTab : public Container
Container()
{ }
+ A_DELETE_COPY(DebugTab);
+
void logic() override = 0;
void resize(const int x, const int y)
@@ -56,6 +58,8 @@ class MapDebugTab final : public DebugTab
public:
MapDebugTab();
+ A_DELETE_COPY(MapDebugTab);
+
void logic() override;
private:
@@ -80,6 +84,8 @@ class TargetDebugTab final : public DebugTab
public:
TargetDebugTab();
+ A_DELETE_COPY(TargetDebugTab);
+
void logic() override;
private:
@@ -102,6 +108,8 @@ class NetDebugTab final : public DebugTab
public:
NetDebugTab();
+ A_DELETE_COPY(NetDebugTab);
+
void logic() override;
private:
@@ -123,6 +131,8 @@ class DebugWindow final : public Window
*/
DebugWindow();
+ A_DELETE_COPY(DebugWindow);
+
~DebugWindow();
/**
diff --git a/src/gui/didyouknowwindow.h b/src/gui/didyouknowwindow.h
index b0850bf64..e3b467685 100644
--- a/src/gui/didyouknowwindow.h
+++ b/src/gui/didyouknowwindow.h
@@ -51,6 +51,8 @@ class DidYouKnowWindow final : public Window,
*/
DidYouKnowWindow();
+ A_DELETE_COPY(DidYouKnowWindow);
+
/**
* Called when receiving actions from the widgets.
*/
diff --git a/src/gui/editdialog.h b/src/gui/editdialog.h
index 20c88db19..e42743f5f 100644
--- a/src/gui/editdialog.h
+++ b/src/gui/editdialog.h
@@ -51,6 +51,8 @@ class EditDialog final : public Window, public gcn::ActionListener
std::string eventOk = ACTION_EDIT_OK, const int width = 300,
Window *const parent = nullptr, const bool modal = true);
+ A_DELETE_COPY(EditDialog);
+
/**
* Called when receiving actions from the widgets.
*/
diff --git a/src/gui/editserverdialog.h b/src/gui/editserverdialog.h
index 758a2fbf4..363134534 100644
--- a/src/gui/editserverdialog.h
+++ b/src/gui/editserverdialog.h
@@ -84,6 +84,8 @@ class EditServerDialog final : public Window,
EditServerDialog(ServerDialog *const parent, ServerInfo server,
const int index);
+ A_DELETE_COPY(EditServerDialog);
+
~EditServerDialog();
/**
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index 55e13a180..6a7158922 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -55,6 +55,8 @@ struct EquipmentBox final
x(x0), y(y0), image(img)
{ }
+ A_DELETE_COPY(EquipmentBox);
+
int x;
int y;
Image *image;
@@ -74,6 +76,8 @@ class EquipmentWindow final : public Window, public gcn::ActionListener
EquipmentWindow(Equipment *const equipment, Being *const being,
const bool foring = false);
+ A_DELETE_COPY(EquipmentWindow);
+
/**
* Destructor.
*/
diff --git a/src/gui/focushandler.h b/src/gui/focushandler.h
index f5aa3e8fb..71cec2ea4 100644
--- a/src/gui/focushandler.h
+++ b/src/gui/focushandler.h
@@ -37,6 +37,11 @@
class FocusHandler final : public gcn::FocusHandler
{
public:
+ FocusHandler()
+ { }
+
+ A_DELETE_COPY(FocusHandler);
+
/**
* Sets modal focus to a widget. When there is already a modal widget
* then that widget loses modal focus and will regain it after this
@@ -62,6 +67,7 @@ class FocusHandler final : public gcn::FocusHandler
* widgets is tabbed to when tabbing through focusable elements.
*/
void tabNext();
+
void tabPrevious();
private:
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index f52902f4e..463ba9803 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -315,7 +315,7 @@ bool Gui::handleKeyInput2()
while (!mInput->isKeyQueueEmpty())
{
- KeyInput keyInput = guiInput->dequeueKeyInput2();
+ const KeyInput keyInput = guiInput->dequeueKeyInput2();
// Save modifiers state
mShiftPressed = keyInput.isShiftPressed();
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 4766a4bf4..c450e55a8 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -54,6 +54,8 @@ class Gui final : public gcn::Gui
*/
Gui(Graphics *const screen);
+ A_DELETE_COPY(Gui);
+
/**
* Destructor.
*/
diff --git a/src/gui/helpwindow.h b/src/gui/helpwindow.h
index 1a3d0a6d7..75608a435 100644
--- a/src/gui/helpwindow.h
+++ b/src/gui/helpwindow.h
@@ -57,6 +57,8 @@ class HelpWindow final : public Window, public LinkHandler,
*/
HelpWindow();
+ A_DELETE_COPY(HelpWindow);
+
/**
* Called when receiving actions from the widgets.
*/
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index 75a5df7ec..39969364d 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -68,6 +68,8 @@ class InventoryWindow final : public Window,
*/
InventoryWindow(Inventory *const inventory);
+ A_DELETE_COPY(InventoryWindow);
+
/**
* Destructor.
*/
diff --git a/src/gui/itemamountwindow.h b/src/gui/itemamountwindow.h
index bf8b734fe..688450a20 100644
--- a/src/gui/itemamountwindow.h
+++ b/src/gui/itemamountwindow.h
@@ -62,6 +62,8 @@ class ItemAmountWindow final : public Window,
ShopSellAdd
};
+ A_DELETE_COPY(ItemAmountWindow);
+
/**
* Called when receiving actions from widget.
*/
diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h
index 47fd8a09f..bb33832c1 100644
--- a/src/gui/itempopup.h
+++ b/src/gui/itempopup.h
@@ -52,6 +52,8 @@ class ItemPopup final : public Popup
*/
ItemPopup();
+ A_DELETE_COPY(ItemPopup);
+
/**
* Destructor. Cleans up the item popup on deletion.
*/
diff --git a/src/gui/killstats.h b/src/gui/killstats.h
index 6ae4a6575..165178921 100644
--- a/src/gui/killstats.h
+++ b/src/gui/killstats.h
@@ -47,6 +47,8 @@ class KillStats final : public Window,
*/
KillStats();
+ A_DELETE_COPY(KillStats);
+
/**
* Destructor.
*/
diff --git a/src/gui/logindialog.h b/src/gui/logindialog.h
index b75c17836..0b8584d71 100644
--- a/src/gui/logindialog.h
+++ b/src/gui/logindialog.h
@@ -62,6 +62,8 @@ class LoginDialog final : public Window, public gcn::ActionListener,
LoginDialog(LoginData *const data, std::string serverName,
std::string *const updateHost);
+ A_DELETE_COPY(LoginDialog);
+
~LoginDialog();
/**
diff --git a/src/gui/minimap.h b/src/gui/minimap.h
index 5dffbb788..c744f2af2 100644
--- a/src/gui/minimap.h
+++ b/src/gui/minimap.h
@@ -42,6 +42,9 @@ class Minimap final : public Window
{
public:
Minimap();
+
+ A_DELETE_COPY(Minimap);
+
~Minimap();
/**
diff --git a/src/gui/ministatuswindow.h b/src/gui/ministatuswindow.h
index fe372c97d..4d2693ddc 100644
--- a/src/gui/ministatuswindow.h
+++ b/src/gui/ministatuswindow.h
@@ -48,6 +48,8 @@ class MiniStatusWindow final : public Popup,
public:
MiniStatusWindow();
+ A_DELETE_COPY(MiniStatusWindow);
+
~MiniStatusWindow();
/**
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h
index be021d50f..9a50f69c3 100644
--- a/src/gui/npcdialog.h
+++ b/src/gui/npcdialog.h
@@ -66,6 +66,8 @@ class NpcDialog final : public Window, public gcn::ActionListener,
*/
NpcDialog(const int npcId);
+ A_DELETE_COPY(NpcDialog);
+
~NpcDialog();
/**
diff --git a/src/gui/npcpostdialog.h b/src/gui/npcpostdialog.h
index a13a25d2f..49d8fc729 100644
--- a/src/gui/npcpostdialog.h
+++ b/src/gui/npcpostdialog.h
@@ -38,6 +38,8 @@ public:
*/
NpcPostDialog(const int npcId);
+ A_DELETE_COPY(NpcPostDialog);
+
~NpcPostDialog();
/**
diff --git a/src/gui/okdialog.h b/src/gui/okdialog.h
index 4ef32e4e2..97642ca71 100644
--- a/src/gui/okdialog.h
+++ b/src/gui/okdialog.h
@@ -55,6 +55,8 @@ class OkDialog final : public Window, public gcn::ActionListener
const int soundEvent = DIALOG_OK, const bool modal = true,
const bool showCenter = true, Window *const parent = nullptr);
+ A_DELETE_COPY(OkDialog);
+
/**
* Called when receiving actions from the widgets.
*/
diff --git a/src/gui/outfitwindow.h b/src/gui/outfitwindow.h
index da0dedb59..cbf0a7eb3 100644
--- a/src/gui/outfitwindow.h
+++ b/src/gui/outfitwindow.h
@@ -50,6 +50,8 @@ class OutfitWindow final : public Window, private gcn::ActionListener
*/
OutfitWindow();
+ A_DELETE_COPY(OutfitWindow);
+
/**
* Destructor.
*/
diff --git a/src/gui/palette.h b/src/gui/palette.h
index a69a373b9..e5a4b8797 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -56,6 +56,8 @@ class Palette
RAINBOW
};
+ A_DELETE_COPY(Palette);
+
/**
* Returns the color associated with a character, if it exists. Returns
* Palette::BLACK if the character is not found.
diff --git a/src/gui/popupmenu.h b/src/gui/popupmenu.h
index b797138be..efbf2bbe4 100644
--- a/src/gui/popupmenu.h
+++ b/src/gui/popupmenu.h
@@ -50,6 +50,8 @@ class RenameListener final : public gcn::ActionListener
public:
RenameListener();
+ A_DELETE_COPY(RenameListener);
+
void action(const gcn::ActionEvent &event) override;
void setMapItem(MapItem* mapItem)
@@ -68,6 +70,8 @@ class PlayerListener : public gcn::ActionListener
public:
PlayerListener();
+ A_DELETE_COPY(PlayerListener);
+
void action(const gcn::ActionEvent &event) override;
void setNick(std::string name)
@@ -96,6 +100,8 @@ class PopupMenu final : public Popup, public LinkHandler
*/
PopupMenu();
+ A_DELETE_COPY(PopupMenu);
+
/**
* Shows the being related popup menu at the specified mouse coords.
*/
diff --git a/src/gui/questswindow.h b/src/gui/questswindow.h
index 43a3e9758..de7b0229a 100644
--- a/src/gui/questswindow.h
+++ b/src/gui/questswindow.h
@@ -51,6 +51,8 @@ class QuestsWindow final : public Window, public gcn::ActionListener
*/
QuestsWindow();
+ A_DELETE_COPY(QuestsWindow);
+
~QuestsWindow();
/**
diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h
index 965e50226..38bea4772 100644
--- a/src/gui/quitdialog.h
+++ b/src/gui/quitdialog.h
@@ -52,6 +52,8 @@ class QuitDialog final : public Window, public gcn::ActionListener,
*/
QuitDialog(QuitDialog **const pointerToMe);
+ A_DELETE_COPY(QuitDialog);
+
/**
* Destructor
*/
diff --git a/src/gui/registerdialog.h b/src/gui/registerdialog.h
index bc73e3a8d..074fbd6fe 100644
--- a/src/gui/registerdialog.h
+++ b/src/gui/registerdialog.h
@@ -49,7 +49,11 @@ class WrongDataNoticeListener final : public gcn::ActionListener
{
public:
WrongDataNoticeListener();
+
+ A_DELETE_COPY(WrongDataNoticeListener);
+
void setTarget(gcn::TextField *const textField);
+
void action(const gcn::ActionEvent &event) override;
private:
gcn::TextField *mTarget;
@@ -72,6 +76,8 @@ class RegisterDialog final : public Window, public gcn::ActionListener,
*/
RegisterDialog(LoginData *const loginData);
+ A_DELETE_COPY(RegisterDialog);
+
/**
* Destructor
*/
diff --git a/src/gui/sdlfont.h b/src/gui/sdlfont.h
index 5d94d5f82..3a8b58e96 100644
--- a/src/gui/sdlfont.h
+++ b/src/gui/sdlfont.h
@@ -57,6 +57,8 @@ class SDLFont final : public gcn::Font
*/
SDLFont(std::string filename, const int size, const int style = 0);
+ A_DELETE_COPY(SDLFont);
+
/**
* Destructor.
*/
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp
index 0f261a386..a79752cba 100644
--- a/src/gui/sdlinput.cpp
+++ b/src/gui/sdlinput.cpp
@@ -77,14 +77,12 @@ bool SDLInput::isKeyQueueEmpty()
KeyInput SDLInput::dequeueKeyInput2()
{
- KeyInput keyInput;
-
if (mKeyInputQueue.empty())
{
throw GCN_EXCEPTION("The queue is empty.");
}
- keyInput = mKeyInputQueue.front();
+ KeyInput keyInput = mKeyInputQueue.front();
mKeyInputQueue.pop();
return keyInput;
diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h
index 1ea9a1b3e..afdbd525a 100644
--- a/src/gui/sdlinput.h
+++ b/src/gui/sdlinput.h
@@ -138,6 +138,8 @@ public:
*/
SDLInput();
+ A_DELETE_COPY(SDLInput);
+
/**
* Pushes an SDL event. It should be called at least once per frame to
* update input with user input.
diff --git a/src/gui/selldialog.h b/src/gui/selldialog.h
index 2315a3400..2edfd07cc 100644
--- a/src/gui/selldialog.h
+++ b/src/gui/selldialog.h
@@ -64,6 +64,8 @@ class SellDialog final : public Window,
*/
SellDialog(std::string nick);
+ A_DELETE_COPY(SellDialog);
+
/**
* Destructor
*/
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h
index c5f7d26e8..2939a7628 100644
--- a/src/gui/serverdialog.h
+++ b/src/gui/serverdialog.h
@@ -58,6 +58,8 @@ class ServersListModel final : public gcn::ListModel
ServersListModel(ServerInfos *const servers,
ServerDialog *const parent);
+ A_DELETE_COPY(ServersListModel);
+
/**
* Used to get number of line in the list
*/
@@ -103,6 +105,8 @@ class ServerDialog : public Window,
*/
ServerDialog(ServerInfo *const serverInfo, const std::string &dir);
+ A_DELETE_COPY(ServerDialog);
+
/**
* Destructor
*/
diff --git a/src/gui/setup.h b/src/gui/setup.h
index a33188369..3b22ed00b 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -50,6 +50,9 @@ class Setup final : public Window, public gcn::ActionListener
{
public:
Setup();
+
+ A_DELETE_COPY(Setup);
+
~Setup();
/**
diff --git a/src/gui/setup_audio.h b/src/gui/setup_audio.h
index 8019f2ea2..390eba2ec 100644
--- a/src/gui/setup_audio.h
+++ b/src/gui/setup_audio.h
@@ -34,6 +34,8 @@ class Setup_Audio final : public SetupTabScroll
public:
Setup_Audio();
+ A_DELETE_COPY(Setup_Audio);
+
~Setup_Audio();
void apply();
diff --git a/src/gui/setup_chat.h b/src/gui/setup_chat.h
index a14b05cd4..7937a7658 100644
--- a/src/gui/setup_chat.h
+++ b/src/gui/setup_chat.h
@@ -35,6 +35,8 @@ class Setup_Chat final : public SetupTabScroll
public:
Setup_Chat();
+ A_DELETE_COPY(Setup_Chat);
+
void apply();
};
diff --git a/src/gui/setup_colors.h b/src/gui/setup_colors.h
index 3f4c3012a..2f92bfc8f 100644
--- a/src/gui/setup_colors.h
+++ b/src/gui/setup_colors.h
@@ -46,9 +46,13 @@ class Setup_Colors final : public SetupTab,
{
public:
Setup_Colors();
+
+ A_DELETE_COPY(Setup_Colors);
+
~Setup_Colors();
void apply();
+
void cancel();
void action(const gcn::ActionEvent &event) override;
diff --git a/src/gui/setup_input.h b/src/gui/setup_input.h
index c8d863db5..9ce2a6cb3 100644
--- a/src/gui/setup_input.h
+++ b/src/gui/setup_input.h
@@ -44,6 +44,8 @@ class Setup_Input final : public SetupTab
*/
Setup_Input();
+ A_DELETE_COPY(Setup_Input);
+
/**
* Destructor
*/
diff --git a/src/gui/setup_joystick.h b/src/gui/setup_joystick.h
index b470b3cca..ee63fcff6 100644
--- a/src/gui/setup_joystick.h
+++ b/src/gui/setup_joystick.h
@@ -42,6 +42,8 @@ class Setup_Joystick final : public SetupTab
public:
Setup_Joystick();
+ A_DELETE_COPY(Setup_Joystick);
+
~Setup_Joystick();
void apply();
diff --git a/src/gui/setup_other.h b/src/gui/setup_other.h
index 22281022a..0e541f93a 100644
--- a/src/gui/setup_other.h
+++ b/src/gui/setup_other.h
@@ -35,6 +35,8 @@ class Setup_Other final : public SetupTabScroll
public:
Setup_Other();
+ A_DELETE_COPY(Setup_Other);
+
~Setup_Other();
void apply();
diff --git a/src/gui/setup_perfomance.h b/src/gui/setup_perfomance.h
index 0e03a145e..38097bbbc 100644
--- a/src/gui/setup_perfomance.h
+++ b/src/gui/setup_perfomance.h
@@ -35,6 +35,8 @@ class Setup_Perfomance final : public SetupTabScroll
public:
Setup_Perfomance();
+ A_DELETE_COPY(Setup_Perfomance);
+
void apply();
};
diff --git a/src/gui/setup_players.h b/src/gui/setup_players.h
index c9779786f..ca6d9019d 100644
--- a/src/gui/setup_players.h
+++ b/src/gui/setup_players.h
@@ -35,6 +35,8 @@ class Setup_Players final : public SetupTabScroll
public:
Setup_Players();
+ A_DELETE_COPY(Setup_Players);
+
void apply();
};
diff --git a/src/gui/setup_relations.h b/src/gui/setup_relations.h
index cc296527e..423eaef01 100644
--- a/src/gui/setup_relations.h
+++ b/src/gui/setup_relations.h
@@ -48,9 +48,13 @@ class Setup_Relations final : public SetupTab,
{
public:
Setup_Relations();
+
+ A_DELETE_COPY(Setup_Relations);
+
virtual ~Setup_Relations();
void apply();
+
void cancel();
void reset();
diff --git a/src/gui/setup_theme.h b/src/gui/setup_theme.h
index 35b89ea61..1da8ef1a7 100644
--- a/src/gui/setup_theme.h
+++ b/src/gui/setup_theme.h
@@ -44,9 +44,13 @@ class Setup_Theme final : public SetupTab
{
public:
Setup_Theme();
+
+ A_DELETE_COPY(Setup_Theme);
+
~Setup_Theme();
void apply();
+
void cancel();
void action(const gcn::ActionEvent &event) override;
diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h
index 5425e3da2..6f130c4ae 100644
--- a/src/gui/setup_video.h
+++ b/src/gui/setup_video.h
@@ -48,9 +48,13 @@ class Setup_Video final : public SetupTab, public gcn::KeyListener
{
public:
Setup_Video();
+
+ A_DELETE_COPY(Setup_Video);
+
~Setup_Video();
void apply();
+
void cancel();
void action(const gcn::ActionEvent &event) override;
diff --git a/src/gui/setup_visual.h b/src/gui/setup_visual.h
index 1daab2462..8311cf8af 100644
--- a/src/gui/setup_visual.h
+++ b/src/gui/setup_visual.h
@@ -29,6 +29,8 @@ class Setup_Visual final : public SetupTabScroll
public:
Setup_Visual();
+ A_DELETE_COPY(Setup_Visual);
+
~Setup_Visual();
void apply();
diff --git a/src/gui/shopwindow.h b/src/gui/shopwindow.h
index 420c3bef7..06787795a 100644
--- a/src/gui/shopwindow.h
+++ b/src/gui/shopwindow.h
@@ -65,6 +65,8 @@ class ShopWindow final : public Window, public gcn::ActionListener,
*/
ShopWindow();
+ A_DELETE_COPY(ShopWindow);
+
/**
* Destructor
*/
diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h
index 0991bb124..ff66f794b 100644
--- a/src/gui/shortcutwindow.h
+++ b/src/gui/shortcutwindow.h
@@ -48,6 +48,8 @@ class ShortcutWindow final : public Window
ShortcutWindow(const std::string &title, std::string skinFile = "",
const int width = 0, const int height = 0);
+ A_DELETE_COPY(ShortcutWindow);
+
/**
* Destructor.
*/
diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h
index 52a9281cf..1b5bb7394 100644
--- a/src/gui/skilldialog.h
+++ b/src/gui/skilldialog.h
@@ -65,6 +65,8 @@ struct SkillInfo final
SkillInfo();
+ A_DELETE_COPY(SkillInfo);
+
~SkillInfo();
void setIcon(const std::string &iconPath);
@@ -86,6 +88,8 @@ class SkillDialog final : public Window, public gcn::ActionListener
public:
SkillDialog();
+ A_DELETE_COPY(SkillDialog);
+
~SkillDialog();
/**
diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h
index 863ffdedf..f3c1479db 100644
--- a/src/gui/socialwindow.h
+++ b/src/gui/socialwindow.h
@@ -54,6 +54,8 @@ class SocialWindow final : public Window, private gcn::ActionListener
public:
SocialWindow();
+ A_DELETE_COPY(SocialWindow);
+
~SocialWindow();
bool addTab(Guild *const guild);
diff --git a/src/gui/specialswindow.h b/src/gui/specialswindow.h
index 56804ce74..b51606c71 100644
--- a/src/gui/specialswindow.h
+++ b/src/gui/specialswindow.h
@@ -44,6 +44,8 @@ class SpecialsWindow final : public Window, public gcn::ActionListener
public:
SpecialsWindow();
+ A_DELETE_COPY(SpecialsWindow);
+
~SpecialsWindow();
/**
diff --git a/src/gui/speechbubble.h b/src/gui/speechbubble.h
index 2a36eaa59..246ea8bd8 100644
--- a/src/gui/speechbubble.h
+++ b/src/gui/speechbubble.h
@@ -43,6 +43,8 @@ class SpeechBubble final : public Popup
*/
SpeechBubble();
+ A_DELETE_COPY(SpeechBubble);
+
/**
* Sets the name displayed for the speech bubble, and in what color.
*/
diff --git a/src/gui/spellpopup.h b/src/gui/spellpopup.h
index ace4dbdf9..51e43d0d5 100644
--- a/src/gui/spellpopup.h
+++ b/src/gui/spellpopup.h
@@ -48,6 +48,8 @@ class SpellPopup final : public Popup
*/
SpellPopup();
+ A_DELETE_COPY(SpellPopup);
+
/**
* Destructor. Cleans up the item popup on deletion.
*/
diff --git a/src/gui/statuspopup.h b/src/gui/statuspopup.h
index 380e93e48..cbccaf98d 100644
--- a/src/gui/statuspopup.h
+++ b/src/gui/statuspopup.h
@@ -50,6 +50,8 @@ class StatusPopup final : public Popup
*/
StatusPopup();
+ A_DELETE_COPY(StatusPopup);
+
/**
* Destructor. Cleans up the item popup on deletion.
*/
diff --git a/src/gui/statuswindow.h b/src/gui/statuswindow.h
index 25b86d505..dce48c8fc 100644
--- a/src/gui/statuswindow.h
+++ b/src/gui/statuswindow.h
@@ -57,6 +57,8 @@ class StatusWindow final : public Window,
*/
StatusWindow();
+ A_DELETE_COPY(StatusWindow);
+
void processEvent(Channels channel,
const DepricatedEvent &event) override;
diff --git a/src/gui/textcommandeditor.h b/src/gui/textcommandeditor.h
index c715e0faa..2639e2e39 100644
--- a/src/gui/textcommandeditor.h
+++ b/src/gui/textcommandeditor.h
@@ -50,6 +50,8 @@ class TextCommandEditor final : public Window, public gcn::ActionListener
*/
TextCommandEditor(TextCommand *const command);
+ A_DELETE_COPY(TextCommandEditor);
+
/**
* Destructor.
*/
diff --git a/src/gui/textdialog.h b/src/gui/textdialog.h
index c9f3b150d..33c9a5bd1 100644
--- a/src/gui/textdialog.h
+++ b/src/gui/textdialog.h
@@ -51,6 +51,8 @@ public:
TextDialog(const std::string &title, const std::string &msg,
Window *const parent = nullptr, const bool isPassword = false);
+ A_DELETE_COPY(TextDialog);
+
~TextDialog();
/**
diff --git a/src/gui/textpopup.h b/src/gui/textpopup.h
index fd901225a..7d6893b9f 100644
--- a/src/gui/textpopup.h
+++ b/src/gui/textpopup.h
@@ -46,6 +46,8 @@ class TextPopup final : public Popup
*/
TextPopup();
+ A_DELETE_COPY(TextPopup);
+
/**
* Destructor. Cleans up the item popup on deletion.
*/
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 730471ceb..61b45232b 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -60,7 +60,7 @@ static void initDefaultThemePath()
defaultThemePath = "themes/";
}
-Skin::Skin(const ImageRect &skin, const ImageRect &images,
+Skin::Skin(ImageRect *skin, const ImageRect *images,
const std::string &filePath, const std::string &name,
const int padding, const int titlePadding,
std::map<std::string, int> *const options):
@@ -68,10 +68,10 @@ Skin::Skin(const ImageRect &skin, const ImageRect &images,
mFilePath(filePath),
mName(name),
mBorder(skin),
- mCloseImage(images.grid[0]),
- mCloseImageHighlighted(images.grid[1]),
- mStickyImageUp(images.grid[2]),
- mStickyImageDown(images.grid[3]),
+ mCloseImage(images->grid[0]),
+ mCloseImageHighlighted(images->grid[1]),
+ mStickyImageUp(images->grid[2]),
+ mStickyImageDown(images->grid[3]),
mPadding(padding),
mTitlePadding(titlePadding),
mOptions(options)
@@ -89,10 +89,10 @@ Skin::~Skin()
// Clean up static resources
for (int i = 0; i < 9; i++)
{
- if (mBorder.grid[i])
+ if (mBorder->grid[i])
{
- mBorder.grid[i]->decRef();
- mBorder.grid[i] = nullptr;
+ mBorder->grid[i]->decRef();
+ mBorder->grid[i] = nullptr;
}
}
@@ -121,6 +121,7 @@ Skin::~Skin()
}
delete mOptions;
+ delete mBorder;
mOptions = nullptr;
}
@@ -132,8 +133,8 @@ void Skin::updateAlpha(const float minimumOpacityAllowed)
for (int i = 0; i < 9; i++)
{
- if (mBorder.grid[i])
- mBorder.grid[i]->setAlpha(alpha);
+ if (mBorder->grid[i])
+ mBorder->grid[i]->setAlpha(alpha);
}
if (mCloseImage)
@@ -148,26 +149,26 @@ void Skin::updateAlpha(const float minimumOpacityAllowed)
int Skin::getMinWidth() const
{
- if (!mBorder.grid[ImageRect::UPPER_LEFT]
- || !mBorder.grid[ImageRect::UPPER_RIGHT])
+ if (!mBorder->grid[ImageRect::UPPER_LEFT]
+ || !mBorder->grid[ImageRect::UPPER_RIGHT])
{
return 1;
}
- return mBorder.grid[ImageRect::UPPER_LEFT]->getWidth() +
- mBorder.grid[ImageRect::UPPER_RIGHT]->getWidth();
+ return mBorder->grid[ImageRect::UPPER_LEFT]->getWidth() +
+ mBorder->grid[ImageRect::UPPER_RIGHT]->getWidth();
}
int Skin::getMinHeight() const
{
- if (!mBorder.grid[ImageRect::UPPER_LEFT]
- || !mBorder.grid[ImageRect::LOWER_LEFT])
+ if (!mBorder->grid[ImageRect::UPPER_LEFT]
+ || !mBorder->grid[ImageRect::LOWER_LEFT])
{
return 1;
}
- return mBorder.grid[ImageRect::UPPER_LEFT]->getHeight() +
- mBorder.grid[ImageRect::LOWER_LEFT]->getHeight();
+ return mBorder->grid[ImageRect::UPPER_LEFT]->getHeight() +
+ mBorder->grid[ImageRect::LOWER_LEFT]->getHeight();
}
Theme::Theme():
@@ -441,10 +442,10 @@ Skin *Theme::readSkin(const std::string &filename, const bool full)
}
Image *const dBorders = Theme::getImageFromTheme(skinSetImage);
- ImageRect border;
- ImageRect images;
- memset(&border, 0, sizeof(ImageRect));
- memset(&images, 0, sizeof(ImageRect));
+ ImageRect *border = new ImageRect;
+ ImageRect *images = new ImageRect;
+ memset(border, 0, sizeof(ImageRect));
+ memset(images, 0, sizeof(ImageRect));
int padding = 3;
int titlePadding = 4;
int titlebarHeight = 20;
@@ -481,11 +482,11 @@ Skin *Theme::readSkin(const std::string &filename, const bool full)
helper.height = XML::getProperty(partNode, "height", 1);
helper.image = dBorders;
- helper.rect = &border;
+ helper.rect = border;
if (!helper.loadList(skinParam,
sizeof(skinParam) / sizeof(SkinParameter)))
{
- helper.rect = &images;
+ helper.rect = images;
helper.loadList(imageParam,
sizeof(imageParam) / sizeof(SkinParameter));
}
@@ -540,6 +541,7 @@ Skin *Theme::readSkin(const std::string &filename, const bool full)
Skin *const skin = new Skin(border, images, filename, "", padding,
titlePadding, mOptions);
+ delete images;
skin->updateAlpha(mMinimumOpacity);
return skin;
}
diff --git a/src/gui/theme.h b/src/gui/theme.h
index ee9352794..cbda2ee4d 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -42,11 +42,13 @@ class ProgressBar;
class Skin final
{
public:
- Skin(const ImageRect &skin, const ImageRect &images,
+ Skin(ImageRect *skin, const ImageRect *images,
const std::string &filePath, const std::string &name = "",
const int padding = 3, const int titlePadding = 4,
std::map<std::string, int> *const options = nullptr);
+ A_DELETE_COPY(Skin);
+
~Skin();
/**
@@ -67,7 +69,7 @@ class Skin final
* Returns the background skin.
*/
const ImageRect &getBorder() const
- { return mBorder; }
+ { return *mBorder; }
/**
* Returns the image used by a close button for this skin.
@@ -115,7 +117,7 @@ class Skin final
private:
std::string mFilePath; /**< File name path for the skin */
std::string mName; /**< Name of the skin to use */
- ImageRect mBorder; /**< The window border and background */
+ ImageRect *mBorder; /**< The window border and background */
Image *mCloseImage; /**< Close Button Image */
Image *mCloseImageHighlighted; /**< Highlighted close Button Image */
Image *mStickyImageUp; /**< Sticky Button Image */
@@ -128,6 +130,8 @@ class Skin final
class Theme final : public Palette, public ConfigListener
{
public:
+ A_DELETE_COPY(Theme);
+
static Theme *instance();
static void deleteInstance();
@@ -330,6 +334,7 @@ class Theme final : public Palette, public ConfigListener
private:
Theme();
+
~Theme();
Skin *readSkin(const std::string &filename0, const bool full);
diff --git a/src/gui/tradewindow.h b/src/gui/tradewindow.h
index 9785a1344..7a48cf9b3 100644
--- a/src/gui/tradewindow.h
+++ b/src/gui/tradewindow.h
@@ -57,6 +57,8 @@ class TradeWindow final : public Window,
*/
TradeWindow();
+ A_DELETE_COPY(TradeWindow);
+
/**
* Destructor.
*/
diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h
index 28f279444..fc16909b7 100644
--- a/src/gui/unregisterdialog.h
+++ b/src/gui/unregisterdialog.h
@@ -52,6 +52,8 @@ class UnRegisterDialog final : public Window, public gcn::ActionListener
*/
UnRegisterDialog(LoginData *const loginData);
+ A_DELETE_COPY(UnRegisterDialog);
+
~UnRegisterDialog();
/**
diff --git a/src/gui/updaterwindow.h b/src/gui/updaterwindow.h
index 2f934aee5..9f7134e6e 100644
--- a/src/gui/updaterwindow.h
+++ b/src/gui/updaterwindow.h
@@ -81,6 +81,8 @@ class UpdaterWindow final : public Window,
const std::string &updatesDir,
const bool applyUpdates, const int updateType);
+ A_DELETE_COPY(UpdaterWindow);
+
/**
* Destructor
*/
diff --git a/src/gui/userpalette.h b/src/gui/userpalette.h
index 2fb9c8904..20e7e0418 100644
--- a/src/gui/userpalette.h
+++ b/src/gui/userpalette.h
@@ -84,6 +84,8 @@ class UserPalette final : public Palette, public gcn::ListModel
*/
UserPalette();
+ A_DELETE_COPY(UserPalette);
+
/**
* Destructor
*/
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index b88702afe..89833d20e 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -70,6 +70,8 @@ class Viewport final : public WindowContainer,
*/
Viewport();
+ A_DELETE_COPY(Viewport);
+
/**
* Destructor.
*/
diff --git a/src/gui/whoisonline.h b/src/gui/whoisonline.h
index 4e0638ef1..6993a77e6 100644
--- a/src/gui/whoisonline.h
+++ b/src/gui/whoisonline.h
@@ -62,6 +62,8 @@ class OnlinePlayer final
{
}
+ A_DELETE_COPY(OnlinePlayer);
+
const std::string getNick() const
{ return mNick; }
@@ -117,6 +119,8 @@ public:
*/
WhoIsOnline();
+ A_DELETE_COPY(WhoIsOnline);
+
/**
* Destructor
*/
diff --git a/src/gui/widgets/avatarlistbox.h b/src/gui/widgets/avatarlistbox.h
index 803a80070..84c491cd2 100644
--- a/src/gui/widgets/avatarlistbox.h
+++ b/src/gui/widgets/avatarlistbox.h
@@ -48,6 +48,8 @@ class AvatarListBox final : public ListBox, public ConfigListener
public:
AvatarListBox(AvatarListModel *const model);
+ A_DELETE_COPY(AvatarListBox);
+
~AvatarListBox();
/**
diff --git a/src/gui/widgets/battletab.h b/src/gui/widgets/battletab.h
index 87b082901..83dc44499 100644
--- a/src/gui/widgets/battletab.h
+++ b/src/gui/widgets/battletab.h
@@ -33,6 +33,8 @@ class BattleTab final : public ChatTab
public:
BattleTab();
+ A_DELETE_COPY(BattleTab);
+
~BattleTab();
int getType() const override
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index 9cf74ef4f..7f9812a99 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -84,6 +84,8 @@ class BrowserBox final : public gcn::Widget,
BrowserBox(const unsigned int mode = AUTO_SIZE,
const bool opaque = true);
+ A_DELETE_COPY(BrowserBox);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 36f539b6a..d7e7ebf89 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -72,6 +72,8 @@ class Button final : public gcn::Button, public gcn::WidgetListener
const std::string &actionEventId,
gcn::ActionListener *const listener);
+ A_DELETE_COPY(Button);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/channeltab.h b/src/gui/widgets/channeltab.h
index 96b6dd6ac..d51e71511 100644
--- a/src/gui/widgets/channeltab.h
+++ b/src/gui/widgets/channeltab.h
@@ -33,6 +33,7 @@ class Channel;
class ChannelTab final : public ChatTab
{
public:
+ A_DELETE_COPY(ChannelTab);
Channel *getChannel() const
{ return mChannel; }
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index ba6698e50..2ab19814d 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -55,6 +55,8 @@ class ChatTab : public Tab
*/
ChatTab(const std::string &name);
+ A_DELETE_COPY(ChatTab);
+
~ChatTab();
/**
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index 54e9a5e0d..63569214a 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -44,6 +44,8 @@ class CheckBox final : public gcn::CheckBox
gcn::ActionListener *const listener = nullptr,
const std::string &eventId = "");
+ A_DELETE_COPY(CheckBox);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h
index d8fa7d36a..0a9759835 100644
--- a/src/gui/widgets/desktop.h
+++ b/src/gui/widgets/desktop.h
@@ -50,6 +50,9 @@ class Desktop final : public Container, private gcn::WidgetListener
{
public:
Desktop();
+
+ A_DELETE_COPY(Desktop);
+
~Desktop();
/**
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index f76a38b4d..97732db9b 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -52,6 +52,8 @@ class DropDown final : public gcn::DropDown
gcn::ActionListener *const listener = nullptr,
const std::string &eventId = "");
+ A_DELETE_COPY(DropDown);
+
~DropDown();
/**
diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h
index 337973412..8b591b3c0 100644
--- a/src/gui/widgets/dropshortcutcontainer.h
+++ b/src/gui/widgets/dropshortcutcontainer.h
@@ -44,6 +44,8 @@ class DropShortcutContainer final : public ShortcutContainer
*/
DropShortcutContainer();
+ A_DELETE_COPY(DropShortcutContainer);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h
index 736370a93..75b1e5a03 100644
--- a/src/gui/widgets/emoteshortcutcontainer.h
+++ b/src/gui/widgets/emoteshortcutcontainer.h
@@ -45,6 +45,8 @@ class EmoteShortcutContainer final : public ShortcutContainer
*/
EmoteShortcutContainer();
+ A_DELETE_COPY(EmoteShortcutContainer);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/extendedlistbox.h b/src/gui/widgets/extendedlistbox.h
index af3ae64a9..ac6c767c3 100644
--- a/src/gui/widgets/extendedlistbox.h
+++ b/src/gui/widgets/extendedlistbox.h
@@ -31,6 +31,8 @@ class ExtendedListBox final : public ListBox
*/
ExtendedListBox(gcn::ListModel *const listModel);
+ A_DELETE_COPY(ExtendedListBox);
+
~ExtendedListBox();
/**
diff --git a/src/gui/widgets/extendednamesmodel.h b/src/gui/widgets/extendednamesmodel.h
index a4b6013c2..52f162edb 100644
--- a/src/gui/widgets/extendednamesmodel.h
+++ b/src/gui/widgets/extendednamesmodel.h
@@ -32,6 +32,8 @@ class ExtendedNamesModel : public ExtendedListModel
public:
ExtendedNamesModel();
+ A_DELETE_COPY(ExtendedNamesModel);
+
virtual ~ExtendedNamesModel();
virtual int getNumberOfElements() override;
diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h
index d04dffb23..240290327 100644
--- a/src/gui/widgets/flowcontainer.h
+++ b/src/gui/widgets/flowcontainer.h
@@ -40,6 +40,8 @@ class FlowContainer final : public Container,
*/
FlowContainer(const int boxWidth, const int boxHeight);
+ A_DELETE_COPY(FlowContainer);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/guildchattab.h b/src/gui/widgets/guildchattab.h
index 54dd67a8d..4981ad41e 100644
--- a/src/gui/widgets/guildchattab.h
+++ b/src/gui/widgets/guildchattab.h
@@ -33,6 +33,8 @@ class GuildChatTab final : public ChatTab
public:
GuildChatTab();
+ A_DELETE_COPY(GuildChatTab);
+
~GuildChatTab();
bool handleCommand(const std::string &type,
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index 76fdb4b54..5953348fc 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -56,6 +56,8 @@ public:
GuiTable(TableModel *const initial_model = nullptr,
const bool opacity = true);
+ A_DELETE_COPY(GuiTable);
+
virtual ~GuiTable();
/**
diff --git a/src/gui/widgets/horizontcontainer.h b/src/gui/widgets/horizontcontainer.h
index 1db5bf7a8..334c00969 100644
--- a/src/gui/widgets/horizontcontainer.h
+++ b/src/gui/widgets/horizontcontainer.h
@@ -36,6 +36,8 @@ class HorizontContainer final : public Container, public gcn::WidgetListener
public:
HorizontContainer(const int height, const int spacing);
+ A_DELETE_COPY(HorizontContainer);
+
virtual void add(gcn::Widget *widget);
virtual void add(gcn::Widget *widget, int spacing);
diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h
index ec9c8319f..004d77c23 100644
--- a/src/gui/widgets/icon.h
+++ b/src/gui/widgets/icon.h
@@ -45,6 +45,8 @@ class Icon final : public gcn::Widget
*/
Icon(Image *const image);
+ A_DELETE_COPY(Icon);
+
/**
* Gets the current Image.
*/
diff --git a/src/gui/widgets/inttextfield.h b/src/gui/widgets/inttextfield.h
index 430ae4746..e846e0cbe 100644
--- a/src/gui/widgets/inttextfield.h
+++ b/src/gui/widgets/inttextfield.h
@@ -37,6 +37,8 @@ class IntTextField final : public TextField
IntTextField(const int def = 0, const int min = 0, const int max = 0,
const bool enabled = true, const int width = 0);
+ A_DELETE_COPY(IntTextField);
+
/**
* Sets the minimum and maximum values of the text box.
*/
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index e7bf11e48..867d837c2 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -63,6 +63,8 @@ class ItemContainer final : public gcn::Widget,
ItemContainer(Inventory *const inventory,
const bool forceQuantity = false);
+ A_DELETE_COPY(ItemContainer);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/itemlinkhandler.h b/src/gui/widgets/itemlinkhandler.h
index 35415a010..c50ea5dc2 100644
--- a/src/gui/widgets/itemlinkhandler.h
+++ b/src/gui/widgets/itemlinkhandler.h
@@ -32,6 +32,8 @@ class ItemLinkHandler final : public LinkHandler
public:
ItemLinkHandler();
+ A_DELETE_COPY(ItemLinkHandler);
+
~ItemLinkHandler();
void handleLink(const std::string &link,
diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h
index e7a13b45f..9b8bfe797 100644
--- a/src/gui/widgets/itemshortcutcontainer.h
+++ b/src/gui/widgets/itemshortcutcontainer.h
@@ -45,6 +45,8 @@ class ItemShortcutContainer final : public ShortcutContainer
*/
ItemShortcutContainer(const unsigned number);
+ A_DELETE_COPY(ItemShortcutContainer);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h
index fc82fa900..046f2ca00 100644
--- a/src/gui/widgets/label.h
+++ b/src/gui/widgets/label.h
@@ -44,6 +44,8 @@ class Label final : public gcn::Label
*/
Label(const std::string &caption);
+ A_DELETE_COPY(Label);
+
/**
* Draws the label.
*/
diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h
index beccfcb01..f5dab2d33 100644
--- a/src/gui/widgets/layout.h
+++ b/src/gui/widgets/layout.h
@@ -336,6 +336,8 @@ class Layout final : public LayoutCell
public:
Layout();
+ A_DELETE_COPY(Layout);
+
/**
* Sets the margin around the layout.
*/
diff --git a/src/gui/widgets/layouthelper.h b/src/gui/widgets/layouthelper.h
index 2285e15cd..72402f630 100644
--- a/src/gui/widgets/layouthelper.h
+++ b/src/gui/widgets/layouthelper.h
@@ -40,6 +40,8 @@ class LayoutHelper final : public gcn::WidgetListener
*/
LayoutHelper(gcn::Container *const container);
+ A_DELETE_COPY(LayoutHelper);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index efe6da57d..f484c8ad0 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -42,6 +42,8 @@ class ListBox : public gcn::ListBox
*/
ListBox(gcn::ListModel *const listModel);
+ A_DELETE_COPY(ListBox);
+
~ListBox();
/**
diff --git a/src/gui/widgets/namesmodel.h b/src/gui/widgets/namesmodel.h
index 69d9f3c56..47248e246 100644
--- a/src/gui/widgets/namesmodel.h
+++ b/src/gui/widgets/namesmodel.h
@@ -32,6 +32,8 @@ class NamesModel : public gcn::ListModel
public:
NamesModel();
+ A_DELETE_COPY(NamesModel);
+
virtual ~NamesModel();
virtual int getNumberOfElements() override;
diff --git a/src/gui/widgets/passwordfield.h b/src/gui/widgets/passwordfield.h
index 0444427ee..b5b2c4e53 100644
--- a/src/gui/widgets/passwordfield.h
+++ b/src/gui/widgets/passwordfield.h
@@ -38,6 +38,8 @@ class PasswordField final : public TextField
*/
PasswordField(const std::string &text = "");
+ A_DELETE_COPY(PasswordField);
+
/**
* Draws the password field.
*/
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index 3b3116294..4ae3c8866 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -49,6 +49,8 @@ class PlayerBox final : public gcn::ScrollArea
PlayerBox(std::string skin = "");
+ A_DELETE_COPY(PlayerBox);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h
index af7c8d5bd..26e73c183 100644
--- a/src/gui/widgets/popup.h
+++ b/src/gui/widgets/popup.h
@@ -60,6 +60,8 @@ class Popup : public Container, public gcn::MouseListener,
*/
Popup(const std::string &name = "", std::string skin = "");
+ A_DELETE_COPY(Popup);
+
/**
* Destructor. Deletes all the added widgets.
*/
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 3b8b976cf..bf57b6536 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -49,6 +49,8 @@ class ProgressBar final : public gcn::Widget, public gcn::WidgetListener
const int width = 40, const int height = 7,
const int color = -1);
+ A_DELETE_COPY(ProgressBar);
+
~ProgressBar();
/**
diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h
index 2db3fe8b9..7e79d0cca 100644
--- a/src/gui/widgets/progressindicator.h
+++ b/src/gui/widgets/progressindicator.h
@@ -32,17 +32,19 @@ class SimpleAnimation;
*/
class ProgressIndicator final : public gcn::Widget
{
-public:
- ProgressIndicator();
+ public:
+ ProgressIndicator();
- ~ProgressIndicator();
+ A_DELETE_COPY(ProgressIndicator);
- void logic() override;
+ ~ProgressIndicator();
- void draw(gcn::Graphics *graphics) override;
+ void logic() override;
-private:
- SimpleAnimation *mIndicator;
+ void draw(gcn::Graphics *graphics) override;
+
+ private:
+ SimpleAnimation *mIndicator;
};
#endif // PROGRESSINDICATOR_H
diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h
index cc0ff7734..d53154ed9 100644
--- a/src/gui/widgets/radiobutton.h
+++ b/src/gui/widgets/radiobutton.h
@@ -39,6 +39,8 @@ class RadioButton final : public gcn::RadioButton
RadioButton(const std::string &caption, const std::string &group,
const bool marked = false);
+ A_DELETE_COPY(RadioButton);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/radiogroup.h b/src/gui/widgets/radiogroup.h
index 370d46436..008570faf 100644
--- a/src/gui/widgets/radiogroup.h
+++ b/src/gui/widgets/radiogroup.h
@@ -31,6 +31,8 @@ class RadioGroup final : public WidgetGroup
RadioGroup(const std::string &group, const int height,
const int spacing);
+ A_DELETE_COPY(RadioGroup);
+
gcn::Widget *createWidget(const std::string &name) override;
};
diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h
index 7a1a3b076..26a41ee45 100644
--- a/src/gui/widgets/scrollarea.h
+++ b/src/gui/widgets/scrollarea.h
@@ -56,6 +56,8 @@ class ScrollArea final : public gcn::ScrollArea, public gcn::WidgetListener
ScrollArea(gcn::Widget *const widget, const bool opaque = true,
const std::string &skin = "");
+ A_DELETE_COPY(ScrollArea);
+
/**
* Destructor. Also deletes the content.
*/
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index f36dc2534..0643890a6 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -68,6 +68,8 @@ class SetupItem : public gcn::ActionListener
std::string eventName, std::string def,
const bool mainConfig);
+ A_DELETE_COPY(SetupItem);
+
~SetupItem();
void load();
@@ -141,6 +143,8 @@ class SetupItemCheckBox final : public SetupItem
std::string eventName, std::string def,
const bool mainConfig = true);
+ A_DELETE_COPY(SetupItemCheckBox);
+
~SetupItemCheckBox();
void createControls();
@@ -166,6 +170,8 @@ class SetupItemTextField final : public SetupItem
std::string eventName, std::string def,
const bool mainConfig = true);
+ A_DELETE_COPY(SetupItemTextField);
+
~SetupItemTextField();
void createControls();
@@ -203,6 +209,8 @@ class SetupItemIntTextField final : public SetupItem
const int min, const int max,
std::string def, const bool mainConfig = true);
+ A_DELETE_COPY(SetupItemIntTextField);
+
~SetupItemIntTextField();
void createControls();
@@ -232,6 +240,8 @@ class SetupItemLabel final : public SetupItem
SetupTabScroll *const parent,
const bool separator = true);
+ A_DELETE_COPY(SetupItemLabel);
+
~SetupItemLabel();
void createControls();
@@ -262,6 +272,8 @@ class SetupItemDropDown final : public SetupItem
std::string eventName, gcn::ListModel *const model,
std::string def, const bool mainConfig = true);
+ A_DELETE_COPY(SetupItemDropDown);
+
~SetupItemDropDown();
void createControls();
@@ -295,6 +307,8 @@ class SetupItemSlider final : public SetupItem
const bool onTheFly = false,
const bool mainConfig = true);
+ A_DELETE_COPY(SetupItemSlider);
+
~SetupItemSlider();
void createControls();
@@ -342,6 +356,8 @@ class SetupItemSlider2 final : public SetupItem
const bool mainConfig = true,
const bool doNotAlign = false);
+ A_DELETE_COPY(SetupItemSlider2);
+
~SetupItemSlider2();
void createControls();
@@ -390,6 +406,8 @@ class SetupItemSliderList : public SetupItem
const bool onTheFly = false,
const bool mainConfig = true);
+ A_DELETE_COPY(SetupItemSliderList);
+
~SetupItemSliderList();
void createControls();
@@ -422,6 +440,8 @@ class SetupItemSound final : public SetupItemSliderList
const int width = 150, const bool onTheFly = false,
const bool mainConfig = true);
+ A_DELETE_COPY(SetupItemSound);
+
void action(const gcn::ActionEvent &event) override;
void addMoreControls() override;
diff --git a/src/gui/widgets/setuptab.h b/src/gui/widgets/setuptab.h
index e47af8995..8d8715559 100644
--- a/src/gui/widgets/setuptab.h
+++ b/src/gui/widgets/setuptab.h
@@ -34,34 +34,36 @@
*/
class SetupTab : public Container, public gcn::ActionListener
{
-public:
- SetupTab();
+ public:
+ SetupTab();
- const std::string &getName() const
- { return mName; }
+ A_DELETE_COPY(SetupTab);
- /**
- * Called when the Apply button is pressed in the setup window.
- */
- virtual void apply() = 0;
+ const std::string &getName() const
+ { return mName; }
- /**
- * Called when the Cancel button is pressed in the setup window.
- */
- virtual void cancel() = 0;
+ /**
+ * Called when the Apply button is pressed in the setup window.
+ */
+ virtual void apply() = 0;
- virtual void externalUpdated();
+ /**
+ * Called when the Cancel button is pressed in the setup window.
+ */
+ virtual void cancel() = 0;
-protected:
- /**
- * Sets the name displayed on the tab. Should be set in the
- * constructor of a subclass.
- */
- void setName(const std::string &name)
- { mName = name; }
+ virtual void externalUpdated();
-private:
- std::string mName;
+ protected:
+ /**
+ * Sets the name displayed on the tab. Should be set in the
+ * constructor of a subclass.
+ */
+ void setName(const std::string &name)
+ { mName = name; }
+
+ private:
+ std::string mName;
};
#endif
diff --git a/src/gui/widgets/setuptabscroll.h b/src/gui/widgets/setuptabscroll.h
index 947ca2b26..edc324306 100644
--- a/src/gui/widgets/setuptabscroll.h
+++ b/src/gui/widgets/setuptabscroll.h
@@ -37,6 +37,8 @@ class SetupTabScroll : public SetupTab
public:
SetupTabScroll();
+ A_DELETE_COPY(SetupTabScroll);
+
~SetupTabScroll();
void addControl(SetupItem *const widget);
diff --git a/src/gui/widgets/shopitems.h b/src/gui/widgets/shopitems.h
index 840be4267..dc0b5cbf1 100644
--- a/src/gui/widgets/shopitems.h
+++ b/src/gui/widgets/shopitems.h
@@ -52,6 +52,8 @@ class ShopItems final : public gcn::ListModel
*/
ShopItems(const bool mergeDuplicates = false);
+ A_DELETE_COPY(ShopItems);
+
~ShopItems();
/**
diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h
index 906c6b3d3..87885064e 100644
--- a/src/gui/widgets/shoplistbox.h
+++ b/src/gui/widgets/shoplistbox.h
@@ -49,6 +49,8 @@ class ShopListBox final : public ListBox
ShopListBox(gcn::ListModel *const listModel,
ShopItems *const shopListModel);
+ A_DELETE_COPY(ShopListBox);
+
/**
* Draws the list box.
*/
diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h
index 2551bdb17..02d22a283 100644
--- a/src/gui/widgets/shortcutcontainer.h
+++ b/src/gui/widgets/shortcutcontainer.h
@@ -46,6 +46,8 @@ class ShortcutContainer : public gcn::Widget,
*/
ShortcutContainer();
+ A_DELETE_COPY(ShortcutContainer);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h
index 3d304ad3a..6fdce1f94 100644
--- a/src/gui/widgets/slider.h
+++ b/src/gui/widgets/slider.h
@@ -46,6 +46,8 @@ class Slider final : public gcn::Slider
*/
Slider(const double scaleStart, const double scaleEnd);
+ A_DELETE_COPY(Slider);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h
index f310ea27a..349ac5b86 100644
--- a/src/gui/widgets/sliderlist.h
+++ b/src/gui/widgets/sliderlist.h
@@ -41,6 +41,8 @@ class SliderList final : public Container,
gcn::ActionListener *const listener = nullptr,
std::string eventId = "");
+ A_DELETE_COPY(SliderList);
+
~SliderList();
void updateAlpha();
diff --git a/src/gui/widgets/spellshortcutcontainer.h b/src/gui/widgets/spellshortcutcontainer.h
index 09c60624a..f18d76c21 100644
--- a/src/gui/widgets/spellshortcutcontainer.h
+++ b/src/gui/widgets/spellshortcutcontainer.h
@@ -44,6 +44,8 @@ class SpellShortcutContainer final : public ShortcutContainer
*/
SpellShortcutContainer(const unsigned number);
+ A_DELETE_COPY(SpellShortcutContainer);
+
/**
* Destructor.
*/
diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h
index 6519d5847..28ae9f392 100644
--- a/src/gui/widgets/tab.h
+++ b/src/gui/widgets/tab.h
@@ -39,6 +39,9 @@ class Tab : public gcn::Tab, public gcn::WidgetListener
{
public:
Tab();
+
+ A_DELETE_COPY(Tab);
+
~Tab();
/**
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 65eb09447..9edf46748 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -45,6 +45,8 @@ class TabbedArea final : public gcn::TabbedArea, public gcn::WidgetListener
*/
TabbedArea();
+ A_DELETE_COPY(TabbedArea);
+
~TabbedArea();
/**
diff --git a/src/gui/widgets/tablemodel.h b/src/gui/widgets/tablemodel.h
index 6af6d2425..ecc922dc7 100644
--- a/src/gui/widgets/tablemodel.h
+++ b/src/gui/widgets/tablemodel.h
@@ -110,6 +110,8 @@ class StaticTableModel final : public TableModel
public:
StaticTableModel(const int width, const int height);
+ A_DELETE_COPY(StaticTableModel);
+
virtual ~StaticTableModel();
/**
diff --git a/src/gui/widgets/tabstrip.h b/src/gui/widgets/tabstrip.h
index efdeda657..4b297a016 100644
--- a/src/gui/widgets/tabstrip.h
+++ b/src/gui/widgets/tabstrip.h
@@ -34,6 +34,8 @@ class TabStrip final : public WidgetGroup
TabStrip(const int height, const int spacing = 0);
+ A_DELETE_COPY(TabStrip);
+
gcn::Widget *createWidget(const std::string &name) override;
void action(const gcn::ActionEvent &event) override;
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 36362e011..eea1a400c 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -40,6 +40,8 @@ class TextBox final : public gcn::TextBox
*/
TextBox();
+ A_DELETE_COPY(TextBox);
+
/**
* Sets the text after wrapping it to the current width of the widget.
*/
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index 97048ccba..205cb3fe3 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -47,6 +47,8 @@ class TextField : public gcn::TextField
std::string eventId = "",
const bool sendAlwaysEvents = false);
+ A_DELETE_COPY(TextField);
+
~TextField();
/**
diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h
index 0c127cba0..3b4d6dd65 100644
--- a/src/gui/widgets/textpreview.h
+++ b/src/gui/widgets/textpreview.h
@@ -35,6 +35,8 @@ class TextPreview final : public gcn::Widget
public:
TextPreview(const std::string &text);
+ A_DELETE_COPY(TextPreview);
+
/**
* Sets the color the text is printed in.
*
diff --git a/src/gui/widgets/tradetab.h b/src/gui/widgets/tradetab.h
index 55e6550cb..1609fe997 100644
--- a/src/gui/widgets/tradetab.h
+++ b/src/gui/widgets/tradetab.h
@@ -33,6 +33,8 @@ class TradeTab final : public ChatTab
public:
TradeTab();
+ A_DELETE_COPY(TradeTab);
+
~TradeTab();
int getType() const override
diff --git a/src/gui/widgets/vertcontainer.h b/src/gui/widgets/vertcontainer.h
index e8c1da82f..8d758288a 100644
--- a/src/gui/widgets/vertcontainer.h
+++ b/src/gui/widgets/vertcontainer.h
@@ -39,6 +39,8 @@ class VertContainer final : public Container, public gcn::WidgetListener
VertContainer(const int verticalItemSize, const bool resizable = true,
const int leftSpacing = 0);
+ A_DELETE_COPY(VertContainer);
+
virtual void add2(gcn::Widget *const widget, const bool resizable,
const int spacing = -1);
diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h
index 502d20efe..05def5818 100644
--- a/src/gui/widgets/whispertab.h
+++ b/src/gui/widgets/whispertab.h
@@ -33,6 +33,8 @@ class Channel;
class WhisperTab final : public ChatTab
{
public:
+ A_DELETE_COPY(WhisperTab);
+
const std::string &getNick() const
{ return mNick; }
diff --git a/src/gui/widgets/widgetgroup.h b/src/gui/widgets/widgetgroup.h
index 27d1a7357..10b145435 100644
--- a/src/gui/widgets/widgetgroup.h
+++ b/src/gui/widgets/widgetgroup.h
@@ -34,6 +34,8 @@ class WidgetGroup : public Container,
WidgetGroup(const std::string &group, const int height,
const int spacing);
+ A_DELETE_COPY(WidgetGroup);
+
virtual void addButton(std::string tag);
virtual void addButton(std::string text, std::string tag);
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 6739b5186..f97662534 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -61,6 +61,8 @@ class Window : public gcn::Window, private gcn::WidgetListener
Window(const std::string &caption = "Window", const bool modal = false,
Window *const parent = nullptr, std::string skin = "");
+ A_DELETE_COPY(Window);
+
/**
* Destructor. Deletes all the added widgets.
*/
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index 1a869c41b..7ce1d0830 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -53,6 +53,8 @@ class WindowMenu final : public Container,
public:
WindowMenu();
+ A_DELETE_COPY(WindowMenu);
+
~WindowMenu();
void action(const gcn::ActionEvent &event) override;
diff --git a/src/gui/worldselectdialog.h b/src/gui/worldselectdialog.h
index ba1a41056..f2badfaf1 100644
--- a/src/gui/worldselectdialog.h
+++ b/src/gui/worldselectdialog.h
@@ -58,6 +58,8 @@ class WorldSelectDialog final : public Window, public gcn::ActionListener,
*/
WorldSelectDialog(Worlds worlds);
+ A_DELETE_COPY(WorldSelectDialog);
+
/**
* Destructor.
*/
diff --git a/src/guild.h b/src/guild.h
index 76c077017..5a1c13c5f 100644
--- a/src/guild.h
+++ b/src/guild.h
@@ -39,6 +39,8 @@ typedef std::map<unsigned, std::string> PositionsMap;
class GuildMember final : public Avatar
{
public:
+ A_DELETE_COPY(GuildMember);
+
Guild *getGuild() const
{ return mGuild; }
@@ -65,6 +67,8 @@ protected:
class Guild final : public AvatarListModel
{
public:
+ A_DELETE_COPY(Guild);
+
virtual ~Guild();
/**
diff --git a/src/guildmanager.h b/src/guildmanager.h
index ab1542b24..c19975c9b 100644
--- a/src/guildmanager.h
+++ b/src/guildmanager.h
@@ -35,6 +35,8 @@ class GuildManager final
public:
GuildManager();
+ A_DELETE_COPY(GuildManager);
+
~GuildManager();
static void init();
diff --git a/src/imageparticle.h b/src/imageparticle.h
index 800b30584..8116deb62 100644
--- a/src/imageparticle.h
+++ b/src/imageparticle.h
@@ -44,6 +44,8 @@ class ImageParticle : public Particle
*/
ImageParticle(Map *const map, Image *const image);
+ A_DELETE_COPY(ImageParticle);
+
/**
* Destructor.
*/
diff --git a/src/imagesprite.h b/src/imagesprite.h
index fd5bcd239..0e420a26a 100644
--- a/src/imagesprite.h
+++ b/src/imagesprite.h
@@ -33,6 +33,8 @@ class ImageSprite final : public Sprite
public:
ImageSprite(Image *const image);
+ A_DELETE_COPY(ImageSprite);
+
~ImageSprite();
bool reset() override
diff --git a/src/inputmanager.h b/src/inputmanager.h
index f3f5fc735..4cd2926d6 100644
--- a/src/inputmanager.h
+++ b/src/inputmanager.h
@@ -94,6 +94,8 @@ class InputManager final
public:
InputManager();
+ A_DELETE_COPY(InputManager);
+
void init();
bool handleEvent(const SDL_Event &event);
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 64f13478b..1ad983956 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -33,6 +33,7 @@
#include "utils/gettext.h"
#include <algorithm>
+#include <functional>
#include <string>
#include "debug.h"
diff --git a/src/inventory.h b/src/inventory.h
index b17e480ed..cec366b71 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -47,6 +47,8 @@ class InventoryListener
class Inventory final
{
public:
+ A_DELETE_COPY(Inventory);
+
static const int NO_SLOT_INDEX = -1; /**< Slot has no index. */
enum
diff --git a/src/item.h b/src/item.h
index bc5ed9098..be35e0b17 100644
--- a/src/item.h
+++ b/src/item.h
@@ -27,6 +27,8 @@
#include <map>
+#include "localconsts.h"
+
class Image;
/**
@@ -42,6 +44,8 @@ class Item
const unsigned char color = 1, const bool equipment = false,
const bool equipped = false);
+ A_DELETE_COPY(Item);
+
/**
* Destructor.
*/
diff --git a/src/itemshortcut.h b/src/itemshortcut.h
index dcdc515a5..d84a85df4 100644
--- a/src/itemshortcut.h
+++ b/src/itemshortcut.h
@@ -41,6 +41,8 @@ class ItemShortcut final
*/
ItemShortcut(const int number);
+ A_DELETE_COPY(ItemShortcut);
+
/**
* Destructor.
*/
diff --git a/src/joystick.h b/src/joystick.h
index 0120dd9d0..b85af4077 100644
--- a/src/joystick.h
+++ b/src/joystick.h
@@ -69,6 +69,8 @@ class Joystick final
*/
Joystick(const int no);
+ A_DELETE_COPY(Joystick);
+
~Joystick();
bool open();
diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h
index b6e85a28f..b24cedecb 100644
--- a/src/keyboardconfig.h
+++ b/src/keyboardconfig.h
@@ -39,6 +39,8 @@ class KeyboardConfig final
public:
KeyboardConfig();
+ A_DELETE_COPY(KeyboardConfig);
+
/**
* Initializes the keyboard config explicitly.
*/
diff --git a/src/keyevent.h b/src/keyevent.h
index 84d022613..ca1e2900a 100644
--- a/src/keyevent.h
+++ b/src/keyevent.h
@@ -42,6 +42,8 @@ class KeyEvent final : public gcn::KeyEvent
const int actionId,
const gcn::Key& key);
+ A_DELETE_COPY(KeyEvent);
+
virtual ~KeyEvent();
int getActionId() const
diff --git a/src/localconsts.h b/src/localconsts.h
index 8b8af420e..da08a7b7c 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -23,6 +23,8 @@
#define nullptr 0
#define final
#define override
+#define A_DELETE
+#define A_DELETE_COPY
#else
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
@@ -30,9 +32,14 @@
#if GCC_VERSION < 40700
#define final
#define override
+//#define A_DELETE
+//#define A_DELETE_COPY
#endif
#undef Z_NULL
#define Z_NULL nullptr
+#define A_DELETE(func) func = delete
+#define A_DELETE_COPY(name) name(const name &) = delete; \
+ name &operator=(const name&) = delete
#endif
#ifdef __GNUC__
diff --git a/src/localplayer.h b/src/localplayer.h
index 79c9b9086..c2082a9df 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -76,6 +76,8 @@ class LocalPlayer final : public Being,
*/
LocalPlayer(const int id = 65535, const int subtype = 0);
+ A_DELETE_COPY(LocalPlayer);
+
/**
* Destructor.
*/
diff --git a/src/logger.h b/src/logger.h
index dbcc9485a..f78e31ecf 100644
--- a/src/logger.h
+++ b/src/logger.h
@@ -47,6 +47,8 @@ class Logger final
*/
Logger();
+ A_DELETE_COPY(Logger);
+
/**
* Destructor, closes log file.
*/
diff --git a/src/map.h b/src/map.h
index 3927d50cc..803a400af 100644
--- a/src/map.h
+++ b/src/map.h
@@ -66,6 +66,8 @@ struct MetaTile final
parentX(0), parentY(0), blockmask(0)
{}
+ A_DELETE_COPY(MetaTile);
+
// Pathfinding members
int Fcost; /**< Estimation of total path cost */
int Gcost; /**< Cost from start to this location */
@@ -86,6 +88,8 @@ class TileAnimation final
~TileAnimation();
+ A_DELETE_COPY(TileAnimation);
+
bool update(const int ticks = 1);
void addAffectedTile(MapLayer *const layer, const int index)
@@ -156,6 +160,8 @@ class Map final : public Properties, public ConfigListener
Map(const int width, const int height,
const int tileWidth, const int tileHeight);
+ A_DELETE_COPY(Map);
+
/**
* Destructor.
*/
diff --git a/src/maplayer.h b/src/maplayer.h
index 59a612cbb..75dba70b9 100644
--- a/src/maplayer.h
+++ b/src/maplayer.h
@@ -46,6 +46,8 @@ class MapRowVertexes final
images.reserve(30);
}
+ A_DELETE_COPY(MapRowVertexes);
+
~MapRowVertexes();
MepRowImages images;
@@ -66,6 +68,11 @@ class MapObject final
class MapObjectList final
{
public:
+ MapObjectList()
+ { }
+
+ A_DELETE_COPY(MapObjectList);
+
std::vector<MapObject> objects;
};
@@ -86,6 +93,8 @@ class MapLayer final: public ConfigListener
MapLayer(const int x, const int y, const int width, const int height,
const bool isFringeLayer);
+ A_DELETE_COPY(MapLayer);
+
/**
* Destructor.
*/
@@ -189,6 +198,8 @@ class SpecialLayer final
SpecialLayer(const int width, const int height,
const bool drawSprites = false);
+ A_DELETE_COPY(SpecialLayer);
+
~SpecialLayer();
void draw(Graphics *const graphics, int startX, int startY,
@@ -248,6 +259,8 @@ class MapItem final
MapItem(const int type, std::string comment, const int x, const int y);
+ A_DELETE_COPY(MapItem);
+
~MapItem();
int getType() const
@@ -292,6 +305,8 @@ class ObjectsLayer final
public:
ObjectsLayer(const unsigned width, const unsigned height);
+ A_DELETE_COPY(ObjectsLayer);
+
~ObjectsLayer();
void addObject(std::string name, const int type,
diff --git a/src/mumblemanager.h b/src/mumblemanager.h
index be40a1c2c..4398a1c01 100644
--- a/src/mumblemanager.h
+++ b/src/mumblemanager.h
@@ -37,6 +37,8 @@ class MumbleManager final
public:
MumbleManager();
+ A_DELETE_COPY(MumbleManager);
+
~MumbleManager();
void init();
diff --git a/src/normalopenglgraphics.h b/src/normalopenglgraphics.h
index 9101fdaf4..8b773d2c4 100644
--- a/src/normalopenglgraphics.h
+++ b/src/normalopenglgraphics.h
@@ -46,6 +46,8 @@ class NormalOpenGLGraphics final : public Graphics
public:
NormalOpenGLGraphics();
+ A_DELETE_COPY(NormalOpenGLGraphics);
+
~NormalOpenGLGraphics();
bool setVideoMode(const int w, const int h, const int bpp,
diff --git a/src/particle.h b/src/particle.h
index 13d322633..5d961e84c 100644
--- a/src/particle.h
+++ b/src/particle.h
@@ -80,6 +80,8 @@ class Particle : public Actor
*/
Particle(Map *const map);
+ A_DELETE_COPY(Particle);
+
/**
* Destructor.
*/
diff --git a/src/particlecontainer.h b/src/particlecontainer.h
index a40bf1ce9..550cc6389 100644
--- a/src/particlecontainer.h
+++ b/src/particlecontainer.h
@@ -47,6 +47,8 @@ public:
ParticleContainer(ParticleContainer *const parent = nullptr,
const bool delParent = true);
+ A_DELETE_COPY(ParticleContainer);
+
virtual ~ParticleContainer();
/**
@@ -78,6 +80,9 @@ class ParticleList final : public ParticleContainer
public:
ParticleList(ParticleContainer *const parent = nullptr,
const bool delParent = true);
+
+ A_DELETE_COPY(ParticleList);
+
virtual ~ParticleList();
/**
@@ -107,6 +112,8 @@ public:
ParticleVector(ParticleContainer *const parent = nullptr,
const bool delParent = true);
+ A_DELETE_COPY(ParticleVector);
+
virtual ~ParticleVector();
/**
diff --git a/src/party.h b/src/party.h
index e4ae9dbff..0739184fc 100644
--- a/src/party.h
+++ b/src/party.h
@@ -35,6 +35,8 @@ class Party;
class PartyMember final : public Avatar
{
public:
+ A_DELETE_COPY(PartyMember);
+
Party *getParty() const
{ return mParty; }
@@ -56,6 +58,7 @@ protected:
class Party final : public AvatarListModel
{
public:
+ A_DELETE_COPY(Party);
/**
* Set the party's name.
diff --git a/src/playerrelations.h b/src/playerrelations.h
index 6b2ed62d5..a2f2a8d08 100644
--- a/src/playerrelations.h
+++ b/src/playerrelations.h
@@ -64,6 +64,8 @@ struct PlayerRelation final
PlayerRelation(const Relation relation);
+ A_DELETE_COPY(PlayerRelation);
+
Relation mRelation; // bitmask for all of the above
};
@@ -108,6 +110,9 @@ class PlayerRelationsManager final
{
public:
PlayerRelationsManager();
+
+ A_DELETE_COPY(PlayerRelationsManager);
+
~PlayerRelationsManager();
/**
diff --git a/src/rotationalparticle.h b/src/rotationalparticle.h
index c873160ec..5e537c21d 100644
--- a/src/rotationalparticle.h
+++ b/src/rotationalparticle.h
@@ -39,6 +39,8 @@ class RotationalParticle final : public ImageParticle
RotationalParticle(Map *const map, const XmlNodePtr animationNode,
const std::string& dyePalettes = std::string());
+ A_DELETE_COPY(RotationalParticle);
+
~RotationalParticle();
virtual bool update() override;
diff --git a/src/safeopenglgraphics.h b/src/safeopenglgraphics.h
index f594c57e5..83ccc25cb 100644
--- a/src/safeopenglgraphics.h
+++ b/src/safeopenglgraphics.h
@@ -41,6 +41,8 @@ class SafeOpenGLGraphics final : public Graphics
public:
SafeOpenGLGraphics();
+ A_DELETE_COPY(SafeOpenGLGraphics);
+
~SafeOpenGLGraphics();
bool setVideoMode(const int w, const int h, const int bpp,
@@ -102,6 +104,7 @@ class SafeOpenGLGraphics final : public Graphics
void updateScreen() override;
void _beginDraw();
+
void _endDraw();
bool pushClipArea(gcn::Rectangle area);
diff --git a/src/shopitem.h b/src/shopitem.h
index 6ec83f7bf..25a5a0da3 100644
--- a/src/shopitem.h
+++ b/src/shopitem.h
@@ -57,6 +57,8 @@ class ShopItem final : public Item
*/
ShopItem(const int id, const unsigned char color, const int price);
+ A_DELETE_COPY(ShopItem);
+
/**
* Destructor.
*/
diff --git a/src/simpleanimation.h b/src/simpleanimation.h
index ea9e3aef6..fb2ba1136 100644
--- a/src/simpleanimation.h
+++ b/src/simpleanimation.h
@@ -52,6 +52,8 @@ class SimpleAnimation final
SimpleAnimation(const XmlNodePtr animationNode,
const std::string& dyePalettes = std::string());
+ A_DELETE_COPY(SimpleAnimation);
+
~SimpleAnimation();
void setFrame(int frame);
diff --git a/src/sound.h b/src/sound.h
index 071b77597..21a17a770 100644
--- a/src/sound.h
+++ b/src/sound.h
@@ -52,6 +52,9 @@ class Sound final : public ConfigListener
{
public:
Sound();
+
+ A_DELETE_COPY(Sound);
+
~Sound();
void optionChanged(const std::string &value) override;
diff --git a/src/spellmanager.h b/src/spellmanager.h
index 11a23ab67..2f7e5167d 100644
--- a/src/spellmanager.h
+++ b/src/spellmanager.h
@@ -38,6 +38,8 @@ class SpellManager final
public:
SpellManager();
+ A_DELETE_COPY(SpellManager);
+
~SpellManager();
TextCommand *getSpell(const int spellId);
diff --git a/src/spellshortcut.h b/src/spellshortcut.h
index dfca62e9e..e28b6d6f3 100644
--- a/src/spellshortcut.h
+++ b/src/spellshortcut.h
@@ -38,6 +38,8 @@ class SpellShortcut final
*/
SpellShortcut();
+ A_DELETE_COPY(SpellShortcut);
+
/**
* Destructor.
*/
diff --git a/src/statuseffect.h b/src/statuseffect.h
index 742edcd3f..7e5f3c382 100644
--- a/src/statuseffect.h
+++ b/src/statuseffect.h
@@ -33,6 +33,8 @@ class StatusEffect final
public:
StatusEffect();
+ A_DELETE_COPY(StatusEffect);
+
~StatusEffect();
/**
diff --git a/src/text.h b/src/text.h
index 74910f0b1..215884e30 100644
--- a/src/text.h
+++ b/src/text.h
@@ -44,6 +44,8 @@ class Text
const gcn::Color *const color, const bool isSpeech = false,
gcn::Font *const font = nullptr);
+ A_DELETE_COPY(Text);
+
/**
* Destructor. The text is removed from the screen.
*/
@@ -92,6 +94,8 @@ class FlashText final : public Text
const gcn::Color *const color,
gcn::Font *const font = nullptr);
+ A_DELETE_COPY(FlashText);
+
/**
* Remove the text from the screen
*/
diff --git a/src/textcommand.h b/src/textcommand.h
index 2b188941a..96c0ee157 100644
--- a/src/textcommand.h
+++ b/src/textcommand.h
@@ -82,6 +82,8 @@ class TextCommand final
*/
TextCommand(const unsigned int id);
+ A_DELETE_COPY(TextCommand);
+
/**
* Destructor.
*/
diff --git a/src/textmanager.h b/src/textmanager.h
index 49afb6f1c..3afa08ea4 100644
--- a/src/textmanager.h
+++ b/src/textmanager.h
@@ -41,6 +41,13 @@ class TextManager final
*/
TextManager();
+ A_DELETE_COPY(TextManager);
+
+ /**
+ * Destroy the manager
+ */
+ ~TextManager();
+
/**
* Add text to the manager
*/
@@ -57,11 +64,6 @@ class TextManager final
void removeText(const Text *const text);
/**
- * Destroy the manager
- */
- ~TextManager();
-
- /**
* Draw the text
*/
void draw(gcn::Graphics *const graphics,
diff --git a/src/textparticle.h b/src/textparticle.h
index 6b633fb05..2bafd7a3c 100644
--- a/src/textparticle.h
+++ b/src/textparticle.h
@@ -35,6 +35,8 @@ class TextParticle final : public Particle
const gcn::Color *const color,
gcn::Font *const font, const bool outline = false);
+ A_DELETE_COPY(TextParticle);
+
/**
* Draws the particle image.
*/
diff --git a/src/textrenderer.h b/src/textrenderer.h
index f47729eec..65134bdb5 100644
--- a/src/textrenderer.h
+++ b/src/textrenderer.h
@@ -32,6 +32,8 @@
class TextRenderer final
{
public:
+ A_DELETE_COPY(TextRenderer);
+
/**
* Renders a specified text.
*/
diff --git a/src/tileset.h b/src/tileset.h
index 943321864..577fe7937 100644
--- a/src/tileset.h
+++ b/src/tileset.h
@@ -43,6 +43,8 @@ class Tileset final : public ImageSet
{
}
+ A_DELETE_COPY(Tileset);
+
/**
* Returns the first gid.
*/
diff --git a/src/units.h b/src/units.h
index e8e181faf..85935fea6 100644
--- a/src/units.h
+++ b/src/units.h
@@ -30,6 +30,8 @@
class Units final
{
public:
+ A_DELETE_COPY(Units);
+
/**
* Loads and parses the units.xml file (if found).
*/