From 996c9bf0dddc80a87b984cc39aa6d9b9dcec14be Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 7 Mar 2020 21:16:32 -0500 Subject: [PATCH] Tracker: Use ObjectDeleter instead of the deprecated std::auto_ptr. Change-Id: I5d358076065fefa39df923e4554599b716d9883b Reviewed-on: https://review.haiku-os.org/c/haiku/+/2321 Reviewed-by: John Scipione --- src/kits/tracker/ContainerWindow.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index 65d61b5c84..d4a4b7cb5c 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -65,11 +65,9 @@ All rights reserved. #include #include -#include -#include - #include "Attributes.h" #include "AttributeStream.h" +#include "AutoDeleter.h" #include "AutoLock.h" #include "BackgroundImage.h" #include "Commands.h" @@ -298,7 +296,7 @@ AddOneAddon(const Model* model, const char* name, uint32 shortcut, static int32 AddOnThread(BMessage* refsMessage, entry_ref addonRef, entry_ref directoryRef) { - std::auto_ptr refsMessagePtr(refsMessage); + ObjectDeleter _(refsMessage); BEntry entry(&addonRef); BPath path; @@ -315,7 +313,7 @@ AddOnThread(BMessage* refsMessage, entry_ref addonRef, entry_ref directoryRef) if (result >= 0) { // call add-on code - (*processRefs)(directoryRef, refsMessagePtr.get(), NULL); + (*processRefs)(directoryRef, refsMessage, NULL); unload_add_on(addonImage); return B_OK;