mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
Remove operator new and operator delete overloads from Runtime.cpp
The ```operator new``` and ```operator delete``` overloads in Runtime.cpp are replaced by placement ```operator new``` and ```operator delete``` operators in AllocRoutines.h that take a const FlatLafNoThrowT& placement parameter. Using ```new (FlatLafNoThrow) FlatWndProc``` instead of ```new FlatWndProc``` also allows for inlining by the C++ compiler.
This commit is contained in:
@@ -41,19 +41,6 @@ BOOL WINAPI _DllMainCRTStartup( HINSTANCE instance, DWORD reason, LPVOID reserve
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* __cdecl operator new( size_t cb ) {
|
|
||||||
return ::HeapAlloc( ::GetProcessHeap(), HEAP_ZERO_MEMORY, cb );
|
|
||||||
}
|
|
||||||
|
|
||||||
void* __cdecl operator new[]( size_t cb ) {
|
|
||||||
return ::HeapAlloc( ::GetProcessHeap(), HEAP_ZERO_MEMORY, cb );
|
|
||||||
}
|
|
||||||
|
|
||||||
void __cdecl operator delete( void* pv, size_t cb ) {
|
|
||||||
if( pv != NULL )
|
|
||||||
::HeapFree( ::GetProcessHeap(), 0, pv );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
extern "C"
|
extern "C"
|
||||||
int __cdecl printf( const char* format, ... ) {
|
int __cdecl printf( const char* format, ... ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user