diff options
| author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-21 10:52:22 +0100 | 
|---|---|---|
| committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-21 10:52:22 +0100 | 
| commit | db66bb4babb19e8a86d5c61281c8b94469729d03 (patch) | |
| tree | 83c25f47797c7bd8e06d15412a9859599788569a /src/crepe/api/Script.cpp | |
| parent | 5134bebc19c46e4e07a5ec3af1d3f3d2d17a86dd (diff) | |
use OptionalRef instead of pointer references
Diffstat (limited to 'src/crepe/api/Script.cpp')
| -rw-r--r-- | src/crepe/api/Script.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/api/Script.cpp b/src/crepe/api/Script.cpp index 0e73848..8bb3ef6 100644 --- a/src/crepe/api/Script.cpp +++ b/src/crepe/api/Script.cpp @@ -3,7 +3,7 @@  using namespace crepe;  Script::~Script() { -	EventManager & evmgr = *this->event_manager_ref; +	EventManager & evmgr = this->event_manager;  	for (auto id : this->listeners) {  		evmgr.unsubscribe(id);  	} @@ -11,6 +11,6 @@ Script::~Script() {  template <>  void Script::subscribe(const EventHandler<CollisionEvent> & callback) { -	const game_object_id_t & game_object_id = *this->game_object_id_ref; +	const game_object_id_t & game_object_id = this->game_object_id;  	this->subscribe_internal(callback, game_object_id);  }  |