From d93544b8464950010615d5ef72207f554a27d06f Mon Sep 17 00:00:00 2001 From: noffie Date: Tue, 18 Mar 2025 23:23:42 +0100 Subject: [PATCH] adding more consts!!! --- src/Game.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Game.cpp b/src/Game.cpp index 5dc5208..afc6710 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -9,22 +9,22 @@ void Game::run() { #ifdef _DEBUG std::cout << "Loading map... Version: " MAP_VERSION_STRING << std::endl; - auto start = std::chrono::system_clock::now(); + const auto start = std::chrono::system_clock::now(); #endif - auto err = map.load(ASSETS_PATH "/test.cymf"); + auto [message, code] = map.load(ASSETS_PATH "/test.cymf"); #ifdef _DEBUG - auto end = std::chrono::system_clock::now(); - auto milliseconds = std::chrono::duration_cast(end - start); + const auto end = std::chrono::system_clock::now(); + const auto milliseconds = std::chrono::duration_cast(end - start); std::cout << "Loading took: " << milliseconds << std::endl; #endif map.setPosition(sf::Vector2f{20, 20}); - if (err.code != 0) + if (code != 0) { - std::cout << err.message << std::endl; + std::cout << message << std::endl; return; } #ifdef _DEBUG