1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 00:55:20 +02:00

Replace some raw pointers by unique_ptr (#16304)

This commit is contained in:
Lucas OH
2025-08-06 23:17:34 +02:00
committed by GitHub
parent c611a1f9e8
commit ecc876045f
12 changed files with 56 additions and 48 deletions

View File

@@ -122,7 +122,7 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
// This is only global so it can be used by RenderingEngine::draw_load_screen().
assert(!g_menucloudsmgr && !g_menuclouds);
std::unique_ptr<IWritableShaderSource> ssrc(createShaderSource());
ssrc->addShaderUniformSetterFactory(new FogShaderUniformSetterFactory());
ssrc->addShaderUniformSetterFactory(std::make_unique<FogShaderUniformSetterFactory>());
g_menucloudsmgr = m_rendering_engine->get_scene_manager()->createNewSceneManager();
g_menuclouds = new Clouds(g_menucloudsmgr, ssrc.get(), -1, rand());
g_menuclouds->setHeight(100.0f);