style: Rename some variables

This commit is contained in:
[ ] 2022-09-28 12:29:33 +09:00
parent 7c3108327b
commit dc46514d7e
3 changed files with 7 additions and 7 deletions

View file

@ -34,7 +34,7 @@ public:
std::vector<std::unique_ptr<SMonitor>> m_vMonitors; std::vector<std::unique_ptr<SMonitor>> m_vMonitors;
bool m_bIPCEnabled = true; bool m_bIPCEnabled = true;
std::string explicitConfigPath; std::string m_szExplicitConfigPath;
void removeOldHyprpaperImages(); void removeOldHyprpaperImages();
void preloadAllWallpapersFromConfig(); void preloadAllWallpapersFromConfig();

View file

@ -4,17 +4,17 @@
CConfigManager::CConfigManager() { CConfigManager::CConfigManager() {
// init the entire thing // init the entire thing
std::string CONFIGPATH; std::string configPath;
if (g_pHyprpaper->explicitConfigPath == "") { if (g_pHyprpaper->m_szExplicitConfigPath == "") {
const char *const ENVHOME = getenv("HOME"); const char *const ENVHOME = getenv("HOME");
CONFIGPATH = ENVHOME + (std::string) "/.config/hypr/hyprpaper.conf"; configPath = ENVHOME + (std::string) "/.config/hypr/hyprpaper.conf";
} }
else { else {
CONFIGPATH = g_pHyprpaper->explicitConfigPath; configPath = g_pHyprpaper->m_szExplicitConfigPath;
} }
std::ifstream ifs; std::ifstream ifs;
ifs.open(CONFIGPATH); ifs.open(configPath);
if (!ifs.good()) { if (!ifs.good()) {
Debug::log(CRIT, "Hyprpaper was not provided a config!"); Debug::log(CRIT, "Hyprpaper was not provided a config!");

View file

@ -21,7 +21,7 @@ int main(int argc, char** argv, char** envp) {
// starts // starts
g_pHyprpaper = std::make_unique<CHyprpaper>(); g_pHyprpaper = std::make_unique<CHyprpaper>();
g_pHyprpaper->explicitConfigPath = configPath; g_pHyprpaper->m_szExplicitConfigPath = configPath;
g_pHyprpaper->init(); g_pHyprpaper->init();
return 0; return 0;