comparison OrthancStone/Sources/Viewport/ViewportLocker.h @ 1979:b31e494e34c5

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 29 Oct 2022 17:10:21 +0200
parents 596f4752fa42
children 07964689cb0b
comparison
equal deleted inserted replaced
1978:95449b0e064a 1979:b31e494e34c5
34 std::unique_ptr<IViewport::ILock> lock2_; 34 std::unique_ptr<IViewport::ILock> lock2_;
35 35
36 IViewport::ILock& GetLock() const; 36 IViewport::ILock& GetLock() const;
37 37
38 public: 38 public:
39 ViewportLocker(IViewport& viewport) : 39 explicit ViewportLocker(IViewport& viewport) :
40 lock2_(viewport.Lock()) 40 lock2_(viewport.Lock())
41 { 41 {
42 } 42 }
43 43
44 ViewportLocker(boost::weak_ptr<IViewport> viewport); 44 explicit ViewportLocker(boost::weak_ptr<IViewport> viewport);
45 45
46 bool IsValid() const 46 bool IsValid() const
47 { 47 {
48 return (lock2_.get() != NULL); 48 return (lock2_.get() != NULL);
49 } 49 }