(svn r19970) -Fix (r14742): SmallMap::Insert() did not compile. Construct new items like operator[].
This commit is contained in:
@@ -86,7 +86,9 @@ struct SmallMap : SmallVector<SmallPair<T, U>, S> {
|
|||||||
FORCEINLINE bool Insert(const T &key, const U &data)
|
FORCEINLINE bool Insert(const T &key, const U &data)
|
||||||
{
|
{
|
||||||
if (this->Find(key) != this->End()) return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user