Skip to content
Snippets Groups Projects
Commit e54fff73 authored by Markus Blatt's avatar Markus Blatt
Browse files

Hint is optional to call of allocate.

[[Imported from SVN: r1990]]
parent a6da7bc3
No related branches found
No related tags found
No related merge requests found
...@@ -229,7 +229,7 @@ namespace Dune ...@@ -229,7 +229,7 @@ namespace Dune
* @param hint Ignored hint. * @param hint Ignored hint.
* @return A pointer tp the allocated elements. * @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. * @brief Free objects.
...@@ -372,7 +372,7 @@ namespace Dune ...@@ -372,7 +372,7 @@ namespace Dune
template<class T, std::size_t s> template<class T, std::size_t s>
inline T* PoolAllocator<T,s>::allocate(std::size_t n, const T* hint) 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()); return static_cast<T*>(memoryPool_.allocate());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment