all ifndef replaced with pragma once #20
@@ -1,6 +1,4 @@
|
||||
#ifndef OPENROUTER_HPP
|
||||
#define OPENROUTER_HPP
|
||||
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include <httplib.h>
|
||||
|
||||
@@ -16,5 +14,3 @@ public:
|
||||
~OpenRouter();
|
||||
int serve(const std::string& ip, int port, int socket_flags = 0);
|
||||
};
|
||||
|
||||
#endif // OPENROUTER_HPP
|
||||
|
||||
+1
-5
@@ -1,8 +1,4 @@
|
||||
#ifndef AUTH_HPP
|
||||
#define AUTH_HPP
|
||||
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
|
||||
bool authenticate(const std::string &token);
|
||||
|
||||
#endif // AUTH_HPP
|
||||
+1
-5
@@ -1,6 +1,4 @@
|
||||
#ifndef HELPERS_HPP
|
||||
#define HELPERS_HPP
|
||||
|
||||
#pragma once
|
||||
#include <httplib.h>
|
||||
#include <json.hpp>
|
||||
|
||||
@@ -13,5 +11,3 @@ static bool check_body(const httplib::Request& request)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // HELPERS_HPP
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#ifndef CONFIG_MANAGER_HPP
|
||||
#define CONFIG_MANAGER_HPP
|
||||
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
@@ -132,5 +130,3 @@ public:
|
||||
return out << manager.config;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CONFIG_MANAGER_HPP
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#ifndef QRTOSVG_HPP
|
||||
#define QRTOSVG_HPP
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "qrcodegen.hpp"
|
||||
|
||||
std::string toSvgString(const qrcodegen::QrCode& qr, int border);
|
||||
|
||||
#endif // RTOSVG_HPP
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#ifndef CORS_HPP
|
||||
#define CORS_HPP
|
||||
|
||||
#pragma once
|
||||
#include <httplib.h>
|
||||
|
||||
#ifdef CORS_ENABLE
|
||||
@@ -14,6 +12,4 @@ namespace api
|
||||
}
|
||||
}
|
||||
|
||||
#endif // CORS_ENABLE
|
||||
|
||||
#endif // CORS_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef REBOOT_HPP
|
||||
#define REBOOT_HPP
|
||||
#pragma once
|
||||
|
||||
#include <httplib.h>
|
||||
|
||||
@@ -10,5 +9,3 @@ namespace api
|
||||
void reboot(const httplib::Request& request, httplib::Response& response);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // REBOOT_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef SYSLOG_HPP
|
||||
#define SYSLOG_HPP
|
||||
#pragma once
|
||||
|
||||
#include <httplib.h>
|
||||
|
||||
@@ -10,5 +9,3 @@ namespace api
|
||||
void get_syslog(const httplib::Request& request, httplib::Response& response);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SYSLOG_HPP
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
#ifndef SYSTEM_HPP
|
||||
#define SYSTEM_HPP
|
||||
#pragma once
|
||||
|
||||
#ifdef __linux__
|
||||
#include <system/uptime/uptime.hpp>
|
||||
#endif // __linux__
|
||||
#include <system/syslog/syslog.hpp>
|
||||
#include <system/reboot/reboot.hpp>
|
||||
|
||||
#endif // SYSTEM_HPP
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef UPTIME_HPP
|
||||
#define UPTIME_HPP
|
||||
#pragma once
|
||||
|
||||
#include <httplib.h>
|
||||
|
||||
@@ -10,5 +9,3 @@ namespace api
|
||||
void get_uptime(const httplib::Request& request, httplib::Response& response);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // UPTIME_HPP
|
||||
|
||||
+1
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user