1
0
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:
Benjamin Kramer 2013-06-01 16:37:55 +00:00
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