diff Framework/Fonts/GlyphAlphabet.cpp @ 1298:8a0a62189f46

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 16:31:30 +0100
parents 2d8ab34c8c91
children 30deba7bc8e2
line wrap: on
line diff
--- a/Framework/Fonts/GlyphAlphabet.cpp	Sun Feb 23 15:25:49 2020 +0100
+++ b/Framework/Fonts/GlyphAlphabet.cpp	Mon Mar 02 16:31:30 2020 +0100
@@ -43,12 +43,12 @@
                                const Glyph& glyph,
                                Orthanc::IDynamicObject* payload)
   {
-    std::auto_ptr<Orthanc::IDynamicObject> protection(payload);
+    std::unique_ptr<Orthanc::IDynamicObject> protection(payload);
       
     // Don't add twice the same character
     if (content_.find(unicode) == content_.end())
     {
-      std::auto_ptr<Glyph> raii(new Glyph(glyph));
+      std::unique_ptr<Glyph> raii(new Glyph(glyph));
         
       if (payload != NULL)
       {
@@ -65,7 +65,7 @@
   void GlyphAlphabet::Register(FontRenderer& renderer,
                                uint32_t unicode)
   {
-    std::auto_ptr<Glyph>  glyph(renderer.Render(unicode));
+    std::unique_ptr<Glyph>  glyph(renderer.Render(unicode));
       
     if (glyph.get() != NULL)
     {