cmdotp2: silence some narrowing conversion warnings
This commit is contained in:
parent
40f2f3b99f
commit
8b409d07c8
@ -207,13 +207,13 @@ parser::parse (int const argc, const char *const *argv)
|
|||||||
arg_cursor++;
|
arg_cursor++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0, last = std::ssize (m_positional); i < last; ++i)
|
for (int i = 0, last = int (m_positional.size ()); i < last; ++i)
|
||||||
if (m_positional[i].required () and !found_positional[i])
|
if (m_positional[i].required () and !found_positional[i])
|
||||||
throw std::runtime_error (
|
throw std::runtime_error (
|
||||||
fmt::format ("Missing required position argument {}", m_positional[i].name)
|
fmt::format ("Missing required position argument {}", m_positional[i].name)
|
||||||
);
|
);
|
||||||
|
|
||||||
for (int i = 0, last = std::ssize (m_keyword); i < last; ++i)
|
for (int i = 0, last = int (m_keyword.size ()); i < last; ++i)
|
||||||
if (m_keyword[i].required () and !found_keyword[i])
|
if (m_keyword[i].required () and !found_keyword[i])
|
||||||
throw std::runtime_error (
|
throw std::runtime_error (
|
||||||
fmt::format ("Missing required named argument {}", m_keyword[i].name)
|
fmt::format ("Missing required named argument {}", m_keyword[i].name)
|
||||||
|
Loading…
Reference in New Issue
Block a user