From e54fff73023b541e4ce54edcf2299cbb3d171b51 Mon Sep 17 00:00:00 2001 From: Markus Blatt <mblatt@dune-project.org> Date: Fri, 29 Apr 2005 14:58:48 +0000 Subject: [PATCH] Hint is optional to call of allocate. [[Imported from SVN: r1990]] --- common/poolallocator.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/poolallocator.hh b/common/poolallocator.hh index c8304bd5b..bc1b81698 100644 --- a/common/poolallocator.hh +++ b/common/poolallocator.hh @@ -229,7 +229,7 @@ namespace Dune * @param hint Ignored hint. * @return A pointer tp the allocated elements. */ - inline pointer allocate(size_t n, const_pointer hint); + inline pointer allocate(size_t n, const_pointer hint=0); /** * @brief Free objects. @@ -372,7 +372,7 @@ namespace Dune template<class T, std::size_t s> inline T* PoolAllocator<T,s>::allocate(std::size_t n, const T* hint) { - assert(n<=(Pool<T,s>::elements)); + assert(n==1); //<=(Pool<T,s>::elements)); return static_cast<T*>(memoryPool_.allocate()); } -- GitLab