comparison MySQL/Plugins/MySQLIndex.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
26 #include "../../Framework/MySQL/MySQLTransaction.h" 26 #include "../../Framework/MySQL/MySQLTransaction.h"
27 #include "MySQLDefinitions.h" 27 #include "MySQLDefinitions.h"
28 28
29 #include <EmbeddedResources.h> // Auto-generated file 29 #include <EmbeddedResources.h> // Auto-generated file
30 30
31 #include <Compatibility.h> // For std::unique_ptr<>
31 #include <Logging.h> 32 #include <Logging.h>
32 #include <OrthancException.h> 33 #include <OrthancException.h>
33 34
34 #include <ctype.h> 35 #include <ctype.h>
35 36
75 if (clearAll_) 76 if (clearAll_)
76 { 77 {
77 MySQLDatabase::ClearDatabase(parameters_); 78 MySQLDatabase::ClearDatabase(parameters_);
78 } 79 }
79 80
80 std::auto_ptr<MySQLDatabase> db(new MySQLDatabase(parameters_)); 81 std::unique_ptr<MySQLDatabase> db(new MySQLDatabase(parameters_));
81 82
82 db->Open(); 83 db->Open();
83 db->Execute("SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE", false); 84 db->Execute("SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE", false);
84 85
85 { 86 {