From 0e0389752a0912614737e5c059b5cd4719ef9cf2 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 10 Mar 2015 19:42:04 -0400 Subject: Const correctness! Also created savefile and refactored collisions a bit. --- src/entity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/entity.h') diff --git a/src/entity.h b/src/entity.h index 803a9b8..266fe11 100644 --- a/src/entity.h +++ b/src/entity.h @@ -34,7 +34,7 @@ class Message { class Entity { public: void addComponent(std::shared_ptr c); - void send(Game& game, Message& msg); + void send(Game& game, const Message& msg); void tick(Game& game); void input(Game& game, int key, int action); void render(Game& game, Texture& buffer); @@ -49,7 +49,7 @@ class Entity { class Component { public: - virtual void receive(Game&, Entity&, Message&) {} + virtual void receive(Game&, Entity&, const Message&) {} virtual void render(Game&, Entity&, Texture&) {} virtual void tick(Game&, Entity&) {} virtual void input(Game&, Entity&, int, int) {} -- cgit 1.4.1