(svn r19970) -Fix (r14742): SmallMap::Insert() did not compile. Construct new items like operator[].

This commit is contained in:
frosch 2010-06-13 09:41:48 +00:00
parent 55a684efc1
commit 67bec51f27
1 changed files with 3 additions and 1 deletions

View File

@ -86,7 +86,9 @@ struct SmallMap : SmallVector<SmallPair<T, U>, S> {
FORCEINLINE bool Insert(const T &key, const U &data)
{
if (this->Find(key) != this->End()) return false;
new (this->Append()) Pair(key, data);
Pair *n = this->Append();
n->first = key;
n->second = data;
return true;
}