mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 00:43:02 +01:00
Fixed warnings by VC14
warning C4595: 'operator new': non-member operator new or delete functions may not be declared inline
This commit is contained in:
parent
c83f7e535b
commit
ce66904ebf
@ -67,6 +67,23 @@
|
||||
#define VALGRIND_FIX_IT // overrides suspicious valgrind behavior
|
||||
#endif // USE_VALGRIND
|
||||
|
||||
void* operator new(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
|
||||
{
|
||||
return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS);
|
||||
}
|
||||
void* operator new[](size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
|
||||
{
|
||||
return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS);
|
||||
}
|
||||
void operator delete(void* mem ALLOC_PARAMS) throw()
|
||||
{
|
||||
MemoryPool::globalFree(mem);
|
||||
}
|
||||
void operator delete[](void* mem ALLOC_PARAMS) throw()
|
||||
{
|
||||
MemoryPool::globalFree(mem);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
/*** emergency debugging stuff
|
||||
|
@ -294,15 +294,11 @@ private:
|
||||
using Firebird::MemoryPool;
|
||||
|
||||
// operators new and delete
|
||||
extern void* operator new(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION);
|
||||
extern void* operator new[](size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION);
|
||||
extern void operator delete(void* mem ALLOC_PARAMS) throw();
|
||||
extern void operator delete[](void* mem ALLOC_PARAMS) throw();
|
||||
|
||||
inline void* operator new(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
|
||||
{
|
||||
return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS);
|
||||
}
|
||||
inline void* operator new[](size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
|
||||
{
|
||||
return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS);
|
||||
}
|
||||
|
||||
inline void* operator new(size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS) throw (OOM_EXCEPTION)
|
||||
{
|
||||
@ -313,15 +309,6 @@ inline void* operator new[](size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS) t
|
||||
return pool.allocate(s ALLOC_PASS_ARGS);
|
||||
}
|
||||
|
||||
inline void operator delete(void* mem ALLOC_PARAMS) throw()
|
||||
{
|
||||
MemoryPool::globalFree(mem);
|
||||
}
|
||||
inline void operator delete[](void* mem ALLOC_PARAMS) throw()
|
||||
{
|
||||
MemoryPool::globalFree(mem);
|
||||
}
|
||||
|
||||
inline void operator delete(void* mem, Firebird::MemoryPool& pool ALLOC_PARAMS) throw()
|
||||
{
|
||||
MemoryPool::globalFree(mem);
|
||||
|
Loading…
Reference in New Issue
Block a user