1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

DenseMap: Move the key into place when we use the move version of operator[].

llvm-svn: 183074
This commit is contained in:
Benjamin Kramer 2013-06-01 16:37:55 +00:00
parent f7427d954c
commit d88c18ff6c

View File

@ -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