diff --git a/src/Core/SystemData.cpp b/src/Core/SystemData.cpp index d6eee9d..0f868f3 100644 --- a/src/Core/SystemData.cpp +++ b/src/Core/SystemData.cpp @@ -20,14 +20,16 @@ namespace { using util::types::i32, util::types::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)( - is | in(11, 13) = "th", - is | 1 = "st", - is | 2 = "nd", - is | 3 = "rd", - is | _ = "th" + is | 1 = "st", + is | 2 = "nd", + is | 3 = "rd", + is | _ = "th" ); } diff --git a/src/main.cpp b/src/main.cpp index b1d7fa5..ba91f01 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,13 +40,13 @@ fn main(const i32 argc, char* argv[]) -> i32 try { .help("Enable verbose logging. Overrides --log-level.") .flag(); - if (Result result = parser.parse_args(argc, argv); !result) { + if (Result<> result = parser.parse_args(argc, argv); !result) { error_at(result.error()); return EXIT_FAILURE; } bool verbose = parser.get("-V").value_or(false) || parser.get("--verbose").value_or(false); - Result logLevelStr = verbose ? "debug" : parser.get("--log-level"); + Result logLevelStr = verbose ? "debug" : parser.get("--log-level"); { using matchit::match, matchit::is, matchit::_; diff --git a/subprojects/sqlitecpp.wrap b/subprojects/sqlitecpp.wrap index 129ee94..ea8e22a 100644 --- a/subprojects/sqlitecpp.wrap +++ b/subprojects/sqlitecpp.wrap @@ -1,10 +1,7 @@ -[wrap-file] -directory = SQLiteCpp-3.3.2 -source_url = https://github.com/SRombauts/SQLiteCpp/archive/refs/tags/3.3.2.zip -source_filename = sqlitecpp-3.3.2.zip -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 +[wrap-git] +url = https://github.com/SRombauts/SQLiteCpp.git +revision = HEAD +directory = SQLiteCpp [provide] sqlitecpp = sqlitecpp_dep