API: fix usage of stl in parseFile

This commit is contained in:
Vaxry 2024-02-09 03:28:07 +00:00
parent 25da0804b0
commit 26d2638f74
2 changed files with 3 additions and 3 deletions

View file

@ -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.

View file

@ -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);