This commit is contained in:
parent
dbbaaa46b9
commit
287d42f2b9
4
deps/ox/src/ox/clargs/clargs.cpp
vendored
4
deps/ox/src/ox/clargs/clargs.cpp
vendored
@ -14,10 +14,10 @@ namespace ox {
|
|||||||
ClArgs::ClArgs(int argc, const char **args) noexcept {
|
ClArgs::ClArgs(int argc, const char **args) noexcept {
|
||||||
auto const argv = ox::SpanView{args, static_cast<size_t>(argc)};
|
auto const argv = ox::SpanView{args, static_cast<size_t>(argc)};
|
||||||
for (auto i = 0u; i < static_cast<unsigned>(argc); ++i) {
|
for (auto i = 0u; i < static_cast<unsigned>(argc); ++i) {
|
||||||
auto arg = String(argv[i]);
|
auto arg = StringView(argv[i]);
|
||||||
if (arg[0] == '-') {
|
if (arg[0] == '-') {
|
||||||
while (arg[0] == '-' && arg.len()) {
|
while (arg[0] == '-' && arg.len()) {
|
||||||
arg = arg.substr(1);
|
arg = substr(arg, 1);
|
||||||
}
|
}
|
||||||
m_bools[arg] = true;
|
m_bools[arg] = true;
|
||||||
// parse additional arguments
|
// parse additional arguments
|
||||||
|
Loading…
Reference in New Issue
Block a user