Mercurial > hg > orthanc-databases
comparison SQLite/Plugins/SQLiteIndex.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/SQLite/SQLiteDatabase.h" | 26 #include "../../Framework/SQLite/SQLiteDatabase.h" |
27 #include "../../Framework/SQLite/SQLiteTransaction.h" | 27 #include "../../Framework/SQLite/SQLiteTransaction.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 namespace OrthancDatabases | 35 namespace OrthancDatabases |
35 { | 36 { |
54 << ", but this plugin is only compatible with version 6"; | 55 << ", but this plugin is only compatible with version 6"; |
55 throw Orthanc::OrthancException(Orthanc::ErrorCode_Plugin); | 56 throw Orthanc::OrthancException(Orthanc::ErrorCode_Plugin); |
56 } | 57 } |
57 | 58 |
58 | 59 |
59 std::auto_ptr<SQLiteDatabase> db(new SQLiteDatabase); | 60 std::unique_ptr<SQLiteDatabase> db(new SQLiteDatabase); |
60 | 61 |
61 if (path_.empty()) | 62 if (path_.empty()) |
62 { | 63 { |
63 db->OpenInMemory(); | 64 db->OpenInMemory(); |
64 } | 65 } |