History

Use elseifs in PickScriptingInterface::createTransformNode

sabrina-shanman committed 8 years ago

Commit e8ea95e1 parent 390e89a1 file · +4 −5Browse files

Showing the changes to interface/src/raypick/PickScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

interface/src/raypick/PickScriptingInterface.cpp+4−5
@@ -381,14 +381,13 @@ std::shared_ptr<TransformNode> PickScriptingInterface::createTransformNode(const · 380 unmodified lines
381381 NestableType nestableType = sharedNestablePointer->getNestableType();
382382 if (nestableType == NestableType::Avatar) {
383383 return std::make_shared<AvatarTransformNode>(std::static_pointer_cast<Avatar>(sharedNestablePointer), parentJointIndex);
384− }
385− if (nestableType == NestableType::Overlay) {
384+ } else if (nestableType == NestableType::Overlay) {
386385 return std::make_shared<OverlayTransformNode>(std::static_pointer_cast<Base3DOverlay>(sharedNestablePointer), parentJointIndex);
387− }
388− if (nestableType == NestableType::Entity) {
386+ } else if (nestableType == NestableType::Entity) {
389387 return std::make_shared<EntityTransformNode>(std::static_pointer_cast<EntityItem>(sharedNestablePointer), parentJointIndex);
388+ } else {
389+ return std::make_shared<NestableTransformNode>(nestablePointer, parentJointIndex);
390390 }
391− return std::make_shared<NestableTransformNode>(nestablePointer, parentJointIndex);
392391 }
393392 }
394393