Mercurial > hg > orthanc-stone
comparison Framework/Viewport/WebGLViewportsRegistry.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 | 0ca50d275b9a |
children | ab81ee8fce1f |
comparison
equal
deleted
inserted
replaced
1297:6ab03e429f06 | 1299:c38c89684d83 |
---|---|
61 // replaced by a fresh one with the same ID: Recreate the | 61 // replaced by a fresh one with the same ID: Recreate the |
62 // WebGL context on the new canvas | 62 // WebGL context on the new canvas |
63 boost::shared_ptr<WebGLViewport> viewport; | 63 boost::shared_ptr<WebGLViewport> viewport; |
64 | 64 |
65 { | 65 { |
66 std::auto_ptr<IViewport::ILock> lock(it->second->Lock()); | 66 std::unique_ptr<IViewport::ILock> lock(it->second->Lock()); |
67 viewport = boost::make_shared<WebGLViewport>(it->first, lock->GetController().GetScene()); | 67 viewport = boost::make_shared<WebGLViewport>(it->first, lock->GetController().GetScene()); |
68 } | 68 } |
69 | 69 |
70 // Replace the old WebGL viewport by the new one | 70 // Replace the old WebGL viewport by the new one |
71 it->second = viewport; | 71 it->second = viewport; |
72 | 72 |
73 // Tag the fresh canvas as needing a repaint | 73 // Tag the fresh canvas as needing a repaint |
74 { | 74 { |
75 std::auto_ptr<IViewport::ILock> lock(it->second->Lock()); | 75 std::unique_ptr<IViewport::ILock> lock(it->second->Lock()); |
76 lock->Invalidate(); | 76 lock->Invalidate(); |
77 } | 77 } |
78 } | 78 } |
79 } | 79 } |
80 | 80 |