diff --git a/main.cpp b/main.cpp index 60f994c..218ff2a 100644 --- a/main.cpp +++ b/main.cpp @@ -30,7 +30,7 @@ int main(int argc, char **argv) const unsigned long saving_freq = std::stoul(argv[2]); if (saving_freq) //if saving frequency is 0 then auto saving is turned off { - std::thread([&argv, saving_freq]() { + std::thread([saving_freq]() { while (1) { std::this_thread::sleep_for(std::chrono::minutes(saving_freq)); @@ -47,4 +47,4 @@ int main(int argc, char **argv) app().loadConfigFile("../config.json").registerController(API).setThreadNum(std::stoul(argv[3])).enableRunAsDaemon().run(); return 0; -} \ No newline at end of file +}