diff --git a/src/OpenRouter/OpenRouter.hpp b/src/OpenRouter/OpenRouter.hpp index 4e0745f..e2f5479 100644 --- a/src/OpenRouter/OpenRouter.hpp +++ b/src/OpenRouter/OpenRouter.hpp @@ -1,6 +1,4 @@ -#ifndef OPENROUTER_HPP -#define OPENROUTER_HPP - +#pragma once #include #include @@ -16,5 +14,3 @@ public: ~OpenRouter(); int serve(const std::string& ip, int port, int socket_flags = 0); }; - -#endif // OPENROUTER_HPP diff --git a/src/auth/auth.hpp b/src/auth/auth.hpp index dbc520b..7ba1da4 100644 --- a/src/auth/auth.hpp +++ b/src/auth/auth.hpp @@ -1,8 +1,4 @@ -#ifndef AUTH_HPP -#define AUTH_HPP - +#pragma once #include bool authenticate(const std::string &token); - -#endif // AUTH_HPP \ No newline at end of file diff --git a/src/helpers.hpp b/src/helpers.hpp index b676831..fe85b1c 100644 --- a/src/helpers.hpp +++ b/src/helpers.hpp @@ -1,6 +1,4 @@ -#ifndef HELPERS_HPP -#define HELPERS_HPP - +#pragma once #include #include @@ -13,5 +11,3 @@ static bool check_body(const httplib::Request& request) return false; return true; } - -#endif // HELPERS_HPP diff --git a/src/libs/ConfigManager.hpp b/src/libs/ConfigManager.hpp index 087d55b..bef00aa 100644 --- a/src/libs/ConfigManager.hpp +++ b/src/libs/ConfigManager.hpp @@ -1,6 +1,4 @@ -#ifndef CONFIG_MANAGER_HPP -#define CONFIG_MANAGER_HPP - +#pragma once #include #include #include @@ -132,5 +130,3 @@ public: return out << manager.config; } }; - -#endif // CONFIG_MANAGER_HPP diff --git a/src/libs/QR-Code-generator/qrtosvg.hpp b/src/libs/QR-Code-generator/qrtosvg.hpp index 6924624..a6a443c 100644 --- a/src/libs/QR-Code-generator/qrtosvg.hpp +++ b/src/libs/QR-Code-generator/qrtosvg.hpp @@ -1,9 +1,6 @@ -#ifndef QRTOSVG_HPP -#define QRTOSVG_HPP +#pragma once #include #include "qrcodegen.hpp" std::string toSvgString(const qrcodegen::QrCode& qr, int border); - -#endif // RTOSVG_HPP diff --git a/src/security/cors.hpp b/src/security/cors.hpp index 928fb5f..d64754d 100755 --- a/src/security/cors.hpp +++ b/src/security/cors.hpp @@ -1,6 +1,4 @@ -#ifndef CORS_HPP -#define CORS_HPP - +#pragma once #include #ifdef CORS_ENABLE @@ -14,6 +12,4 @@ namespace api } } -#endif // CORS_ENABLE - #endif // CORS_HPP diff --git a/src/system/reboot/reboot.hpp b/src/system/reboot/reboot.hpp index 1d18007..4a75856 100644 --- a/src/system/reboot/reboot.hpp +++ b/src/system/reboot/reboot.hpp @@ -1,5 +1,4 @@ -#ifndef REBOOT_HPP -#define REBOOT_HPP +#pragma once #include @@ -10,5 +9,3 @@ namespace api void reboot(const httplib::Request& request, httplib::Response& response); } } - -#endif // REBOOT_HPP diff --git a/src/system/syslog/syslog.hpp b/src/system/syslog/syslog.hpp index 8bce7c9..f899097 100644 --- a/src/system/syslog/syslog.hpp +++ b/src/system/syslog/syslog.hpp @@ -1,5 +1,4 @@ -#ifndef SYSLOG_HPP -#define SYSLOG_HPP +#pragma once #include @@ -10,5 +9,3 @@ namespace api void get_syslog(const httplib::Request& request, httplib::Response& response); } } - -#endif // SYSLOG_HPP diff --git a/src/system/system.hpp b/src/system/system.hpp index ea3b7f9..9350088 100644 --- a/src/system/system.hpp +++ b/src/system/system.hpp @@ -1,10 +1,7 @@ -#ifndef SYSTEM_HPP -#define SYSTEM_HPP +#pragma once #ifdef __linux__ #include #endif // __linux__ #include #include - -#endif // SYSTEM_HPP diff --git a/src/system/uptime/uptime.hpp b/src/system/uptime/uptime.hpp index e2dc676..9823c0e 100644 --- a/src/system/uptime/uptime.hpp +++ b/src/system/uptime/uptime.hpp @@ -1,5 +1,4 @@ -#ifndef UPTIME_HPP -#define UPTIME_HPP +#pragma once #include @@ -10,5 +9,3 @@ namespace api void get_uptime(const httplib::Request& request, httplib::Response& response); } } - -#endif // UPTIME_HPP diff --git a/src/types.hpp b/src/types.hpp index 0087a09..5831cb5 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -1,5 +1,4 @@ -#ifndef TYPES_H -#define TYPES_H +#pragma once #define ACCESS_REQUIRED_STRING R"({"required":"[token]"})" @@ -8,5 +7,3 @@ #define JSON_TYPE "application/json" #define PLAIN_TEXT_TYPE "text/plain" #define SVG_TYPE "image/svg+xml" - -#endif // TYPES_H