From 04bd253390cc6c67a555e4837e7e48d524fdf014 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 23 Feb 2022 20:02:58 +0100 Subject: Move the codebase to C++14 --- src/server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index 685d8bb25..d9205c895 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -254,7 +254,7 @@ Server::Server( #if USE_PROMETHEUS m_metrics_backend = std::unique_ptr(createPrometheusMetricsBackend()); #else - m_metrics_backend = std::unique_ptr(new MetricsBackend()); + m_metrics_backend = std::make_unique(); #endif m_uptime_counter = m_metrics_backend->addCounter("minetest_core_server_uptime", "Server uptime (in seconds)"); @@ -406,7 +406,7 @@ void Server::init() m_mod_storage_database = openModStorageDatabase(m_path_world); m_mod_storage_database->beginSave(); - m_modmgr = std::unique_ptr(new ServerModManager(m_path_world)); + m_modmgr = std::make_unique(m_path_world); std::vector unsatisfied_mods = m_modmgr->getUnsatisfiedMods(); // complain about mods with unsatisfied dependencies if (!m_modmgr->isConsistent()) { @@ -426,7 +426,7 @@ void Server::init() m_script = new ServerScripting(this); // Must be created before mod loading because we have some inventory creation - m_inventory_mgr = std::unique_ptr(new ServerInventoryManager()); + m_inventory_mgr = std::make_unique(); m_script->loadMod(getBuiltinLuaPath() + DIR_DELIM "init.lua", BUILTIN_MOD_NAME); -- cgit v1.2.3