summaryrefslogtreecommitdiff
path: root/include/dynamic.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-17 18:18:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-17 18:18:26 +0000
commite81bad456aa55af8b0cb31d2ffeb0672ff0c6bbf (patch)
tree2330a8e8d362ae33a4a83d92be789c01a9dabd61 /include/dynamic.h
parent3345b6c0dc26bf5f5ab848a22b9b5f2887e51574 (diff)
Added calls to sched_yield() to cut down processor usage - won't work in *bsd
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@635 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/dynamic.h')
-rw-r--r--include/dynamic.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/include/dynamic.h b/include/dynamic.h
index b34f2358b..0382324ce 100644
--- a/include/dynamic.h
+++ b/include/dynamic.h
@@ -53,13 +53,8 @@ class DLLManager
class DLLFactoryBase : public DLLManager
{
public:
- DLLFactoryBase(
- const char *fname,
- const char *func_name=0
- );
-
+ DLLFactoryBase(const char *fname, const char *func_name = 0);
virtual ~DLLFactoryBase();
-
void * (*factory_func)(void);
};
@@ -83,19 +78,15 @@ class DLLFactoryBase : public DLLManager
// is deleted, because the DLL will get unloaded as well.
//
-template <class T>
-class DLLFactory : public DLLFactoryBase
+template <class T> class DLLFactory : public DLLFactoryBase
{
public:
- DLLFactory(
- const char *fname,
- const char *func_name=0
- ) : DLLFactoryBase( fname, func_name )
+ DLLFactory(const char *fname, const char *func_name=0) : DLLFactoryBase(fname,func_name)
{
- if( factory_func )
- factory = (T *)factory_func();
- else
- factory = 0;
+ if (factory_func)
+ factory = (T*)factory_func();
+ else
+ factory = 0;
}
~DLLFactory()