Преглед изворни кода

Fix docs for CE_NEW/CE_DELETE

Daniele Bartolini пре 12 година
родитељ
комит
8c1092bfb9
1 измењених фајлова са 8 додато и 2 уклоњено
  1. 8 2
      src/core/mem/Allocator.h

+ 8 - 2
src/core/mem/Allocator.h

@@ -64,11 +64,17 @@ void call_destructor_and_deallocate(Allocator& a, T* ptr)
 	}
 	}
 }
 }
 
 
-//-----------------------------------------------------------------------------
+/// Allocates memory with @a allocator for the given @a T type
+/// and calls constructor on it.
+/// @note
+/// @a allocator must be a reference to an existing allocator.
 #define CE_NEW(allocator, T)\
 #define CE_NEW(allocator, T)\
 	new ((allocator).allocate(sizeof(T))) T
 	new ((allocator).allocate(sizeof(T))) T
 
 
-//-----------------------------------------------------------------------------
+/// Calls destructor on @a ptr and deallocates memory using the
+/// given @a allocator.
+/// @note
+/// @a allocator must be a reference to an existing allocator.
 #define CE_DELETE(allocator, ptr)\
 #define CE_DELETE(allocator, ptr)\
 	call_destructor_and_deallocate(allocator, ptr)
 	call_destructor_and_deallocate(allocator, ptr)