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 <jscipione@gmail.com>
This commit is contained in:
Augustin Cavalier 2020-03-07 21:16:32 -05:00 committed by Adrien Destugues
parent c8c9723ae5
commit 996c9bf0dd

View File

@ -65,11 +65,9 @@ All rights reserved.
#include <strings.h>
#include <stdlib.h>
#include <algorithm>
#include <memory>
#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<BMessage> refsMessagePtr(refsMessage);
ObjectDeleter<BMessage> _(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;