mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1513 Avoid double dynamic_cast
This commit is contained in:
parent
f05728e76d
commit
276f81a20e
@ -104,15 +104,14 @@ cvf::BoundingBox RicFlyToObjectFeature::boundingBoxForSelectedObjects()
|
||||
{
|
||||
cvf::BoundingBox bb;
|
||||
|
||||
std::vector<caf::PdmObject*> objects;
|
||||
std::vector<Rim3dPropertiesInterface*> objects;
|
||||
caf::SelectionManager::instance()->objectsByType(&objects);
|
||||
|
||||
for (auto o : objects)
|
||||
for (auto obj : objects)
|
||||
{
|
||||
Rim3dPropertiesInterface* rim3dProperties = dynamic_cast<Rim3dPropertiesInterface*>(o);
|
||||
if (rim3dProperties)
|
||||
if (obj)
|
||||
{
|
||||
bb.add(rim3dProperties->boundingBoxInDomainCoords());
|
||||
bb.add(obj->boundingBoxInDomainCoords());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user