mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 23:33:17 +00:00
Use NULL instead of 0.
This commit is contained in:
parent
c8d190a000
commit
53f9a312bb
@ -118,19 +118,19 @@ public:
|
||||
|
||||
/**
|
||||
* A helper policy for scoped_ptr.
|
||||
* It will call the delete operator on a pointer, and assign the pointer to 0
|
||||
* It will call the delete operator on a pointer, and assign the pointer to NULL
|
||||
*/
|
||||
struct delete_item {
|
||||
template<typename T>
|
||||
void operator()(T*& p) const { delete p; p = 0; }
|
||||
void operator()(T*& p) const { delete p; p = NULL; }
|
||||
};
|
||||
/**
|
||||
* A helper policy for scoped_array.
|
||||
* It will call the delete[] operator on a pointer, and assign the pointer to 0
|
||||
* It will call the delete[] operator on a pointer, and assign the pointer to NULL
|
||||
*/
|
||||
struct delete_array {
|
||||
template<typename T>
|
||||
void operator()(T*& p) const { delete [] p; p = 0; }
|
||||
void operator()(T*& p) const { delete [] p; p = NULL; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user