mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 07:04:39 +00:00
Suppress MSVC warnings and a Codacy warning
This commit is contained in:
parent
d3127eb737
commit
556d935491
@ -561,11 +561,11 @@ private:
|
||||
tCompoundArgument[1] != '-') {
|
||||
++it;
|
||||
for (size_t j = 1; j < tCompoundArgument.size(); j++) {
|
||||
auto tCurrentArgument = std::string{'-', tCompoundArgument[j]};
|
||||
if (auto tIterator = mArgumentMap.find(tCurrentArgument);
|
||||
tIterator != mArgumentMap.end()) {
|
||||
auto tArgument = tIterator->second;
|
||||
it = tArgument->consume(it, end, tCurrentArgument);
|
||||
auto tHypotheticalArgument = std::string{'-', tCompoundArgument[j]};
|
||||
auto tIterator2 = mArgumentMap.find(tHypotheticalArgument);
|
||||
if (tIterator2 != mArgumentMap.end()) {
|
||||
auto tArgument = tIterator2->second;
|
||||
it = tArgument->consume(it, end, tHypotheticalArgument);
|
||||
} else {
|
||||
throw std::runtime_error("Unknown argument");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user