Skip to content
Snippets Groups Projects
Commit 84728de6 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

nullptr

parent 77d35317
No related branches found
No related tags found
1 merge request!454Further changes suggested by clang-tidy
...@@ -22,7 +22,7 @@ ConvolutionDetectorResolution::ConvolutionDetectorResolution(cumulative_DF_1d re ...@@ -22,7 +22,7 @@ ConvolutionDetectorResolution::ConvolutionDetectorResolution(cumulative_DF_1d re
ConvolutionDetectorResolution::ConvolutionDetectorResolution( ConvolutionDetectorResolution::ConvolutionDetectorResolution(
const IResolutionFunction2D& p_res_function_2d) const IResolutionFunction2D& p_res_function_2d)
: m_dimension(2), m_res_function_1d(0) : m_dimension(2), m_res_function_1d(nullptr)
{ {
setResolutionFunction(p_res_function_2d); setResolutionFunction(p_res_function_2d);
} }
...@@ -77,9 +77,7 @@ void ConvolutionDetectorResolution::setResolutionFunction(const IResolutionFunct ...@@ -77,9 +77,7 @@ void ConvolutionDetectorResolution::setResolutionFunction(const IResolutionFunct
void ConvolutionDetectorResolution::apply1dConvolution(OutputData<double>* p_intensity_map) const void ConvolutionDetectorResolution::apply1dConvolution(OutputData<double>* p_intensity_map) const
{ {
if (m_res_function_1d == 0) ASSERT(m_res_function_1d == 0);
throw std::runtime_error("ConvolutionDetectorResolution::apply1dConvolution() -> Error! "
"No 1d resolution function present for convolution of 1d data.");
if (p_intensity_map->rank() != 1) if (p_intensity_map->rank() != 1)
throw std::runtime_error( throw std::runtime_error(
"ConvolutionDetectorResolution::apply1dConvolution() -> Error! " "ConvolutionDetectorResolution::apply1dConvolution() -> Error! "
...@@ -112,9 +110,7 @@ void ConvolutionDetectorResolution::apply1dConvolution(OutputData<double>* p_int ...@@ -112,9 +110,7 @@ void ConvolutionDetectorResolution::apply1dConvolution(OutputData<double>* p_int
void ConvolutionDetectorResolution::apply2dConvolution(OutputData<double>* p_intensity_map) const void ConvolutionDetectorResolution::apply2dConvolution(OutputData<double>* p_intensity_map) const
{ {
if (m_res_function_2d == 0) ASSERT(m_res_function_2d);
throw std::runtime_error("ConvolutionDetectorResolution::apply2dConvolution() -> Error! "
"No 2d resolution function present for convolution of 2d data.");
if (p_intensity_map->rank() != 2) if (p_intensity_map->rank() != 2)
throw std::runtime_error( throw std::runtime_error(
"ConvolutionDetectorResolution::apply2dConvolution() -> Error! " "ConvolutionDetectorResolution::apply2dConvolution() -> Error! "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment