more cleanup

This commit is contained in:
swaits committed 2010-10-04 11:20:21 -07:00
1 parent c7d43807e3
commit 233c60293d
1 file changed
+9 -1
+9 -1
View File
@@ -35,14 +35,22 @@ class Slot===NARG===_function: public Slot===NARG===<T_return===TEMPLATE_ARG===>
{
public:
typedef T_return (*FUNCTION_POINTER)(===FORMAL_ARG_DECL===);
typedef T_return (*FUNCTION_POINTER)(===FORMAL_ARG_DECL===); // convenience typedef
/**
* Constructor. Converts a function pointer into raw data.
*/
Slot===NARG===_function( const FUNCTION_POINTER func )
{
// convert and store function pointer in slot_base
this->data[0] = safe_horrible_cast<data_container>(func);
}
/**
* Perform callback. Converts raw data back into a function pointer, and calls it.
*
* @return Returns an object of type T_return; the result of the user callback.
*/
T_return operator() (===FORMAL_ARG_DECL===) const
{
// retrieve data from slot_base and convert back to a function pointer