comparison Framework/Scene2D/CairoCompositor.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 257f2c9a02ac
comparison
equal deleted inserted replaced
1296:86400fa16091 1298:8a0a62189f46
116 { 116 {
117 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); 117 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer);
118 } 118 }
119 else 119 else
120 { 120 {
121 std::auto_ptr<GlyphBitmapAlphabet> protection(dict); 121 std::unique_ptr<GlyphBitmapAlphabet> protection(dict);
122 122
123 Fonts::iterator found = fonts_.find(index); 123 Fonts::iterator found = fonts_.find(index);
124 124
125 if (found == fonts_.end()) 125 if (found == fonts_.end())
126 { 126 {
144 Orthanc::Encoding codepage) 144 Orthanc::Encoding codepage)
145 { 145 {
146 FontRenderer renderer; 146 FontRenderer renderer;
147 renderer.LoadFont(resource, fontSize); 147 renderer.LoadFont(resource, fontSize);
148 148
149 std::auto_ptr<GlyphBitmapAlphabet> alphabet(new GlyphBitmapAlphabet); 149 std::unique_ptr<GlyphBitmapAlphabet> alphabet(new GlyphBitmapAlphabet);
150 alphabet->LoadCodepage(renderer, codepage); 150 alphabet->LoadCodepage(renderer, codepage);
151 151
152 SetFont(index, alphabet.release()); 152 SetFont(index, alphabet.release());
153 } 153 }
154 #endif 154 #endif