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

assert

parent 7b676199
No related branches found
No related tags found
1 merge request!1906minor cleanup SImulationAreaIterator
......@@ -13,6 +13,7 @@
// ************************************************************************************************
#include "Device/Detector/SimulationAreaIterator.h"
#include "Base/Util/Assert.h"
#include "Device/Detector/IDetector.h"
#include "Device/Mask/DetectorMask.h"
......@@ -21,10 +22,7 @@ SimulationAreaIterator::SimulationAreaIterator(const IDetector* detector, size_t
, m_index(start_at_index)
, m_maxIndex(m_detector->sizeOfRegionOfInterest())
{
if (m_index > m_maxIndex)
throw std::runtime_error("SimulationAreaIterator::SimulationAreaIterator() "
"-> Error. Invalid initial index");
ASSERT(m_index <= m_maxIndex);
if (m_index != m_maxIndex && isMasked(m_index))
m_index = nextIndex(m_index);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment