comparison Framework/SQLite/SQLiteTransaction.cpp @ 157:275e14f57f1e

replacing deprecated std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 Jul 2020 12:45:58 +0200
parents 063aa53b5917
children 3236894320d6
comparison
equal deleted inserted replaced
156:710537acb488 157:275e14f57f1e
22 #include "SQLiteTransaction.h" 22 #include "SQLiteTransaction.h"
23 23
24 #include "SQLiteResult.h" 24 #include "SQLiteResult.h"
25 #include "SQLiteStatement.h" 25 #include "SQLiteStatement.h"
26 26
27 #include <Compatibility.h> // For std::unique_ptr<>
27 #include <OrthancException.h> 28 #include <OrthancException.h>
28 29
29 namespace OrthancDatabases 30 namespace OrthancDatabases
30 { 31 {
31 SQLiteTransaction::SQLiteTransaction(SQLiteDatabase& database) : 32 SQLiteTransaction::SQLiteTransaction(SQLiteDatabase& database) :
41 } 42 }
42 43
43 IResult* SQLiteTransaction::Execute(IPrecompiledStatement& statement, 44 IResult* SQLiteTransaction::Execute(IPrecompiledStatement& statement,
44 const Dictionary& parameters) 45 const Dictionary& parameters)
45 { 46 {
46 std::auto_ptr<IResult> result(dynamic_cast<SQLiteStatement&>(statement).Execute(*this, parameters)); 47 std::unique_ptr<IResult> result(dynamic_cast<SQLiteStatement&>(statement).Execute(*this, parameters));
47 48
48 if (!statement.IsReadOnly()) 49 if (!statement.IsReadOnly())
49 { 50 {
50 readOnly_ = false; 51 readOnly_ = false;
51 } 52 }