From 8aac2a02975c97e8c94738f674fa963534f392d5 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sun, 5 Jan 2025 15:15:54 -0300 Subject: [PATCH] fix: shadowing "date", move to the correct place (#3219) --- src/io/io_bosstiary.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/io/io_bosstiary.cpp b/src/io/io_bosstiary.cpp index 80634d11b42..351f8017718 100644 --- a/src/io/io_bosstiary.cpp +++ b/src/io/io_bosstiary.cpp @@ -28,17 +28,16 @@ void IOBosstiary::loadBoostedBoss() { return; } - auto date = result->getNumber("date"); - auto timeNow = getTimeNow(); - auto time = localtime(&timeNow); - auto today = time->tm_mday; - const auto &bossMap = getBosstiaryMap(); if (bossMap.size() <= 1) { g_logger().error("[{}] It is not possible to create a boosted boss with only one registered boss. (CODE 02)", __FUNCTION__); return; } + auto timeNow = getTimeNow(); + auto time = localtime(&timeNow); + auto today = time->tm_mday; + if (!result) { g_logger().warn("[{}] No boosted boss found in g_database(). A new one will be selected.", __FUNCTION__); } else {