diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/light.cpp | 5 | ||||
-rw-r--r-- | src/light.hpp | 4 | ||||
-rw-r--r-- | src/scenery.cpp | 2 | ||||
-rw-r--r-- | src/scenery.hpp | 4 |
4 files changed, 10 insertions, 5 deletions
diff --git a/src/light.cpp b/src/light.cpp index 3e25dfc5..4f280d97 100644 --- a/src/light.cpp +++ b/src/light.cpp @@ -15,9 +15,12 @@ light_proto::light_proto() type = object_type::light; } +light_proto::~light_proto() noexcept = default; light_proto::light_proto(const light_proto&) = default; light_proto& light_proto::operator=(const light_proto&) = default; -light_proto::~light_proto() noexcept = default; +light_proto::light_proto(light_proto&&) noexcept = default; +light_proto& light_proto::operator=(light_proto&&) noexcept = default; + bool light_proto::operator==(const light_proto&) const = default; light::light(object_id id, class chunk& c, const light_proto& proto) : diff --git a/src/light.hpp b/src/light.hpp index 0033f1c5..ea65a23f 100644 --- a/src/light.hpp +++ b/src/light.hpp @@ -9,10 +9,12 @@ namespace floormat { struct light_proto : object_proto { + ~light_proto() noexcept override; light_proto(); light_proto(const light_proto&); light_proto& operator=(const light_proto&); - ~light_proto() noexcept override; + light_proto(light_proto&&) noexcept; + light_proto& operator=(light_proto&&) noexcept; bool operator==(const light_proto&) const; float max_distance = 0; diff --git a/src/scenery.cpp b/src/scenery.cpp index 6f49cfca..4d47da5a 100644 --- a/src/scenery.cpp +++ b/src/scenery.cpp @@ -64,7 +64,7 @@ bool scenery_proto::operator==(const object_proto& e0) const // --- scenery --- -enum object_type scenery::type() const override { return object_type::scenery; } // NOLINT(*-convert-*-to-static) +enum object_type scenery::type() const noexcept { return object_type::scenery; } // NOLINT(*-convert-*-to-static) float scenery::depth_offset() const { diff --git a/src/scenery.hpp b/src/scenery.hpp index 32ba3742..be57296d 100644 --- a/src/scenery.hpp +++ b/src/scenery.hpp @@ -37,7 +37,7 @@ using scenery_proto_variants = std::variant<generic_scenery_proto, door_scenery_ struct scenery_proto : object_proto { - scenery_proto_variants subtype; + scenery_proto_variants subtype; // todo! add std::monostate scenery_proto() noexcept; scenery_proto(const scenery_proto&) noexcept; @@ -55,9 +55,9 @@ struct scenery : object float depth_offset() const override; enum object_type type() const noexcept override; virtual enum scenery_type scenery_type() const = 0; + virtual explicit operator scenery_proto() const; protected: - virtual explicit operator scenery_proto() const; scenery(object_id id, class chunk& c, const scenery_proto& proto); }; |