Daniel Carvalho has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/24251 )
Change subject: base: Delete deletePointer helpers
......................................................................
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 <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24251
Reviewed-by: Bobby R. Bruce <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/base/stl_helpers.hh
1 file changed, 0 insertions(+), 17 deletions(-)
Approvals:
Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/base/stl_helpers.hh b/src/base/stl_helpers.hh
index 2030934..ef4f9ac 100644
--- a/src/base/stl_helpers.hh
+++ b/src/base/stl_helpers.hh
@@ -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 @@
}
};
-// 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>
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/24251
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I91d8b97f7ba3f64dd9948fd343cf0af969886598
Gerrit-Change-Number: 24251
Gerrit-PatchSet: 7
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s