some fixes
This commit is contained in:
parent
fe7e940d87
commit
6dfaeb9acf
3 changed files with 14 additions and 15 deletions
|
@ -20,10 +20,12 @@ 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",
|
||||
|
|
|
@ -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<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::_;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue