summaryrefslogtreecommitdiff
path: root/include/m_system_cpp.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-20 15:56:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-20 15:56:25 +0000
commitbfe1bd0fc087be44c70904aee0fe4276643d206d (patch)
treed5376d7cab1f6e5084a1449dc341c325b6cee45c /include/m_system_cpp.h
parent8593e7594773c30b35488bb6a45fcc782ed5df0c (diff)
- db3x_mmap is completely moved to a class;
- the old nightmare in the core "How to detect a db plugin and load it" is eliminated forever; - databases are the usual plugins now (loadable via Load) - dynamic DATABASELINK registration git-svn-id: http://svn.miranda-ng.org/main/trunk@1082 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_system_cpp.h')
-rw-r--r--include/m_system_cpp.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h
index c42bd68272..ea8098f24a 100644
--- a/include/m_system_cpp.h
+++ b/include/m_system_cpp.h
@@ -63,6 +63,20 @@ public:
};
///////////////////////////////////////////////////////////////////////////////
+// basic class for classes that should be cleared inside new()
+
+class MZeroedObject
+{
+public:
+ __inline void* operator new( size_t size )
+ { return calloc( 1, size );
+ }
+ __inline void operator delete( void* p )
+ { free( p );
+ }
+};
+
+///////////////////////////////////////////////////////////////////////////////
// general lists' templates
#define NumericKeySortT -1