mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-23 01:31:05 +00:00
DenseMap: Move the key into place when we use the move version of operator[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8e851920c0
commit
da8b91a073
@ -222,11 +222,11 @@ public:
|
||||
if (LookupBucketFor(Key, TheBucket))
|
||||
return *TheBucket;
|
||||
|
||||
return *InsertIntoBucket(Key, ValueT(), TheBucket);
|
||||
return *InsertIntoBucket(std::move(Key), ValueT(), TheBucket);
|
||||
}
|
||||
|
||||
ValueT &operator[](KeyT &&Key) {
|
||||
return FindAndConstruct(Key).second;
|
||||
return FindAndConstruct(std::move(Key)).second;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user