mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r18040) -Codechange: the size parameter (if it's that actually) isn't needed for the delete operator
This commit is contained in:
parent
275e6e4582
commit
88edbfe3d6
@ -170,22 +170,20 @@ public:
|
||||
/**
|
||||
* Memory release for a single class instance.
|
||||
* @param ptr the memory to free.
|
||||
* @param size the amount of allocated memory (unused).
|
||||
*
|
||||
* @warning The value of the \a size parameter can only be trusted for
|
||||
* classes that have their own (virtual) destructor method.
|
||||
*/
|
||||
FORCEINLINE void operator delete(void *ptr, size_t size) { free(ptr); }
|
||||
FORCEINLINE void operator delete(void *ptr) { free(ptr); }
|
||||
|
||||
/**
|
||||
* Memory release for an array of class instances.
|
||||
* @param ptr the memory to free.
|
||||
* @param size the amount of allocated memory (unused).
|
||||
*
|
||||
* @warning The value of the \a size parameter can only be trusted for
|
||||
* classes that have their own (virtual) destructor method.
|
||||
*/
|
||||
FORCEINLINE void operator delete[](void *ptr, size_t size) { free(ptr); }
|
||||
FORCEINLINE void operator delete[](void *ptr) { free(ptr); }
|
||||
};
|
||||
|
||||
#endif /* ALLOC_TYPE_HPP */
|
||||
|
@ -349,7 +349,7 @@ public:
|
||||
* to destruct them all at the same time too, which is kinda hard. */
|
||||
FORCEINLINE void *operator new[](size_t size) { NOT_REACHED(); }
|
||||
/* Don't free the window directly; it corrupts the linked list when iterating */
|
||||
FORCEINLINE void operator delete(void *ptr, size_t size) {}
|
||||
FORCEINLINE void operator delete(void *ptr) {}
|
||||
|
||||
uint16 flags4; ///< Window flags, @see WindowFlags
|
||||
WindowClass window_class; ///< Window class
|
||||
|
Loading…
Reference in New Issue
Block a user