comparison Applications/Samples/LayoutPetCtFusionApplication.h @ 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
comparison
equal deleted inserted replaced
1296:86400fa16091 1298:8a0a62189f46
206 } 206 }
207 207
208 208
209 LayeredSceneWidget* CreateWidget() 209 LayeredSceneWidget* CreateWidget()
210 { 210 {
211 std::auto_ptr<LayeredSceneWidget> widget(new LayeredSceneWidget); 211 std::unique_ptr<LayeredSceneWidget> widget(new LayeredSceneWidget);
212 widget->Register(dynamic_cast<WorldSceneWidget::IWorldObserver&>(*this)); 212 widget->Register(dynamic_cast<WorldSceneWidget::IWorldObserver&>(*this));
213 widget->Register(dynamic_cast<LayeredSceneWidget::ISliceObserver&>(*this)); 213 widget->Register(dynamic_cast<LayeredSceneWidget::ISliceObserver&>(*this));
214 return widget.release(); 214 return widget.release();
215 } 215 }
216 216
217 217
218 void CreateLayout(BasicApplicationContext& context) 218 void CreateLayout(BasicApplicationContext& context)
219 { 219 {
220 std::auto_ptr<OrthancStone::LayoutWidget> layout(new OrthancStone::LayoutWidget); 220 std::unique_ptr<OrthancStone::LayoutWidget> layout(new OrthancStone::LayoutWidget);
221 layout->SetBackgroundCleared(true); 221 layout->SetBackgroundCleared(true);
222 //layout->SetBackgroundColor(255,0,0); 222 //layout->SetBackgroundColor(255,0,0);
223 layout->SetPadding(5); 223 layout->SetPadding(5);
224 224
225 OrthancStone::LayoutWidget& layoutA = dynamic_cast<OrthancStone::LayoutWidget&> 225 OrthancStone::LayoutWidget& layoutA = dynamic_cast<OrthancStone::LayoutWidget&>