mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 12:37:08 +11:00
fixed build issues
This commit is contained in:
parent
0dae1c3a74
commit
2e05197791
2 changed files with 52 additions and 45 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
// `max_log_size` must be divisible by `pre_log_size`
|
||||
constexpr auto max_log_size = 100; // Setting to 0 does not compile logging
|
||||
constexpr auto pre_log_size = 10;
|
||||
constexpr unsigned max_log_size = 100; // Setting to 0 does not compile logging
|
||||
constexpr unsigned pre_log_size = 10;
|
||||
|
|
|
|||
9
main.cpp
9
main.cpp
|
|
@ -23,7 +23,13 @@ void SaveSig(int s)
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
static_assert(pre_log_size <= max_log_size, "`max_log_size` must be larger than `pre_log_size`.");
|
||||
static_assert(!(max_log_size % pre_log_size) + (!max_log_size), "`max_log_size` must be a multiple of `pre_log_size`.");
|
||||
if constexpr (!(max_log_size % pre_log_size) && max_log_size)
|
||||
{
|
||||
std::cerr << "`max_log_size` must be a multiple of `pre_log_size`.\n";
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (argc != 4)
|
||||
{
|
||||
|
|
@ -71,6 +77,7 @@ int main(int argc, char **argv)
|
|||
resp->addHeader("Access-Control-Allow-Origin", "*");
|
||||
});
|
||||
app().loadConfigFile("../config.json").registerController(API).setThreadNum(std::stoul(argv[3])).run();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue