We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ec113d commit 8673d0eCopy full SHA for 8673d0e
lldb/source/Interpreter/Options.cpp
@@ -251,12 +251,9 @@ Option *Options::GetLongOptions() {
251
m_getopt_table[i].flag = nullptr;
252
m_getopt_table[i].val = short_opt;
253
254
- if (option_seen.find(short_opt) == option_seen.end()) {
255
- option_seen[short_opt] = i;
256
- } else if (short_opt) {
+ auto [pos, inserted] = option_seen.try_emplace(short_opt, i);
+ if (!inserted && short_opt) {
257
m_getopt_table[i].val = 0;
258
- std::map<int, uint32_t>::const_iterator pos =
259
- option_seen.find(short_opt);
260
StreamString strm;
261
if (defs[i].HasShortOption())
262
Debugger::ReportError(
0 commit comments