diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp index d724139..2cffe4c 100644 --- a/libhyprcursor/hyprcursor.cpp +++ b/libhyprcursor/hyprcursor.cpp @@ -17,17 +17,16 @@ using namespace Hyprcursor; static std::vector getSystemThemeDirs() { - char* envXdgData = std::getenv("XDG_DATA_DIRS"); + const auto envXdgData = std::getenv("XDG_DATA_DIRS"); std::vector result; if (envXdgData) { std::stringstream envXdgStream(envXdgData); std::string tmpStr; - while (getline(envXdgStream, tmpStr, ':')) { + while (getline(envXdgStream, tmpStr, ':')) result.push_back((tmpStr + "/icons")); - } - } else { - std::vector result = {"/usr/share/icons"}; - } + } else + result = {"/usr/share/icons"}; + return result; }