1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Replace several more globals with locals

This commit is contained in:
Ivan Savenko
2025-02-27 23:34:48 +00:00
parent 782362e5ce
commit dd1b877449
6 changed files with 18 additions and 14 deletions

View File

@@ -51,8 +51,6 @@
#include "playersettings.h"
#include "validator.h"
static CBasicLogConfigurator * logConfig;
QJsonValue jsonFromPixmap(const QPixmap &p)
{
QBuffer buffer;
@@ -185,7 +183,7 @@ MainWindow::MainWindow(QWidget* parent) :
//configure logging
const boost::filesystem::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Editor_log.txt";
console = std::make_unique<CConsoleHandler>();
logConfig = new CBasicLogConfigurator(logPath, console.get());
logConfig = std::make_unique<CBasicLogConfigurator>(logPath, console.get());
logConfig->configureDefault();
logGlobal->info("Starting map editor of '%s'", GameConstants::VCMI_VERSION);
logGlobal->info("The log file will be saved to %s", logPath);