aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/crepe/Component.h5
-rw-r--r--src/test/ParticleTest.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/crepe/Component.h b/src/crepe/Component.h
index 5279fb3..6d405c7 100644
--- a/src/crepe/Component.h
+++ b/src/crepe/Component.h
@@ -27,6 +27,11 @@ protected:
//! Only the ComponentManager can create components
friend class ComponentManager;
+ Component(const Component &) = delete;
+ Component(Component &&) = delete;
+ virtual Component & operator=(const Component &) = delete;
+ virtual Component & operator=(Component &&) = delete;
+
public:
virtual ~Component() = default;
diff --git a/src/test/ParticleTest.cpp b/src/test/ParticleTest.cpp
index 4e655a9..d9bbba0 100644
--- a/src/test/ParticleTest.cpp
+++ b/src/test/ParticleTest.cpp
@@ -28,7 +28,7 @@ public:
GameObject game_object = mgr.new_object("", "", Vector2{0, 0}, 0, 0);
Color color(0, 0, 0, 0);
- Sprite test_sprite = game_object.add_component<Sprite>(
+ Sprite & test_sprite = game_object.add_component<Sprite>(
make_shared<Texture>("../asset/texture/img.png"), color,
FlipSettings{true, true});