base: Delete deletePointer helpers

Now that the calls to deletePointer have been replaced by the use
of smart pointers, they can be safely removed.

Change-Id: I91d8b97f7ba3f64dd9948fd343cf0af969886598
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24251
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel R. Carvalho
2020-01-08 23:31:06 +01:00
committed by Daniel Carvalho
parent 6a4b69c4fd
commit b0eac7857a

View File

@@ -35,14 +35,6 @@
namespace m5 {
namespace stl_helpers {
template <typename T>
void
deletePointer(T &ptr)
{
delete ptr;
ptr = NULL;
}
template <class T>
class ContainerPrint
{
@@ -68,15 +60,6 @@ class ContainerPrint
}
};
// Treat all objects in an stl container as pointers to heap objects,
// calling delete on each one and zeroing the pointers along the way
template <template <typename T, typename A> class C, typename T, typename A>
void
deletePointers(C<T,A> &container)
{
std::for_each(container.begin(), container.end(), deletePointer<T>);
}
// Write out all elements in an stl container as a space separated
// list enclosed in square brackets
template <template <typename T, typename A> class C, typename T, typename A>