From ce09c42ae9c634408eb1965914e7eca86356977f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Pr=C3=B6tel?= Date: Mon, 30 Oct 2023 12:16:39 +0100 Subject: [PATCH 1/2] Fixed compiler warning: 'SetDecalMode' overrides a member function but is not marked 'override' --- olcPixelGameEngine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/olcPixelGameEngine.h b/olcPixelGameEngine.h index 92dee603..35019116 100644 --- a/olcPixelGameEngine.h +++ b/olcPixelGameEngine.h @@ -4359,7 +4359,7 @@ namespace olc glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } - void SetDecalMode(const olc::DecalMode& mode) + void SetDecalMode(const olc::DecalMode& mode) override { if (mode != nDecalMode) { From fb381af3f9d9c6ee3341311c842a64d1d30bb58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Pr=C3=B6tel?= Date: Mon, 30 Oct 2023 12:39:10 +0100 Subject: [PATCH 2/2] Make PixleGameEngine movable --- olcPixelGameEngine.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/olcPixelGameEngine.h b/olcPixelGameEngine.h index 35019116..a15dfc51 100644 --- a/olcPixelGameEngine.h +++ b/olcPixelGameEngine.h @@ -867,7 +867,8 @@ namespace olc { public: Renderable() = default; - Renderable(Renderable&& r) : pSprite(std::move(r.pSprite)), pDecal(std::move(r.pDecal)) {} + Renderable(Renderable&& r) = default; + Renderable& operator=(Renderable&& r) = default; Renderable(const Renderable&) = delete; olc::rcode Load(const std::string& sFile, ResourcePack* pack = nullptr, bool filter = false, bool clamp = true); void Create(uint32_t width, uint32_t height, bool filter = false, bool clamp = true); @@ -962,6 +963,9 @@ namespace olc public: PixelGameEngine(); virtual ~PixelGameEngine(); + PixelGameEngine(PixelGameEngine&&) = default; + PixelGameEngine& operator=(PixelGameEngine&&) = default; + public: olc::rcode Construct(int32_t screen_w, int32_t screen_h, int32_t pixel_w, int32_t pixel_h, bool full_screen = false, bool vsync = false, bool cohesion = false);