all ifndef replaced with pragma once
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled

This commit is contained in:
wt committed 2025-02-28 23:26:46 +07:00
1 parent 118021fa16
commit 672fdf7aa4
11 files changed
+11 -49

No files matched your search

+1 -5
View File
@@ -1,6 +1,4 @@
#ifndef OPENROUTER_HPP #pragma once
#define OPENROUTER_HPP
#include <iostream> #include <iostream>
#include <httplib.h> #include <httplib.h>
@@ -16,5 +14,3 @@ public:
~OpenRouter(); ~OpenRouter();
int serve(const std::string& ip, int port, int socket_flags = 0); int serve(const std::string& ip, int port, int socket_flags = 0);
}; };
#endif // OPENROUTER_HPP
+1 -5
View File
@@ -1,8 +1,4 @@
#ifndef AUTH_HPP #pragma once
#define AUTH_HPP
#include <iostream> #include <iostream>
bool authenticate(const std::string &token); bool authenticate(const std::string &token);
#endif // AUTH_HPP
+1 -5
View File
@@ -1,6 +1,4 @@
#ifndef HELPERS_HPP #pragma once
#define HELPERS_HPP
#include <httplib.h> #include <httplib.h>
#include <json.hpp> #include <json.hpp>
@@ -13,5 +11,3 @@ static bool check_body(const httplib::Request& request)
return false; return false;
return true; return true;
} }
#endif // HELPERS_HPP
+1 -5
View File
@@ -1,6 +1,4 @@
#ifndef CONFIG_MANAGER_HPP #pragma once
#define CONFIG_MANAGER_HPP
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <string> #include <string>
@@ -132,5 +130,3 @@ public:
return out << manager.config; return out << manager.config;
} }
}; };
#endif // CONFIG_MANAGER_HPP
+1 -4
View File
@@ -1,9 +1,6 @@
#ifndef QRTOSVG_HPP #pragma once
#define QRTOSVG_HPP
#include <string> #include <string>
#include "qrcodegen.hpp" #include "qrcodegen.hpp"
std::string toSvgString(const qrcodegen::QrCode& qr, int border); std::string toSvgString(const qrcodegen::QrCode& qr, int border);
#endif // RTOSVG_HPP
+1 -5
View File
@@ -1,6 +1,4 @@
#ifndef CORS_HPP #pragma once
#define CORS_HPP
#include <httplib.h> #include <httplib.h>
#ifdef CORS_ENABLE #ifdef CORS_ENABLE
@@ -14,6 +12,4 @@ namespace api
} }
} }
#endif // CORS_ENABLE
#endif // CORS_HPP #endif // CORS_HPP
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef REBOOT_HPP #pragma once
#define REBOOT_HPP
#include <httplib.h> #include <httplib.h>
@@ -10,5 +9,3 @@ namespace api
void reboot(const httplib::Request& request, httplib::Response& response); void reboot(const httplib::Request& request, httplib::Response& response);
} }
} }
#endif // REBOOT_HPP
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef SYSLOG_HPP #pragma once
#define SYSLOG_HPP
#include <httplib.h> #include <httplib.h>
@@ -10,5 +9,3 @@ namespace api
void get_syslog(const httplib::Request& request, httplib::Response& response); void get_syslog(const httplib::Request& request, httplib::Response& response);
} }
} }
#endif // SYSLOG_HPP
+1 -4
View File
@@ -1,10 +1,7 @@
#ifndef SYSTEM_HPP #pragma once
#define SYSTEM_HPP
#ifdef __linux__ #ifdef __linux__
#include <system/uptime/uptime.hpp> #include <system/uptime/uptime.hpp>
#endif // __linux__ #endif // __linux__
#include <system/syslog/syslog.hpp> #include <system/syslog/syslog.hpp>
#include <system/reboot/reboot.hpp> #include <system/reboot/reboot.hpp>
#endif // SYSTEM_HPP
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef UPTIME_HPP #pragma once
#define UPTIME_HPP
#include <httplib.h> #include <httplib.h>
@@ -10,5 +9,3 @@ namespace api
void get_uptime(const httplib::Request& request, httplib::Response& response); void get_uptime(const httplib::Request& request, httplib::Response& response);
} }
} }
#endif // UPTIME_HPP
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef TYPES_H #pragma once
#define TYPES_H
#define ACCESS_REQUIRED_STRING R"({"required":"[token]"})" #define ACCESS_REQUIRED_STRING R"({"required":"[token]"})"
@@ -8,5 +7,3 @@
#define JSON_TYPE "application/json" #define JSON_TYPE "application/json"
#define PLAIN_TEXT_TYPE "text/plain" #define PLAIN_TEXT_TYPE "text/plain"
#define SVG_TYPE "image/svg+xml" #define SVG_TYPE "image/svg+xml"
#endif // TYPES_H