mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-30 12:43:49 +01:00
Move the codebase to C++14
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user