minor cleanup

This commit is contained in:
Andrew Meadows 2018-12-05 14:32:42 -08:00
parent 01fc442695
commit e4cc3fa976

View file

@ -490,7 +490,6 @@ bool EntityTree::updateEntity(EntityItemPointer entity, const EntityItemProperti
} }
EntityItemPointer EntityTree::addEntity(const EntityItemID& entityID, const EntityItemProperties& properties, bool isClone) { EntityItemPointer EntityTree::addEntity(const EntityItemID& entityID, const EntityItemProperties& properties, bool isClone) {
EntityItemPointer result = NULL;
EntityItemProperties props = properties; EntityItemProperties props = properties;
auto nodeList = DependencyManager::get<NodeList>(); auto nodeList = DependencyManager::get<NodeList>();
@ -517,12 +516,12 @@ EntityItemPointer EntityTree::addEntity(const EntityItemID& entityID, const Enti
if (containingElement) { if (containingElement) {
qCWarning(entities) << "EntityTree::addEntity() on existing entity item with entityID=" << entityID qCWarning(entities) << "EntityTree::addEntity() on existing entity item with entityID=" << entityID
<< "containingElement=" << containingElement.get(); << "containingElement=" << containingElement.get();
return result; return nullptr;
} }
// construct the instance of the entity // construct the instance of the entity
EntityTypes::EntityType type = props.getType(); EntityTypes::EntityType type = props.getType();
result = EntityTypes::constructEntityItem(type, entityID, props); EntityItemPointer result = EntityTypes::constructEntityItem(type, entityID, props);
if (result) { if (result) {
if (recordCreationTime) { if (recordCreationTime) {