From 304729c3ea36ad9deecb308cd2b35745d9b00087 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 2 Feb 2024 08:48:07 +0100 Subject: [PATCH] feat: Level::get_entrance argument now const & --- src/level.cpp | 2 +- src/level.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/level.cpp b/src/level.cpp index 638a996..1a8886e 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -5,7 +5,7 @@ namespace godot { void Level::_bind_methods() {} -Transform3D Level::get_entrance(String entranceName) { +Transform3D Level::get_entrance(String const &entranceName) { if (entrances.has(entranceName)) { Node3D* entrance = Object::cast_to(this->entrances[entranceName]); diff --git a/src/level.hpp b/src/level.hpp index c5c7b65..b5b5eb0 100644 --- a/src/level.hpp +++ b/src/level.hpp @@ -15,7 +15,7 @@ class Level : public Node3D { protected: Dictionary entrances{}; public: - Transform3D get_entrance(String entranceName); + Transform3D get_entrance(String const &entranceName); void add_entrance(Entrance *entrance); void remove_entrance(Entrance *entrance); };