sourcehook/sourcehook.h
changeset 111 aec58c99dafc
parent 101 7d93aa4d2bf3
child 117 e322da4af2d2
     1.1 --- a/sourcehook/sourcehook.h	Tue Sep 13 22:16:29 2005 +0000
     1.2 +++ b/sourcehook/sourcehook.h	Fri Sep 23 20:14:10 2005 +0000
     1.3 @@ -27,7 +27,10 @@
     1.4  #define SH_GLOB_PLUGPTR g_PLID
     1.5  #endif
     1.6  
     1.7 +
     1.8  #ifdef SH_DEBUG
     1.9 +# include <stdio.h>
    1.10 +# include <stdlib.h>
    1.11  # define SH_ASSERT__(x, info, file, line, func) \
    1.12  	((printf("SOURCEHOOK DEBUG ASSERTION FAILED:\n  %s:%u(%s): %s\n", file, line, func, info), true) ? (abort(), 0) : 0)
    1.13  # define SH_ASSERT(x, info) if (!(x)) SH_ASSERT__(x, info, __FILE__, __LINE__, __FUNCTION__)
    1.14 @@ -184,8 +187,8 @@
    1.15  					int thisptr_offs;				//!< This pointer offset
    1.16  				};
    1.17  				void *ptr;							//!< Pointer to the interface instance
    1.18 -				List<Hook> hooks_pre;			//!< A list of pre-hooks
    1.19 -				List<Hook> hooks_post;			//!< A list of post-hooks
    1.20 +				List<Hook> hooks_pre;				//!< A list of pre-hooks
    1.21 +				List<Hook> hooks_post;				//!< A list of post-hooks
    1.22  				bool operator ==(void *other) const
    1.23  				{
    1.24  					return ptr == other;
    1.25 @@ -236,6 +239,8 @@
    1.26  	class ISourceHook
    1.27  	{
    1.28  	public:
    1.29 +		virtual ~ISourceHook()
    1.30 +		{ }
    1.31  		/**
    1.32  		*	@brief Return interface version
    1.33  		*/