Răsfoiți Sursa

Adjust a little bit Allocator and ProxyAllocator interface

Daniele Bartolini 12 ani în urmă
părinte
comite
80c4196422

+ 0 - 7
src/core/mem/Allocator.h

@@ -36,7 +36,6 @@ class Allocator
 {
 public:
 
-						Allocator() {}
 	virtual				~Allocator() {}
 
 	/// Allocates @size bytes of memory aligned to the specified
@@ -48,12 +47,6 @@ public:
 
 	/// Returns the total number of bytes allocated.
 	virtual size_t		allocated_size() = 0;
-
-private:
-
-	// Disable copying
-						Allocator(const Allocator&);
-	Allocator&			operator=(const Allocator&);
 };
 
 Allocator& get_default_allocator();

+ 1 - 1
src/core/mem/ProxyAllocator.cpp

@@ -31,7 +31,7 @@ namespace crown
 {
 
 //-----------------------------------------------------------------------------
-ProxyAllocator::ProxyAllocator(Allocator& allocator, const char* name) :
+ProxyAllocator::ProxyAllocator(const char* name, Allocator& allocator) :
 	m_allocator(allocator),
 	m_name(name)
 {

+ 1 - 1
src/core/mem/ProxyAllocator.h

@@ -39,7 +39,7 @@ class ProxyAllocator
 public:
 
 	/// Tag all allocations made with @allocator by the given @name
-					ProxyAllocator(Allocator& allocator, const char* name);
+					ProxyAllocator(const char* name, Allocator& allocator);
 
 	/// @copydoc Allocator::allocate()
 	void*			allocate(size_t size, size_t align = memory::DEFAULT_ALIGN);