readd missing operator= (needed for STL use)
This commit is contained in:
@@ -66,10 +66,9 @@ BitmapText::~BitmapText()
|
||||
FONT->UnloadFont( m_pFont );
|
||||
}
|
||||
|
||||
BitmapText::BitmapText( const BitmapText &cpy ):
|
||||
Actor( cpy )
|
||||
BitmapText & BitmapText::operator=(const BitmapText &cpy)
|
||||
{
|
||||
m_pFont = NULL;
|
||||
Actor::operator=(cpy);
|
||||
|
||||
#define CPY(a) a = cpy.a
|
||||
CPY( m_bUppercase );
|
||||
@@ -96,6 +95,16 @@ BitmapText::BitmapText( const BitmapText &cpy ):
|
||||
m_pFont = FONT->CopyFont( cpy.m_pFont );
|
||||
else
|
||||
m_pFont = NULL;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
BitmapText::BitmapText( const BitmapText &cpy ):
|
||||
Actor( cpy )
|
||||
{
|
||||
m_pFont = NULL;
|
||||
|
||||
*this = cpy;
|
||||
}
|
||||
|
||||
void BitmapText::LoadFromNode( const XNode* pNode )
|
||||
|
||||
@@ -15,6 +15,7 @@ class BitmapText : public Actor
|
||||
public:
|
||||
BitmapText();
|
||||
BitmapText( const BitmapText &cpy );
|
||||
BitmapText &operator=(const BitmapText &cpy);
|
||||
virtual ~BitmapText();
|
||||
|
||||
virtual void LoadFromNode( const XNode* pNode );
|
||||
|
||||
@@ -228,6 +228,19 @@ MessageSubscriber::MessageSubscriber( const MessageSubscriber &cpy ):
|
||||
this->SubscribeToMessage( *msg );
|
||||
}
|
||||
|
||||
MessageSubscriber &MessageSubscriber::operator=(const MessageSubscriber &cpy)
|
||||
{
|
||||
if(&cpy == this)
|
||||
return *this;
|
||||
|
||||
UnsubscribeAll();
|
||||
|
||||
FOREACH_CONST( RString, cpy.m_vsSubscribedTo, msg )
|
||||
this->SubscribeToMessage( *msg );
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void MessageSubscriber::SubscribeToMessage( const RString &sMessageName )
|
||||
{
|
||||
MESSAGEMAN->Subscribe( this, sMessageName );
|
||||
|
||||
@@ -151,6 +151,7 @@ class MessageSubscriber : public IMessageSubscriber
|
||||
public:
|
||||
MessageSubscriber() {}
|
||||
MessageSubscriber( const MessageSubscriber &cpy );
|
||||
MessageSubscriber &operator=(const MessageSubscriber &cpy);
|
||||
|
||||
//
|
||||
// Messages
|
||||
|
||||
Reference in New Issue
Block a user