From f307ed3448542c7fe0c27bb547e648e280791b5d Mon Sep 17 00:00:00 2001 From: PoliEcho Date: Mon, 14 Apr 2025 10:42:58 +0200 Subject: [PATCH] reformat main --- src/main.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 385dffe..9e4a582 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,8 @@ -#include "color.h" -#include "const.h" +#include #include #include -#include +#include "color.h" +#include "const.h" void PrintHelp() { std::cout << RED R"( ____ ____ @@ -24,21 +24,21 @@ void PrintVersion() { exit(0); } -int main(int argc, char *argv[]) { +int main(int argc, char* argv[]) { int opt; while ((opt = getopt(argc, argv, "hV")) != -1) { switch (opt) { - case 'h': - PrintHelp(); - break; - case 'V': - PrintVersion(); - break; - default: - std::cerr << RED "[ERROR]" << RESET " invalid option: " << (char)optopt - << "\ntry: -h\n"; - return EINVAL; + case 'h': + PrintHelp(); + break; + case 'V': + PrintVersion(); + break; + default: + std::cerr << RED "[ERROR]" << RESET " invalid option: " << (char)optopt + << "\ntry: -h\n"; + return EINVAL; } }