diff --git a/src/main.cpp b/src/main.cpp index 547b849..6273a3b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -72,9 +72,8 @@ int main(int argc, char** argv, char** envp) { } try { - auto configManager = std::make_unique(configPath); - configManager->init(); - g_pConfigManager = std::move(configManager); + g_pConfigManager = std::make_unique(configPath); + g_pConfigManager->init(); } catch (const std::exception& ex) { Debug::log(CRIT, "ConfigManager threw: {}", ex.what()); if (std::string(ex.what()).contains("File does not exist")) @@ -84,8 +83,7 @@ int main(int argc, char** argv, char** envp) { } try { - auto hyprlock = std::make_unique(wlDisplay, immediate); - g_pHyprlock = std::move(hyprlock); + g_pHyprlock = std::make_unique(wlDisplay, immediate); g_pHyprlock->run(); } catch (const std::exception& ex) { Debug::log(CRIT, "Hyprlock threw: {}", ex.what());