Mercurial > hg > orthanc-stone
comparison Framework/Layers/LayerSourceBase.cpp @ 94:7b14c12a3be5 wasm
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 29 May 2017 18:03:30 +0200 |
parents | 81f73efd81a1 |
children | f8bce1bebe01 |
comparison
equal
deleted
inserted
replaced
93:5945e81734a3 | 94:7b14c12a3be5 |
---|---|
37 LayerReadyFunctor(ILayerRenderer* layer, | 37 LayerReadyFunctor(ILayerRenderer* layer, |
38 const Slice& slice) : | 38 const Slice& slice) : |
39 layer_(layer), | 39 layer_(layer), |
40 slice_(slice) | 40 slice_(slice) |
41 { | 41 { |
42 if (layer == NULL) | |
43 { | |
44 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); | |
45 } | |
42 } | 46 } |
43 | 47 |
44 void operator() (ILayerSource::IObserver& observer, | 48 void operator() (ILayerSource::IObserver& observer, |
45 const ILayerSource& source) | 49 const ILayerSource& source) |
46 { | 50 { |
70 } | 74 } |
71 | 75 |
72 void LayerSourceBase::NotifyLayerReady(ILayerRenderer* layer, | 76 void LayerSourceBase::NotifyLayerReady(ILayerRenderer* layer, |
73 const Slice& slice) | 77 const Slice& slice) |
74 { | 78 { |
75 if (layer == NULL) | |
76 { | |
77 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | |
78 } | |
79 | |
80 LayerReadyFunctor functor(layer, slice); | 79 LayerReadyFunctor functor(layer, slice); |
81 observers_.Notify(*this, functor); | 80 observers_.Notify(*this, functor); |
82 } | 81 } |
83 | 82 |
84 void LayerSourceBase::NotifyLayerError(const SliceGeometry& slice) | 83 void LayerSourceBase::NotifyLayerError(const SliceGeometry& slice) |