Add an assert to confirm that try_emplace is inserting a new entry
This commit is contained in:
parent
7d83340993
commit
24d17c013b
|
@ -147,7 +147,11 @@ public:
|
|||
if (f.isReady() && f.isError())
|
||||
return f;
|
||||
|
||||
itr = openFiles.try_emplace(filename, f).first;
|
||||
auto result = openFiles.try_emplace(filename, f);
|
||||
|
||||
// This should be inserting a new entry
|
||||
ASSERT(result.second);
|
||||
itr = result.first;
|
||||
|
||||
// We return here instead of falling through to the outer scope so that we don't delete all references to
|
||||
// the underlying file before returning
|
||||
|
|
Loading…
Reference in New Issue