From affb8a370a8978d24b514cc4ca26818809e031a2 Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 13 Oct 2011 18:15:49 +0000 Subject: [PATCH] *Core: Fixed problem with ArrayMap::Create (thanks Shire) git-svn-id: svn://ultimatepp.org/upp/trunk@4002 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uppsrc/Core/Map.h b/uppsrc/Core/Map.h index cac61168c..5c6b82d91 100644 --- a/uppsrc/Core/Map.h +++ b/uppsrc/Core/Map.h @@ -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 TT& Create(const K& k) { TT *q = new TT; B::key.Add(k); return B::value.Add(q); } + template TT& Create(const K& k) { TT *q = new TT; B::key.Add(k); return static_cast(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(); }