comparison Framework/Scene2D/CairoCompositor.cpp @ 1299:c38c89684d83 broker

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 17:21:24 +0100
parents 7ec8fea061b9
children 257f2c9a02ac
comparison
equal deleted inserted replaced
1297:6ab03e429f06 1299:c38c89684d83
115 { 115 {
116 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); 116 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer);
117 } 117 }
118 else 118 else
119 { 119 {
120 std::auto_ptr<GlyphBitmapAlphabet> protection(dict); 120 std::unique_ptr<GlyphBitmapAlphabet> protection(dict);
121 121
122 Fonts::iterator found = fonts_.find(index); 122 Fonts::iterator found = fonts_.find(index);
123 123
124 if (found == fonts_.end()) 124 if (found == fonts_.end())
125 { 125 {
143 Orthanc::Encoding codepage) 143 Orthanc::Encoding codepage)
144 { 144 {
145 FontRenderer renderer; 145 FontRenderer renderer;
146 renderer.LoadFont(resource, fontSize); 146 renderer.LoadFont(resource, fontSize);
147 147
148 std::auto_ptr<GlyphBitmapAlphabet> alphabet(new GlyphBitmapAlphabet); 148 std::unique_ptr<GlyphBitmapAlphabet> alphabet(new GlyphBitmapAlphabet);
149 alphabet->LoadCodepage(renderer, codepage); 149 alphabet->LoadCodepage(renderer, codepage);
150 150
151 SetFont(index, alphabet.release()); 151 SetFont(index, alphabet.release());
152 } 152 }
153 #endif 153 #endif