comparison Core/MetricsRegistry.cpp @ 3712:2a170a8f1faf

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 15:32:45 +0100
parents 94f4a18a79cc
children
comparison
equal deleted inserted replaced
3709:1f4910999fe7 3712:2a170a8f1faf
32 32
33 33
34 #include "PrecompiledHeaders.h" 34 #include "PrecompiledHeaders.h"
35 #include "MetricsRegistry.h" 35 #include "MetricsRegistry.h"
36 36
37 #include "ChunkedBuffer.h"
38 #include "Compatibility.h"
37 #include "OrthancException.h" 39 #include "OrthancException.h"
38 #include "ChunkedBuffer.h"
39 40
40 namespace Orthanc 41 namespace Orthanc
41 { 42 {
42 static const boost::posix_time::ptime GetNow() 43 static const boost::posix_time::ptime GetNow()
43 { 44 {
226 227
227 Content::iterator found = content_.find(name); 228 Content::iterator found = content_.find(name);
228 229
229 if (found == content_.end()) 230 if (found == content_.end())
230 { 231 {
231 std::auto_ptr<Item> item(new Item(type)); 232 std::unique_ptr<Item> item(new Item(type));
232 item->Update(value); 233 item->Update(value);
233 content_[name] = item.release(); 234 content_[name] = item.release();
234 } 235 }
235 else 236 else
236 { 237 {