Fix build on GCC
This commit is contained in:
parent
e83a44d7b5
commit
4d0230cc25
|
@ -4,7 +4,7 @@
|
|||
#include "routes.h"
|
||||
#include "../servehelper.h"
|
||||
|
||||
#define CSS R"EOF(
|
||||
static const constexpr char css[] = R"EOF(
|
||||
/* GENERAL */
|
||||
:root {
|
||||
--background-color: black;
|
||||
|
@ -131,10 +131,10 @@
|
|||
border-style: solid;
|
||||
border-color: var(--error-border-color);
|
||||
}
|
||||
)EOF"
|
||||
#define CSS_LEN sizeof(CSS) / sizeof(CSS[0]) - 1
|
||||
)EOF";
|
||||
#define CSS_LEN sizeof(css) / sizeof(css[0]) - 1
|
||||
|
||||
const uint64_t css_hash = FastHashConstEval(CSS, CSS_LEN, 0);
|
||||
const uint64_t css_hash = FastHashConstEval(css, CSS_LEN, 0);
|
||||
|
||||
void css_route(const httplib::Request& req, httplib::Response& res) {
|
||||
res.set_header("ETag", std::string(1, '"') + std::to_string(css_hash) + '"');
|
||||
|
@ -145,6 +145,6 @@ void css_route(const httplib::Request& req, httplib::Response& res) {
|
|||
res.set_header("Content-Length", std::to_string(CSS_LEN));
|
||||
res.set_header("Content-Type", "text/css");
|
||||
} else {
|
||||
res.set_content(CSS, CSS_LEN, "text/css");
|
||||
res.set_content(css, CSS_LEN, "text/css");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue