Commit e445026e authored by Jose Borreguero's avatar Jose Borreguero
Browse files

Refs #30885 from static to dynamic cast

Signed-off-by: default avatarJose Borreguero <>
parent 0c5d2ac0
......@@ -1007,7 +1007,7 @@ QString ComponentInfoController::displayNonDetectorInfo(
ComponentInfoController::displayPeakInfo(Mantid::Geometry::IPeak *ipeak) {
std::stringstream text;
auto peak = static_cast<Mantid::DataObjects::Peak *>(ipeak);
auto peak = dynamic_cast<Mantid::DataObjects::Peak *>(ipeak);
auto instrument = peak->getInstrument();
auto sample = instrument->getSample()->getPos();
auto source = instrument->getSource()->getPos();
......@@ -1081,7 +1081,7 @@ void ComponentInfoController::displayAlignPeaksInfo(
// find projection of beam direction onto plane
// this is so we always orientate to a common reference direction
auto peak = static_cast<const Mantid::DataObjects::Peak *>(ipeak);
auto peak = dynamic_cast<const Mantid::DataObjects::Peak *>(ipeak);
const auto instrument = peak->getInstrument();
const auto samplePos = instrument->getSample()->getPos();
const auto sourcePos = instrument->getSource()->getPos();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment