Remove our two instances of auto_ptr and replace it with unique_ptr. auto_ptr has been deprecated.

This commit is contained in:
Ryan Houdek 2013-11-13 11:43:54 -06:00
parent 7b53574b68
commit 652ef24a2e
2 changed files with 4 additions and 4 deletions

View File

@ -222,10 +222,10 @@ namespace JitILProfiler
}
}
};
std::auto_ptr<JitILProfilerFinalizer> finalizer;
std::unique_ptr<JitILProfilerFinalizer> finalizer;
static void Init()
{
finalizer = std::auto_ptr<JitILProfilerFinalizer>(new JitILProfilerFinalizer);
finalizer = std::unique_ptr<JitILProfilerFinalizer>(new JitILProfilerFinalizer);
}
static void Shutdown()
{

View File

@ -1224,7 +1224,7 @@ struct Writer
virtual ~Writer() {}
};
static std::auto_ptr<Writer> writer;
static std::unique_ptr<Writer> writer;
static const std::string opcodeNames[] = {
"Nop", "LoadGReg", "LoadLink", "LoadCR", "LoadCarry", "LoadCTR",
@ -1276,7 +1276,7 @@ void IRBuilder::WriteToFile(u64 codeHash) {
_assert_(sizeof(opcodeNames) / sizeof(opcodeNames[0]) == Int3 + 1);
if (!writer.get()) {
writer = std::auto_ptr<Writer>(new Writer);
writer = std::unique_ptr<Writer>(new Writer);
}
FILE* const file = writer->file.GetHandle();