mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Modify ArgumentParser::parse_args_validate() method to use a for loop instead of std::for_each()
Suggested-by: Aayush Anand <aaayushanand5@gmail.com> [skrobinson: Updated for latest formatting and naming conventions] Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
This commit is contained in:
parent
cba0a1b3c7
commit
0d868fdca8
@ -1139,11 +1139,9 @@ private:
|
|||||||
*/
|
*/
|
||||||
void parse_args_validate() {
|
void parse_args_validate() {
|
||||||
// Check if all arguments are parsed
|
// Check if all arguments are parsed
|
||||||
std::for_each(std::begin(m_argument_map), std::end(m_argument_map),
|
for (const auto& [unused, argument] : m_argument_map) {
|
||||||
[](const auto &pair) {
|
argument->validate();
|
||||||
const auto &argument = pair.second;
|
}
|
||||||
argument->validate();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used by print_help.
|
// Used by print_help.
|
||||||
|
Loading…
Reference in New Issue
Block a user