From 0ce74416985061dee60253221a77e6b06b4ed12b Mon Sep 17 00:00:00 2001
From: WBoerenkamps <wrj.boerenkamps@student.avans.nl>
Date: Tue, 17 Dec 2024 14:38:31 +0100
Subject: readded const and used emplace instead

---
 src/crepe/system/RenderSystem.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/crepe/system')

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;
-- 
cgit v1.2.3