diff options
45 files changed, 177 insertions, 9 deletions
diff --git a/src/gui/color.h b/src/gui/color.h index 2fc8573c6..4b8e06eb3 100644 --- a/src/gui/color.h +++ b/src/gui/color.h @@ -125,6 +125,8 @@ class Color final } + A_DEFAULT_COPY(Color) + /** * Adds the RGB values of two colors together. The values will be * clamped if they go out of range. diff --git a/src/gui/colorpair.h b/src/gui/colorpair.h index d4ef13656..f3089868e 100644 --- a/src/gui/colorpair.h +++ b/src/gui/colorpair.h @@ -34,6 +34,8 @@ struct ColorPair final { } + A_DEFAULT_COPY(ColorPair) + const Color *color1; const Color *color2; }; diff --git a/src/gui/dialogsmanager.h b/src/gui/dialogsmanager.h index 4cdd3cb17..501e9211d 100644 --- a/src/gui/dialogsmanager.h +++ b/src/gui/dialogsmanager.h @@ -43,6 +43,8 @@ class DialogsManager final : public AttributeListener, virtual ~DialogsManager() { } + A_DELETE_COPY(DialogsManager) + static void closeDialogs(); static void createUpdaterWindow(); diff --git a/src/gui/fonts/textchunksmall.h b/src/gui/fonts/textchunksmall.h index 486437247..0896c3591 100644 --- a/src/gui/fonts/textchunksmall.h +++ b/src/gui/fonts/textchunksmall.h @@ -30,6 +30,8 @@ class TextChunkSmall final { public: + A_DEFAULT_COPY(TextChunkSmall) + TextChunkSmall(const std::string &restrict text0, const Color &restrict color0, const Color &restrict color1); diff --git a/src/gui/models/avatarlistmodel.h b/src/gui/models/avatarlistmodel.h index 13b8c0e33..67ec6846a 100644 --- a/src/gui/models/avatarlistmodel.h +++ b/src/gui/models/avatarlistmodel.h @@ -29,6 +29,12 @@ class AvatarListModel notfinal : public ListModel { public: + AvatarListModel() : + ListModel() + { } + + A_DELETE_COPY(AvatarListModel) + virtual Avatar *getAvatarAt(const int i) A_WARN_UNUSED = 0; std::string getElementAt(int i) override final A_WARN_UNUSED diff --git a/src/gui/models/colorlistmodel.h b/src/gui/models/colorlistmodel.h index 51152b67c..bb2d413c2 100644 --- a/src/gui/models/colorlistmodel.h +++ b/src/gui/models/colorlistmodel.h @@ -62,6 +62,12 @@ const char *COLOR_NAME[14] = class ColorListModel final : public ListModel { public: + ColorListModel() : + ListModel() + { } + + A_DELETE_COPY(ColorListModel) + ~ColorListModel() { } diff --git a/src/gui/models/extendedlistmodel.h b/src/gui/models/extendedlistmodel.h index 4900b031f..981a96897 100644 --- a/src/gui/models/extendedlistmodel.h +++ b/src/gui/models/extendedlistmodel.h @@ -28,6 +28,12 @@ class ExtendedListModel notfinal : public ListModel { public: + ExtendedListModel() : + ListModel() + { } + + A_DELETE_COPY(ExtendedListModel) + virtual const Image *getImageAt(int i) A_WARN_UNUSED = 0; }; diff --git a/src/gui/models/fontsizechoicelistmodel.h b/src/gui/models/fontsizechoicelistmodel.h index 7f27aeda4..79aecf2fb 100644 --- a/src/gui/models/fontsizechoicelistmodel.h +++ b/src/gui/models/fontsizechoicelistmodel.h @@ -68,6 +68,12 @@ const char *SIZE_NAME[maxFontSizes] = class FontSizeChoiceListModel final : public ListModel { public: + FontSizeChoiceListModel() : + ListModel() + { } + + A_DELETE_COPY(FontSizeChoiceListModel) + ~FontSizeChoiceListModel() { } diff --git a/src/gui/models/fontsmodel.h b/src/gui/models/fontsmodel.h index a0966ae2b..b7f5fc4be 100644 --- a/src/gui/models/fontsmodel.h +++ b/src/gui/models/fontsmodel.h @@ -35,6 +35,8 @@ class FontsModel final : public NamesModel NamesModel() { Theme::fillFontsList(mNames); } + A_DELETE_COPY(FontsModel) + ~FontsModel() { } }; diff --git a/src/gui/models/ignorechoiceslistmodel.h b/src/gui/models/ignorechoiceslistmodel.h index ed597e4c5..b0010df31 100644 --- a/src/gui/models/ignorechoiceslistmodel.h +++ b/src/gui/models/ignorechoiceslistmodel.h @@ -34,6 +34,12 @@ class IgnoreChoicesListModel final : public ListModel { public: + IgnoreChoicesListModel() : + ListModel() + { } + + A_DELETE_COPY(IgnoreChoicesListModel) + ~IgnoreChoicesListModel() { } diff --git a/src/gui/models/langlistmodel.h b/src/gui/models/langlistmodel.h index f9070996a..839a836e7 100644 --- a/src/gui/models/langlistmodel.h +++ b/src/gui/models/langlistmodel.h @@ -32,6 +32,8 @@ struct Language final { + A_DEFAULT_COPY(Language) + std::string name; std::string value; std::string icon; diff --git a/src/gui/models/listmodel.h b/src/gui/models/listmodel.h index cbf99452f..df8db8b54 100644 --- a/src/gui/models/listmodel.h +++ b/src/gui/models/listmodel.h @@ -78,6 +78,11 @@ class ListModel notfinal { public: + ListModel() + { } + + A_DELETE_COPY(ListModel) + /** * Destructor. */ diff --git a/src/gui/models/magicschoolmodel.h b/src/gui/models/magicschoolmodel.h index 48cb1091e..2dcd01880 100644 --- a/src/gui/models/magicschoolmodel.h +++ b/src/gui/models/magicschoolmodel.h @@ -48,6 +48,12 @@ const char *MAGIC_SCHOOL_TEXT[6] = class MagicSchoolModel final : public ListModel { public: + MagicSchoolModel() : + ListModel() + { } + + A_DELETE_COPY(MagicSchoolModel) + ~MagicSchoolModel() { } diff --git a/src/gui/models/opengllistmodel.h b/src/gui/models/opengllistmodel.h index a6142ed23..085dd17a5 100644 --- a/src/gui/models/opengllistmodel.h +++ b/src/gui/models/opengllistmodel.h @@ -30,6 +30,12 @@ class OpenGLListModel final : public ListModel { public: + OpenGLListModel() : + ListModel() + { } + + A_DELETE_COPY(OpenGLListModel) + ~OpenGLListModel() { } diff --git a/src/gui/models/playerrelationlistmodel.h b/src/gui/models/playerrelationlistmodel.h index 0237ce1ec..5e58d4905 100644 --- a/src/gui/models/playerrelationlistmodel.h +++ b/src/gui/models/playerrelationlistmodel.h @@ -50,6 +50,12 @@ static const char *const RELATION_NAMES[PlayerRelation::RELATIONS_NR] = class PlayerRelationListModel final : public ListModel { public: + PlayerRelationListModel() : + ListModel() + { } + + A_DELETE_COPY(PlayerRelationListModel) + ~PlayerRelationListModel() { } diff --git a/src/gui/models/skillmodel.cpp b/src/gui/models/skillmodel.cpp index 50d01b786..13d2bb547 100644 --- a/src/gui/models/skillmodel.cpp +++ b/src/gui/models/skillmodel.cpp @@ -27,6 +27,7 @@ #include "debug.h" SkillModel::SkillModel() : + ListModel(), mSkills(), mVisibleSkills() { diff --git a/src/gui/models/skillmodel.h b/src/gui/models/skillmodel.h index f700c4213..c3331ed30 100644 --- a/src/gui/models/skillmodel.h +++ b/src/gui/models/skillmodel.h @@ -34,6 +34,8 @@ class SkillModel final : public ListModel public: SkillModel(); + A_DELETE_COPY(SkillModel) + SkillInfo *getSkillAt(const int i) const; std::string getElementAt(int i) override final; diff --git a/src/gui/models/sortlistmodelbuy.h b/src/gui/models/sortlistmodelbuy.h index 150bcd070..3af489222 100644 --- a/src/gui/models/sortlistmodelbuy.h +++ b/src/gui/models/sortlistmodelbuy.h @@ -48,6 +48,12 @@ static const char *const SORT_NAME_BUY[7] = class SortListModelBuy final : public ListModel { public: + SortListModelBuy() : + ListModel() + { } + + A_DELETE_COPY(SortListModelBuy) + ~SortListModelBuy() { } diff --git a/src/gui/models/sortlistmodelinv.h b/src/gui/models/sortlistmodelinv.h index c57a4a3b3..3561d2621 100644 --- a/src/gui/models/sortlistmodelinv.h +++ b/src/gui/models/sortlistmodelinv.h @@ -45,6 +45,12 @@ static const char *const SORT_NAME_INVENTORY[6] = class SortListModelInv final : public ListModel { public: + SortListModelInv() : + ListModel() + { } + + A_DELETE_COPY(SortListModelInv) + ~SortListModelInv() { } diff --git a/src/gui/models/soundsmodel.h b/src/gui/models/soundsmodel.h index 6f70b3294..ad66049a3 100644 --- a/src/gui/models/soundsmodel.h +++ b/src/gui/models/soundsmodel.h @@ -40,6 +40,8 @@ class SoundsModel final : public NamesModel Theme::fillSoundsList(mNames); } + A_DELETE_COPY(SoundsModel) + ~SoundsModel() { } }; diff --git a/src/gui/models/tablemodel.h b/src/gui/models/tablemodel.h index a742644f7..dc3462f19 100644 --- a/src/gui/models/tablemodel.h +++ b/src/gui/models/tablemodel.h @@ -38,6 +38,8 @@ class TableModelListener; class TableModel notfinal { public: + A_DELETE_COPY(TableModel) + virtual ~TableModel() { } diff --git a/src/gui/models/targettypemodel.h b/src/gui/models/targettypemodel.h index 32015ab3b..ec049bf66 100644 --- a/src/gui/models/targettypemodel.h +++ b/src/gui/models/targettypemodel.h @@ -39,6 +39,12 @@ const char *TARGET_TYPE_TEXT[3] = class TargetTypeModel final : public ListModel { public: + TargetTypeModel() : + ListModel() + { } + + A_DELETE_COPY(TargetTypeModel) + ~TargetTypeModel() { } diff --git a/src/gui/models/themesmodel.h b/src/gui/models/themesmodel.h index 4b2450990..c68cc0a2f 100644 --- a/src/gui/models/themesmodel.h +++ b/src/gui/models/themesmodel.h @@ -40,6 +40,8 @@ class ThemesModel final : public NamesModel Theme::fillSkinsList(mNames); } + A_DELETE_COPY(ThemesModel) + ~ThemesModel() { } }; diff --git a/src/gui/models/touchactionmodel.cpp b/src/gui/models/touchactionmodel.cpp index 46f0437c0..6238797e6 100644 --- a/src/gui/models/touchactionmodel.cpp +++ b/src/gui/models/touchactionmodel.cpp @@ -32,6 +32,8 @@ const int touchActionDataSize = 5; static class SortTouchActionFunctor final { public: + A_DEFAULT_COPY(SortTouchActionFunctor) + bool operator() (const SetupActionData *const data1, const SetupActionData *const data2) const { diff --git a/src/gui/models/typelistmodel.h b/src/gui/models/typelistmodel.h index 9e09966eb..681e019fc 100644 --- a/src/gui/models/typelistmodel.h +++ b/src/gui/models/typelistmodel.h @@ -30,9 +30,12 @@ class TypeListModel final : public ListModel { public: - TypeListModel() + TypeListModel() : + ListModel() { } + A_DELETE_COPY(TypeListModel) + /** * Used to get number of line in the list */ diff --git a/src/gui/palette.h b/src/gui/palette.h index 8c7067dda..00f295cc4 100644 --- a/src/gui/palette.h +++ b/src/gui/palette.h @@ -114,6 +114,8 @@ class Palette notfinal { } + A_DEFAULT_COPY(ColorElem) + int type; Color color; Color testColor; diff --git a/src/gui/rect.h b/src/gui/rect.h index 303781354..0f72d2b6c 100644 --- a/src/gui/rect.h +++ b/src/gui/rect.h @@ -111,6 +111,8 @@ class Rect notfinal { } + A_DEFAULT_COPY(Rect) + Rect &operator=(const Rect &r) { x = r.x; diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 1e5080b8c..cd2802afc 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -295,6 +295,7 @@ void Theme::optionChanged(const std::string &) struct SkinParameter final { + A_DELETE_COPY(SkinParameter) int index; std::string name; }; diff --git a/src/gui/themeinfo.h b/src/gui/themeinfo.h index c521f62c8..5514924a2 100644 --- a/src/gui/themeinfo.h +++ b/src/gui/themeinfo.h @@ -43,6 +43,9 @@ struct ThemeInfo final guiAlpha(0.0F) { } + + A_DELETE_COPY(ThemeInfo) + std::string name; std::string copyright; std::string font; diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 1b97de024..916ce76d7 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -70,15 +70,20 @@ namespace { struct MouseOverLink final { - MouseOverLink(const int x, const int y) : + MouseOverLink(const int x, + const int y) : mX(x), mY(y) { } + A_DEFAULT_COPY(MouseOverLink) + bool operator() (const BrowserLink &link) const { - return (mX >= link.x1 && mX < link.x2 && - mY >= link.y1 && mY < link.y2); + return (mX >= link.x1 && + mX < link.x2 && + mY >= link.y1 && + mY < link.y2); } const int mX; const int mY; diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index c765e3850..80ec9cf75 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -47,6 +47,8 @@ struct BrowserLink final { } + A_DEFAULT_COPY(BrowserLink) + int x1; int x2; int y1; diff --git a/src/gui/widgets/container.h b/src/gui/widgets/container.h index 9530891f6..2d6e59001 100644 --- a/src/gui/widgets/container.h +++ b/src/gui/widgets/container.h @@ -39,6 +39,8 @@ class Container notfinal : public BasicContainer2 public: explicit Container(const Widget2 *const widget); + A_DELETE_COPY(Container) + virtual ~Container(); bool safeRemove(Widget *const widget); diff --git a/src/gui/widgets/containerplacer.h b/src/gui/widgets/containerplacer.h index d9a0e326e..cd1e0221e 100644 --- a/src/gui/widgets/containerplacer.h +++ b/src/gui/widgets/containerplacer.h @@ -35,12 +35,14 @@ class Widget; class ContainerPlacer final { public: - explicit ContainerPlacer(BasicContainer2 *c = nullptr, - LayoutCell *lc = nullptr) : + explicit ContainerPlacer(BasicContainer2 *const c = nullptr, + LayoutCell *const lc = nullptr) : mContainer(c), mCell(lc) {} + A_DEFAULT_COPY(ContainerPlacer) + /** * Gets the pointed cell. */ @@ -50,14 +52,18 @@ class ContainerPlacer final /** * Returns a placer for the same container but to an inner cell. */ - ContainerPlacer at(const int x, const int y) A_WARN_UNUSED; + ContainerPlacer at(const int x, + const int y) A_WARN_UNUSED; /** * Adds the given widget to the container and places it in the layout. * @see LayoutArray::place */ - LayoutCell &operator()(const int x, const int y, Widget *const wg, - const int w = 1, const int h = 1); + LayoutCell &operator()(const int x, + const int y, + Widget *const wg, + const int w = 1, + const int h = 1); private: BasicContainer2 *mContainer; diff --git a/src/gui/widgets/extendedlistboxitem.h b/src/gui/widgets/extendedlistboxitem.h index 0c2479a7e..dc2d8b459 100644 --- a/src/gui/widgets/extendedlistboxitem.h +++ b/src/gui/widgets/extendedlistboxitem.h @@ -37,6 +37,9 @@ struct ExtendedListBoxItem final y(y0) { } + + A_DEFAULT_COPY(ExtendedListBoxItem) + int row; std::string text; bool image; diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 720f81ab1..4ac331078 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -67,6 +67,8 @@ namespace class ItemIdPair final { public: + A_DELETE_COPY(ItemIdPair) + ItemIdPair(const int id, Item *const item) : mId(id), mItem(item) { @@ -79,6 +81,8 @@ namespace class SortItemAlphaFunctor final { public: + A_DEFAULT_COPY(SortItemAlphaFunctor) + bool operator() (const ItemIdPair *const pair1, const ItemIdPair *const pair2) const { @@ -103,6 +107,8 @@ namespace class SortItemIdFunctor final { public: + A_DEFAULT_COPY(SortItemIdFunctor) + bool operator() (const ItemIdPair *const pair1, const ItemIdPair *const pair2) const { @@ -123,6 +129,8 @@ namespace class SortItemWeightFunctor final { public: + A_DEFAULT_COPY(SortItemWeightFunctor) + bool operator() (const ItemIdPair *const pair1, const ItemIdPair *const pair2) const { @@ -151,6 +159,8 @@ namespace class SortItemAmountFunctor final { public: + A_DEFAULT_COPY(SortItemAmountFunctor) + bool operator() (const ItemIdPair *const pair1, const ItemIdPair *const pair2) const { @@ -179,6 +189,8 @@ namespace class SortItemTypeFunctor final { public: + A_DEFAULT_COPY(SortItemTypeFunctor) + bool operator() (const ItemIdPair *const pair1, const ItemIdPair *const pair2) const { diff --git a/src/gui/widgets/layoutarray.h b/src/gui/widgets/layoutarray.h index a5424aa7b..2f5d766e7 100644 --- a/src/gui/widgets/layoutarray.h +++ b/src/gui/widgets/layoutarray.h @@ -40,6 +40,8 @@ class LayoutArray final public: LayoutArray(); + A_DEFAULT_COPY(LayoutArray) + ~LayoutArray(); /** diff --git a/src/gui/widgets/layoutcell.h b/src/gui/widgets/layoutcell.h index cecf7d44e..e6404cfde 100644 --- a/src/gui/widgets/layoutcell.h +++ b/src/gui/widgets/layoutcell.h @@ -41,6 +41,8 @@ class LayoutCell notfinal friend class LayoutArray; public: + A_DEFAULT_COPY(LayoutCell) + enum Alignment { LEFT = 0, diff --git a/src/gui/widgets/linepart.h b/src/gui/widgets/linepart.h index f1c182c0d..d88a6543e 100644 --- a/src/gui/widgets/linepart.h +++ b/src/gui/widgets/linepart.h @@ -85,6 +85,8 @@ class LinePart final return *this; } + A_DEFAULT_COPY(LinePart) + ~LinePart(); int mX; diff --git a/src/gui/widgets/linkhandler.h b/src/gui/widgets/linkhandler.h index 2478a4847..3b46e9fd3 100644 --- a/src/gui/widgets/linkhandler.h +++ b/src/gui/widgets/linkhandler.h @@ -34,6 +34,11 @@ class LinkHandler notfinal { public: + LinkHandler() + { } + + A_DELETE_COPY(LinkHandler) + virtual ~LinkHandler() { } diff --git a/src/gui/widgets/serverslistbox.h b/src/gui/widgets/serverslistbox.h index 3c0c4846d..f0815ba19 100644 --- a/src/gui/widgets/serverslistbox.h +++ b/src/gui/widgets/serverslistbox.h @@ -43,6 +43,8 @@ class ServersListBox final : public ListBox mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT); } + A_DELETE_COPY(ServersListBox) + void draw(Graphics *const graphics) override final A_NONNULL(2) { if (!mListModel) diff --git a/src/gui/widgets/tabs/socialfriendsfunctor.h b/src/gui/widgets/tabs/socialfriendsfunctor.h index f4ed1e5e2..a15f566d6 100644 --- a/src/gui/widgets/tabs/socialfriendsfunctor.h +++ b/src/gui/widgets/tabs/socialfriendsfunctor.h @@ -30,6 +30,8 @@ class SortFriendsFunctor final { public: + A_DEFAULT_COPY(SortFriendsFunctor) + bool operator() (const Avatar *const m1, const Avatar *const m2) const { diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h index da58affc5..d76bd696e 100644 --- a/src/gui/widgets/widget2.h +++ b/src/gui/widgets/widget2.h @@ -35,6 +35,8 @@ class Widget; class Widget2 notfinal { public: + A_DEFAULT_COPY(Widget2) + virtual ~Widget2() { } diff --git a/src/gui/widgets/windowcontainer.h b/src/gui/widgets/windowcontainer.h index 0143127cc..5947994ab 100644 --- a/src/gui/widgets/windowcontainer.h +++ b/src/gui/widgets/windowcontainer.h @@ -36,6 +36,8 @@ class WindowContainer notfinal : public Container public: explicit WindowContainer(const Widget2 *const widget); + A_DELETE_COPY(WindowContainer) + void slowLogic(); /** diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index 5a1cbd28e..b0e7aaa04 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -68,6 +68,8 @@ namespace class SortItemPriceFunctor final { public: + A_DEFAULT_COPY(SortItemPriceFunctor) + bool operator() (const ShopItem *const item1, const ShopItem *const item2) const { @@ -85,6 +87,8 @@ namespace class SortItemNameFunctor final { public: + A_DEFAULT_COPY(SortItemNameFunctor) + bool operator() (const ShopItem *const item1, const ShopItem *const item2) const { @@ -102,6 +106,8 @@ namespace class SortItemIdFunctor final { public: + A_DEFAULT_COPY(SortItemIdFunctor) + bool operator() (const ShopItem *const item1, const ShopItem *const item2) const { @@ -119,6 +125,8 @@ namespace class SortItemWeightFunctor final { public: + A_DEFAULT_COPY(SortItemWeightFunctor) + bool operator() (const ShopItem *const item1, const ShopItem *const item2) const { @@ -136,6 +144,8 @@ namespace class SortItemAmountFunctor final { public: + A_DEFAULT_COPY(SortItemAmountFunctor) + bool operator() (const ShopItem *const item1, const ShopItem *const item2) const { @@ -153,6 +163,8 @@ namespace class SortItemTypeFunctor final { public: + A_DEFAULT_COPY(SortItemTypeFunctor) + bool operator() (const ShopItem *const item1, const ShopItem *const item2) const { diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp index 89e9feacd..cf999ae24 100644 --- a/src/gui/windows/whoisonline.cpp +++ b/src/gui/windows/whoisonline.cpp @@ -80,6 +80,8 @@ namespace class NameFunctuator final { public: + A_DEFAULT_COPY(NameFunctuator) + bool operator()(const OnlinePlayer *left, const OnlinePlayer *right) const { |