Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 8 files). Show all
Unified · Split
| @@ -411,7 +411,7 @@ bool EntityScriptingInterface::setVoxels(QUuid entityID, · 410 unmodified lines | ||
| 411 | 411 | return false; |
| 412 | 412 | } |
| 413 | 413 | |
| 414 | − EntityItemPointer entity = static_cast<EntityItemPointer>(_entityTree->findEntityByEntityItemID(entityID)); | |
| 414 | + EntityItemPointer entity = _entityTree->findEntityByEntityItemID(entityID); | |
| 415 | 415 | if (!entity) { |
| 416 | 416 | qCDebug(entities) << "EntityScriptingInterface::setVoxelSphere no entity with ID" << entityID; |
| 417 | 417 | return false; |
| @@ -424,7 +424,7 @@ bool EntityScriptingInterface::setVoxels(QUuid entityID, · 6 unmodified lines | ||
| 424 | 424 | |
| 425 | 425 | auto now = usecTimestampNow(); |
| 426 | 426 | |
| 427 | − PolyVoxEntityItem* polyVoxEntity = static_cast<PolyVoxEntityItem*>(entity.get()); | |
| 427 | + auto polyVoxEntity = std::dynamic_pointer_cast<PolyVoxEntityItem>(entity); | |
| 428 | 428 | _entityTree->lockForWrite(); |
| 429 | 429 | actor(*polyVoxEntity); |
| 430 | 430 | entity->setLastEdited(now); |
| @@ -460,7 +460,7 @@ bool EntityScriptingInterface::setPoints(QUuid entityID, std::function<bool(Line · 29 unmodified lines | ||
| 460 | 460 | |
| 461 | 461 | auto now = usecTimestampNow(); |
| 462 | 462 | |
| 463 | − LineEntityItem* lineEntity = static_cast<LineEntityItem*>(entity.get()); | |
| 463 | + auto lineEntity = std::static_pointer_cast<LineEntityItem>(entity); | |
| 464 | 464 | _entityTree->lockForWrite(); |
| 465 | 465 | bool success = actor(*lineEntity); |
| 466 | 466 | entity->setLastEdited(now); |