*Core: Fixed problem with ArrayMap::Create (thanks Shire)

git-svn-id: svn://ultimatepp.org/upp/trunk@4002 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-10-13 18:15:49 +00:00
parent b8ac76905b
commit affb8a370a

View file

@ -160,7 +160,7 @@ public:
T& Add(const K& k, T *newt) { B::key.Add(k); return B::value.Add(newt); }
T& Insert(int i, const K& k, T *newt) { B::key.Insert(i, k); return B::value.Insert(i, newt); }
using B::Insert;
template <class TT> TT& Create(const K& k) { TT *q = new TT; B::key.Add(k); return B::value.Add(q); }
template <class TT> TT& Create(const K& k) { TT *q = new TT; B::key.Add(k); return static_cast<TT&>(B::value.Add(q)); }
T& Set(int i, T *ptr) { return B::value.Set(i, ptr); }
T *PopDetach() { B::key.Drop(); return B::value.PopDetach(); }