adapting to entitypointer merge

This commit is contained in:
Seth Alves 2015-05-27 08:59:44 -07:00
parent b02e452b19
commit f310da9cd3
3 changed files with 3 additions and 4 deletions

View file

@ -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);
}

View file

@ -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) { }

View file

@ -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) :