diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 14:38:31 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 14:38:31 +0100 |
commit | 0ce74416985061dee60253221a77e6b06b4ed12b (patch) | |
tree | 6eafafdcfb6d2928fbab2a796f64055c01345543 /src/crepe | |
parent | 69ca7fdd738fd4ed98aefc07bab5a43486a55619 (diff) |
readded const and used emplace instead
Diffstat (limited to 'src/crepe')
-rw-r--r-- | src/crepe/api/Asset.h | 2 | ||||
-rw-r--r-- | src/crepe/system/RenderSystem.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/api/Asset.h b/src/crepe/api/Asset.h index b367a92..bfd0ac7 100644 --- a/src/crepe/api/Asset.h +++ b/src/crepe/api/Asset.h @@ -37,7 +37,7 @@ public: private: //! path to asset - std::string src; + const std::string src; private: /** diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp index a03c636..5b2528a 100644 --- a/src/crepe/system/RenderSystem.cpp +++ b/src/crepe/system/RenderSystem.cpp @@ -147,7 +147,7 @@ void RenderSystem::render_text(Text & text, const Transform & tm) { SDLContext & ctx = this->mediator.sdl_context; if (!text.font.has_value()) { - text.font = ctx.get_font_from_name(text.font_family); + text.font.emplace(ctx.get_font_from_name(text.font_family)); } ResourceManager & resource_manager = this->mediator.resource_manager; |