diff --git a/include/hyprlang.hpp b/include/hyprlang.hpp index b43ed49..f549787 100644 --- a/include/hyprlang.hpp +++ b/include/hyprlang.hpp @@ -274,7 +274,7 @@ namespace Hyprlang { Same as parse(), but parse a specific file, without any refreshing. recommended to use for stuff like source = path.conf */ - CParseResult parseFile(std::string file); + CParseResult parseFile(const char* file); /*! Parse a single "line", dynamically. diff --git a/src/config.cpp b/src/config.cpp index be1f85c..213e963 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -506,12 +506,12 @@ CParseResult CConfig::parse() { if (impl->path.empty()) return CParseResult{}; - CParseResult fileParseResult = parseFile(impl->path); + CParseResult fileParseResult = parseFile(impl->path.c_str()); return fileParseResult; } -CParseResult CConfig::parseFile(std::string file) { +CParseResult CConfig::parseFile(const char* file) { CParseResult result; std::ifstream iffile(file);