diff --git a/src/Main.cpp b/src/Main.cpp index a423803..ee10780 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -6,13 +6,14 @@ static bool run; -void leave(int signum); - int main(void) { std::cout << "Indivisible v0.1\n"; run = true; - signal(SIGINT, leave); + signal(SIGINT, [](int signum) { + std::cout << "Exiting (" << signum << ")\n"; + run = false; + }); std::vector primes; primes.push_back(2); @@ -49,8 +50,3 @@ int main(void) { return 0; } - -void leave(int signum) { - std::cout << "Exiting (" << signum << ")\n"; - run = false; -}