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:
John Platts
2022-09-19 14:23:16 -05:00
committed by GitHub
parent 0a4dc54fb9
commit a1d1e221ae

View File

@@ -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, ... ) {