Commit 93b21498 authored by Adam Reichold's avatar Adam Reichold

Reconstruct iterator via index arithmetic instead of relying on a non-standard...

Reconstruct iterator via index arithmetic instead of relying on a non-standard constructor to fix builds on MSVC.
parent dcd8ad25
Pipeline #3542 passed with stage
in 6 minutes and 19 seconds
......@@ -146,7 +146,8 @@ void Dict::remove(const char *key) {
dictLocker();
if (auto *entry = find(key)) {
if (sorted) {
entries.erase(std::vector<DictEntry>::iterator{entry});
const auto index = entry - &entries.front();
entries.erase(entries.begin() + index);
} else {
swap(*entry, entries.back());
entries.pop_back();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment