diff options
| author | BossCode45 <human.cyborg42@gmail.com> | 2023-06-21 20:38:24 +1200 |
|---|---|---|
| committer | BossCode45 <human.cyborg42@gmail.com> | 2023-06-21 20:38:24 +1200 |
| commit | 4f090897faae6c6d8e451281dc862d58bf9f05ba (patch) | |
| tree | 16124789c04fbe52b2b51266e299f7d26259955f /config.cpp | |
| parent | 8b4b487e685c72a478baf74aea2bf756988fe550 (diff) | |
| parent | 5c799ffa098f6c9b6d88513c2662968a9f5aaa41 (diff) | |
| download | YATwm-4f090897faae6c6d8e451281dc862d58bf9f05ba.tar.gz YATwm-4f090897faae6c6d8e451281dc862d58bf9f05ba.zip | |
Merge branch 'config-refactor'
Added a proper arg parser and made "\" an escape character
Diffstat (limited to 'config.cpp')
| -rw-r--r-- | config.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -98,6 +98,7 @@ std::vector<Err> Config::loadFromFile(std::string path) int line = 0; while(getline(config, cmd)) { + line++; if(cmd.size() == 0) continue; if(cmd.at(0) == '#') @@ -111,7 +112,6 @@ std::vector<Err> Config::loadFromFile(std::string path) errs.push_back({e.code, "Error in config (line " + std::to_string(line) + "): " + std::to_string(e.code) + "\n\tMessage: " + e.message}); } - line++; } loaded = true; return errs; |
