1
0
Fork 0
mirror of https://gitlab.com/niansa/discord_llama.git synced 2025-03-06 20:48:25 +01:00

Remove all leading spaces

This commit is contained in:
niansa 2023-04-23 02:05:59 +02:00
parent ee9eaa29d1
commit 96baf6d0f0

View file

@ -452,8 +452,8 @@ int main(int argc, char **argv) {
// Read value
std::string value;
std::getline(cfgf, value);
// Erase whitespace
value.erase(0, 1);
// Erase all leading spaces
while (!value.empty() && (value[0] == ' ' || value[0] == '\t')) value.erase(0, 1);
// Check key and ignore comment lines
if (key == "token") {
cfg.token = std::move(value);