From 67bec51f27d47949010ae4eaf777a622619893c8 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 13 Jun 2010 09:41:48 +0000 Subject: (svn r19970) -Fix (r14742): SmallMap::Insert() did not compile. Construct new items like operator[]. --- src/core/smallmap_type.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/smallmap_type.hpp') diff --git a/src/core/smallmap_type.hpp b/src/core/smallmap_type.hpp index 269950544..28000145e 100644 --- a/src/core/smallmap_type.hpp +++ b/src/core/smallmap_type.hpp @@ -86,7 +86,9 @@ struct SmallMap : SmallVector, 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; } -- cgit v1.2.3-54-g00ecf