diff options
Diffstat (limited to 'examples/DLL/Today.cpp')
-rw-r--r-- | examples/DLL/Today.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/DLL/Today.cpp b/examples/DLL/Today.cpp index 036a7c82ccc..b80bfff2b0a 100644 --- a/examples/DLL/Today.cpp +++ b/examples/DLL/Today.cpp @@ -28,11 +28,18 @@ Today::operator new (size_t bytes, const ACE_nothrow_t&) { return ::new (ACE_nothrow) char[bytes]; } +#if !defined (ACE_LACKS_PLACEMENT_OPERATOR_DELETE) +void +Today::operator delete (void *p, const ACE_nothrow_t&) throw () +{ + delete [] static_cast <char *> (p); +} +#endif /* ACE_LACKS_PLACEMENT_OPERATOR_DELETE */ #endif void Today::operator delete (void *ptr) { - delete [] ((char *) ptr); + delete [] static_cast <char *> (ptr); } // Returns the pointer to the Today class. @@ -42,7 +49,7 @@ extern "C" ACE_Svc_Export Magazine *create_magazine (void); Magazine *create_magazine (void) { - Magazine *mag; + Magazine *mag = 0; ACE_NEW_RETURN (mag, Today, 0); return mag; } |