aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-02-23 20:02:58 +0100
committersfan5 <sfan5@live.de>2022-02-26 14:39:41 +0100
commit04bd253390cc6c67a555e4837e7e48d524fdf014 (patch)
tree5b253a7ab2799686da9bdc85083e264707d06b4d /src/server.cpp
parent7db751df3bc4e3b3aff80cdacd2883f3a7a0940b (diff)
downloadminetest-04bd253390cc6c67a555e4837e7e48d524fdf014.tar.gz
minetest-04bd253390cc6c67a555e4837e7e48d524fdf014.tar.bz2
minetest-04bd253390cc6c67a555e4837e7e48d524fdf014.zip
Move the codebase to C++14
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp6
1 files changed, 3 insertions, 3 deletions
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<MetricsBackend>(createPrometheusMetricsBackend());
#else
- m_metrics_backend = std::unique_ptr<MetricsBackend>(new MetricsBackend());
+ m_metrics_backend = std::make_unique<MetricsBackend>();
#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<ServerModManager>(new ServerModManager(m_path_world));
+ m_modmgr = std::make_unique<ServerModManager>(m_path_world);
std::vector<ModSpec> 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<ServerInventoryManager>(new ServerInventoryManager());
+ m_inventory_mgr = std::make_unique<ServerInventoryManager>();
m_script->loadMod(getBuiltinLuaPath() + DIR_DELIM "init.lua", BUILTIN_MOD_NAME);