disallow copying of AvatarData objects

This commit is contained in:
Stephen Birarda 2013-05-17 12:15:10 -07:00
parent 12bf23e4c8
commit 199853711f
2 changed files with 4 additions and 13 deletions

View file

@ -34,14 +34,6 @@ int unpackFloatAngleFromTwoByte(uint16_t* byteAnglePointer, float* destinationPo
return sizeof(uint16_t); return sizeof(uint16_t);
} }
AvatarData::~AvatarData() {
}
AvatarData* AvatarData::clone() const {
return new AvatarData(*this);
}
int AvatarData::getBroadcastData(unsigned char* destinationBuffer) { int AvatarData::getBroadcastData(unsigned char* destinationBuffer) {
unsigned char* bufferStart = destinationBuffer; unsigned char* bufferStart = destinationBuffer;

View file

@ -52,11 +52,6 @@ public:
_wantResIn(false), _wantResIn(false),
_wantColor(true) { }; _wantColor(true) { };
~AvatarData();
AvatarData* clone() const;
const glm::vec3& getPosition() const; const glm::vec3& getPosition() const;
void setPosition(glm::vec3 position); void setPosition(glm::vec3 position);
void setHandPosition(glm::vec3 handPosition); void setHandPosition(glm::vec3 handPosition);
@ -134,6 +129,10 @@ public:
void setWantDelta(bool wantDelta) { _wantDelta = wantDelta; } void setWantDelta(bool wantDelta) { _wantDelta = wantDelta; }
protected: protected:
// privatize the copy constructor and assignment operator so they cannot be called
AvatarData(const AvatarData&);
AvatarData& operator= (const AvatarData&);
glm::vec3 _position; glm::vec3 _position;
glm::vec3 _handPosition; glm::vec3 _handPosition;