From 0f64a06317df182ab0ff4a0ae9fbe1aad880dcc0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 17 Jan 2017 18:21:23 +0300 Subject: Add missing A_DEFAULT_COPY / A_DELETE_COPY into resources. --- src/resources/map/location.h | 10 ++++++++-- src/resources/map/map.cpp | 5 ++++- src/resources/map/map.h | 2 ++ src/resources/map/mapobject.h | 8 ++++++-- src/resources/map/properties.h | 2 ++ src/resources/map/tileinfo.h | 2 ++ 6 files changed, 24 insertions(+), 5 deletions(-) (limited to 'src/resources/map') diff --git a/src/resources/map/location.h b/src/resources/map/location.h index c598c98f4..44d2619a7 100644 --- a/src/resources/map/location.h +++ b/src/resources/map/location.h @@ -35,10 +35,16 @@ struct Location final /** * Constructor. */ - Location(const int px, const int py, MetaTile *const ptile) : - x(px), y(py), tile(ptile) + Location(const int px, + const int py, + MetaTile *const ptile) : + x(px), + y(py), + tile(ptile) {} + A_DEFAULT_COPY(Location) + /** * Comparison operator. */ diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 6070a137b..5cd8affb9 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -77,7 +77,10 @@ class ActorFunctuator final { public: - bool operator()(const Actor *const a, const Actor *const b) const + A_DEFAULT_COPY(ActorFunctuator) + + bool operator()(const Actor *const a, + const Actor *const b) const { if (!a || !b) return false; diff --git a/src/resources/map/map.h b/src/resources/map/map.h index d9811d8b9..1d5ccefdc 100644 --- a/src/resources/map/map.h +++ b/src/resources/map/map.h @@ -442,6 +442,8 @@ class Map final : public Properties, { } + A_DEFAULT_COPY(ParticleEffectData) + const2 std::string file; const2 int x; const2 int y; diff --git a/src/resources/map/mapobject.h b/src/resources/map/mapobject.h index d76dcd2e9..07b25d3ec 100644 --- a/src/resources/map/mapobject.h +++ b/src/resources/map/mapobject.h @@ -30,11 +30,15 @@ class MapObject final { public: - MapObject(const int type0, const std::string &data0) : - type(type0), data(data0) + MapObject(const int type0, + const std::string &data0) : + type(type0), + data(data0) { } + A_DEFAULT_COPY(MapObject) + int type; std::string data; }; diff --git a/src/resources/map/properties.h b/src/resources/map/properties.h index 54c7b17e5..31d8cfe77 100644 --- a/src/resources/map/properties.h +++ b/src/resources/map/properties.h @@ -39,6 +39,8 @@ class Properties notfinal { } + A_DELETE_COPY(Properties) + /** * Destructor. */ diff --git a/src/resources/map/tileinfo.h b/src/resources/map/tileinfo.h index b26175ca9..bb92be4fc 100644 --- a/src/resources/map/tileinfo.h +++ b/src/resources/map/tileinfo.h @@ -36,6 +36,8 @@ struct TileInfo final { } + A_DELETE_COPY(TileInfo) + /* tile image */ Image *image; /* repeated tile width in pixels */ -- cgit v1.2.3-70-g09d2