Skip to content

Commit

Permalink
blueprint: Fix incorrect dynamic cast ifs
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgessinger committed Nov 18, 2024
1 parent ff78c5c commit f2d2777
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Core/src/Geometry/RootBlueprintNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ std::unique_ptr<TrackingGeometry> RootBlueprintNode::construct(

std::shared_ptr<VolumeBounds> worldBounds;

if (const auto *cyl = dynamic_cast<const CylinderVolumeBounds *>(&bounds)) {
if (const auto *cyl = dynamic_cast<const CylinderVolumeBounds *>(&bounds);
cyl != nullptr) {
using enum CylinderVolumeBounds::BoundValues;

// Make a copy that we'll modify
Expand All @@ -106,7 +107,8 @@ std::unique_ptr<TrackingGeometry> RootBlueprintNode::construct(
worldBounds = std::move(newBounds);

} else if (const auto *box =
dynamic_cast<const CuboidVolumeBounds *>(&bounds)) {
dynamic_cast<const CuboidVolumeBounds *>(&bounds);
box != nullptr) {
throw std::logic_error{"Not implemented"};
} else {
throw std::logic_error{"Unsupported volume bounds type"};
Expand Down

0 comments on commit f2d2777

Please sign in to comment.