From f914f02a0b39ad82f07f44a09802a72bb3b0b963 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Thu, 13 Nov 2014 17:44:22 -0800 Subject: [PATCH] Move user data to end of enum --- libraries/entities/src/EntityItem.h | 11 +++++------ libraries/entities/src/EntityItemProperties.h | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/libraries/entities/src/EntityItem.h b/libraries/entities/src/EntityItem.h index 51accd2a4f..cb153dee60 100644 --- a/libraries/entities/src/EntityItem.h +++ b/libraries/entities/src/EntityItem.h @@ -196,11 +196,6 @@ public: static const float DEFAULT_LIFETIME; float getLifetime() const { return _lifetime; } /// get the lifetime in seconds for the entity void setLifetime(float value) { _lifetime = value; } /// set the lifetime in seconds for the entity - - /// User-specified data stored in a variant map - static const QString DEFAULT_USER_DATA; - const QString& getUserData() const { return _userData; } - void setUserData(const QString& value) { _userData = value; } /// is this entity immortal, in that it has no lifetime set, and will exist until manually deleted bool isImmortal() const { return _lifetime == IMMORTAL; } @@ -257,6 +252,10 @@ public: bool getLocked() const { return _locked; } void setLocked(bool value) { _locked = value; } + static const QString DEFAULT_USER_DATA; + const QString& getUserData() const { return _userData; } + void setUserData(const QString& value) { _userData = value; } + // TODO: We need to get rid of these users of getRadius()... float getRadius() const; @@ -289,7 +288,6 @@ protected: glm::vec3 _gravity; float _damping; float _lifetime; - QString _userData; QString _script; glm::vec3 _registrationPoint; glm::vec3 _angularVelocity; @@ -298,6 +296,7 @@ protected: bool _ignoreForCollisions; bool _collisionsWillMove; bool _locked; + QString _userData; // NOTE: Radius support is obsolete, but these private helper functions are available for this class to // parse old data streams diff --git a/libraries/entities/src/EntityItemProperties.h b/libraries/entities/src/EntityItemProperties.h index 534ed7615f..273aedb18a 100644 --- a/libraries/entities/src/EntityItemProperties.h +++ b/libraries/entities/src/EntityItemProperties.h @@ -47,7 +47,6 @@ enum EntityPropertyList { PROP_GRAVITY, PROP_DAMPING, PROP_LIFETIME, - PROP_USER_DATA, PROP_SCRIPT, // these properties are supported by some derived classes @@ -82,8 +81,9 @@ enum EntityPropertyList { // used by Model entities PROP_TEXTURES, PROP_ANIMATION_SETTINGS, + PROP_USER_DATA, - PROP_LAST_ITEM = PROP_ANIMATION_SETTINGS + PROP_LAST_ITEM = PROP_USER_DATA }; typedef PropertyFlags EntityPropertyFlags;