From b0eac7857a3f81d07be9004e422f810f9e184968 Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Wed, 8 Jan 2020 23:31:06 +0100 Subject: [PATCH] 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24251 Reviewed-by: Bobby R. Bruce Maintainer: Bobby R. Bruce Tested-by: kokoro --- src/base/stl_helpers.hh | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/base/stl_helpers.hh b/src/base/stl_helpers.hh index 203093453..ef4f9ac1f 100644 --- a/src/base/stl_helpers.hh +++ b/src/base/stl_helpers.hh @@ -35,14 +35,6 @@ namespace m5 { namespace stl_helpers { -template -void -deletePointer(T &ptr) -{ - delete ptr; - ptr = NULL; -} - template 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