diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-01-23 21:55:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-23 21:55:41 +0100 |
| commit | 0a1ae48a9fd6eb76baad27de98c00f653a55e4ac (patch) | |
| tree | 007cd36eb83d343d2aba49cf0741028c5f554895 /src/config/ConfigManager.cpp | |
| parent | ae403e6a05452336abd97e61be2706f6a930d827 (diff) | |
core: move all shared_ptrs from the STL to hyprutils (#9143)
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 60b818f0..08f0f33f 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -44,6 +44,7 @@ #include <unordered_set> #include <hyprutils/string/String.hpp> #include <filesystem> +#include <memory> using namespace Hyprutils::String; using namespace Hyprutils::Animation; @@ -374,7 +375,7 @@ CConfigManager::CConfigManager() { const auto ERR = verifyConfigExists(); m_configPaths.emplace_back(getMainConfigPath()); - m_pConfig = std::make_unique<Hyprlang::CConfig>(m_configPaths.begin()->c_str(), Hyprlang::SConfigOptions{.throwAllErrors = true, .allowMissingConfig = true}); + m_pConfig = makeUnique<Hyprlang::CConfig>(m_configPaths.begin()->c_str(), Hyprlang::SConfigOptions{.throwAllErrors = true, .allowMissingConfig = true}); m_pConfig->addConfigValue("general:border_size", Hyprlang::INT{1}); m_pConfig->addConfigValue("general:no_border_on_floating", Hyprlang::INT{0}); @@ -955,9 +956,8 @@ void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) { // enable/disable xwayland usage if (!isFirstLaunch) { bool prevEnabledXwayland = g_pXWayland->enabled(); - if (g_pCompositor->m_bWantsXwayland != prevEnabledXwayland) { - g_pXWayland = std::make_unique<CXWayland>(g_pCompositor->m_bWantsXwayland); - } + if (g_pCompositor->m_bWantsXwayland != prevEnabledXwayland) + g_pXWayland = makeUnique<CXWayland>(g_pCompositor->m_bWantsXwayland); } else g_pCompositor->m_bWantsXwayland = PENABLEXWAYLAND; #endif @@ -1659,7 +1659,7 @@ void CConfigManager::addExecRule(const SExecRequestedRule& rule) { } void CConfigManager::handlePluginLoads() { - if (g_pPluginSystem == nullptr) + if (!g_pPluginSystem) return; bool pluginsChanged = false; |
