comparison PostgreSQL/Plugins/PostgreSQLIndex.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/PostgreSQL/PostgreSQLTransaction.h" 26 #include "../../Framework/PostgreSQL/PostgreSQLTransaction.h"
27 #include "PostgreSQLDefinitions.h" 27 #include "PostgreSQLDefinitions.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 35
35 namespace Orthanc 36 namespace Orthanc
64 << "expecting the DB schema version " << expectedVersion 65 << "expecting the DB schema version " << expectedVersion
65 << ", but this plugin is only compatible with version 6"; 66 << ", but this plugin is only compatible with version 6";
66 throw Orthanc::OrthancException(Orthanc::ErrorCode_Plugin); 67 throw Orthanc::OrthancException(Orthanc::ErrorCode_Plugin);
67 } 68 }
68 69
69 std::auto_ptr<PostgreSQLDatabase> db(new PostgreSQLDatabase(parameters_)); 70 std::unique_ptr<PostgreSQLDatabase> db(new PostgreSQLDatabase(parameters_));
70 71
71 db->Open(); 72 db->Open();
72 73
73 if (parameters_.HasLock()) 74 if (parameters_.HasLock())
74 { 75 {