From f310da9cd3627dee116b620d1275a934c827baa1 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 27 May 2015 08:59:44 -0700 Subject: [PATCH] adapting to entitypointer merge --- .../entities-renderer/src/RenderablePolyVoxEntityItem.cpp | 2 +- libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h | 2 +- libraries/entities/src/PolyVoxEntityItem.cpp | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp index e8684a88dc..ec2c8e32a3 100644 --- a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp @@ -33,7 +33,7 @@ #include "EntityTreeRenderer.h" #include "RenderablePolyVoxEntityItem.h" -EntityItem* RenderablePolyVoxEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) { +EntityItemPointer RenderablePolyVoxEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) { return new RenderablePolyVoxEntityItem(entityID, properties); } diff --git a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h index 981d59c506..b04b32996b 100644 --- a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h +++ b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h @@ -19,7 +19,7 @@ class RenderablePolyVoxEntityItem : public PolyVoxEntityItem { public: - static EntityItem* factory(const EntityItemID& entityID, const EntityItemProperties& properties); + static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties); RenderablePolyVoxEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) : PolyVoxEntityItem(entityItemID, properties) { } diff --git a/libraries/entities/src/PolyVoxEntityItem.cpp b/libraries/entities/src/PolyVoxEntityItem.cpp index 4b8be31fe0..a170d67241 100644 --- a/libraries/entities/src/PolyVoxEntityItem.cpp +++ b/libraries/entities/src/PolyVoxEntityItem.cpp @@ -26,8 +26,7 @@ const QByteArray PolyVoxEntityItem::DEFAULT_VOXEL_DATA(qCompress(QByteArray(0), const int PolyVoxEntityItem::DEFAULT_VOXEL_SURFACE_STYLE = 0; EntityItemPointer PolyVoxEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) { - EntityItem* result = new PolyVoxEntityItem(entityID, properties); - return result; + return EntityItemPointer(new PolyVoxEntityItem(entityID, properties)); } PolyVoxEntityItem::PolyVoxEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) :