some fixes
This commit is contained in:
parent
fe7e940d87
commit
6dfaeb9acf
3 changed files with 14 additions and 15 deletions
|
@ -20,14 +20,16 @@ namespace {
|
||||||
using util::types::i32, util::types::CStr;
|
using util::types::i32, util::types::CStr;
|
||||||
|
|
||||||
fn getOrdinalSuffix(const i32 day) -> CStr {
|
fn getOrdinalSuffix(const i32 day) -> CStr {
|
||||||
using matchit::match, matchit::is, matchit::_, matchit::in;
|
using matchit::match, matchit::is, matchit::_, matchit::or_;
|
||||||
|
|
||||||
|
if (day == 11 || day == 12 || day == 13)
|
||||||
|
return "th";
|
||||||
|
|
||||||
return match(day % 10)(
|
return match(day % 10)(
|
||||||
is | in(11, 13) = "th",
|
is | 1 = "st",
|
||||||
is | 1 = "st",
|
is | 2 = "nd",
|
||||||
is | 2 = "nd",
|
is | 3 = "rd",
|
||||||
is | 3 = "rd",
|
is | _ = "th"
|
||||||
is | _ = "th"
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,13 +40,13 @@ fn main(const i32 argc, char* argv[]) -> i32 try {
|
||||||
.help("Enable verbose logging. Overrides --log-level.")
|
.help("Enable verbose logging. Overrides --log-level.")
|
||||||
.flag();
|
.flag();
|
||||||
|
|
||||||
if (Result result = parser.parse_args(argc, argv); !result) {
|
if (Result<> result = parser.parse_args(argc, argv); !result) {
|
||||||
error_at(result.error());
|
error_at(result.error());
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool verbose = parser.get<bool>("-V").value_or(false) || parser.get<bool>("--verbose").value_or(false);
|
bool verbose = parser.get<bool>("-V").value_or(false) || parser.get<bool>("--verbose").value_or(false);
|
||||||
Result logLevelStr = verbose ? "debug" : parser.get<String>("--log-level");
|
Result<String> logLevelStr = verbose ? "debug" : parser.get<String>("--log-level");
|
||||||
|
|
||||||
{
|
{
|
||||||
using matchit::match, matchit::is, matchit::_;
|
using matchit::match, matchit::is, matchit::_;
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
[wrap-file]
|
[wrap-git]
|
||||||
directory = SQLiteCpp-3.3.2
|
url = https://github.com/SRombauts/SQLiteCpp.git
|
||||||
source_url = https://github.com/SRombauts/SQLiteCpp/archive/refs/tags/3.3.2.zip
|
revision = HEAD
|
||||||
source_filename = sqlitecpp-3.3.2.zip
|
directory = SQLiteCpp
|
||||||
source_hash = 1f41ef7322da573fdfca95655bd1329282638b4d9d3dc16a48f4bad16008eda8
|
|
||||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sqlitecpp_3.3.2-1/sqlitecpp-3.3.2.zip
|
|
||||||
wrapdb_version = 3.3.2-1
|
|
||||||
|
|
||||||
[provide]
|
[provide]
|
||||||
sqlitecpp = sqlitecpp_dep
|
sqlitecpp = sqlitecpp_dep
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue