Mercurial > hg > orthanc-databases
diff Framework/Plugins/IndexBackend.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 | 2ccde9c7311b 3236894320d6 |
line wrap: on
line diff
--- a/Framework/Plugins/IndexBackend.cpp Mon Jul 06 12:40:44 2020 +0200 +++ b/Framework/Plugins/IndexBackend.cpp Mon Jul 06 12:45:58 2020 +0200 @@ -27,6 +27,7 @@ #include "../Common/Utf8StringValue.h" #include "GlobalProperties.h" +#include <Compatibility.h> // For std::unique_ptr<> #include <Logging.h> #include <OrthancException.h> @@ -692,7 +693,7 @@ uint64_t IndexBackend::GetResourceCount(OrthancPluginResourceType resourceType) { - std::auto_ptr<DatabaseManager::CachedStatement> statement; + std::unique_ptr<DatabaseManager::CachedStatement> statement; switch (manager_.GetDialect()) { @@ -757,7 +758,7 @@ uint64_t IndexBackend::GetTotalCompressedSize() { - std::auto_ptr<DatabaseManager::CachedStatement> statement; + std::unique_ptr<DatabaseManager::CachedStatement> statement; // NB: "COALESCE" is used to replace "NULL" by "0" if the number of rows is empty @@ -794,7 +795,7 @@ uint64_t IndexBackend::GetTotalUncompressedSize() { - std::auto_ptr<DatabaseManager::CachedStatement> statement; + std::unique_ptr<DatabaseManager::CachedStatement> statement; // NB: "COALESCE" is used to replace "NULL" by "0" if the number of rows is empty @@ -1009,7 +1010,7 @@ OrthancPluginIdentifierConstraint constraint, const char* value) { - std::auto_ptr<DatabaseManager::CachedStatement> statement; + std::unique_ptr<DatabaseManager::CachedStatement> statement; std::string header = "SELECT d.id FROM DicomIdentifiers AS d, Resources AS r WHERE " @@ -1465,7 +1466,7 @@ // For unit testing only! uint64_t IndexBackend::GetResourcesCount() { - std::auto_ptr<DatabaseManager::CachedStatement> statement; + std::unique_ptr<DatabaseManager::CachedStatement> statement; switch (manager_.GetDialect()) { @@ -1501,7 +1502,7 @@ // For unit testing only! uint64_t IndexBackend::GetUnprotectedPatientsCount() { - std::auto_ptr<DatabaseManager::CachedStatement> statement; + std::unique_ptr<DatabaseManager::CachedStatement> statement; switch (manager_.GetDialect()) {