Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 21, 2010, 9:52:13 PM (14 years ago)
Author:
landauf
Message:

createFunctor() now returns a SharedPtr instead of a pointer. Adapted code that uses createFunctor() accordingly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/WeakPtr.h

    r6417 r7198  
    7777                if (this->base_)
    7878                    this->base_->unregisterWeakPtr(this);
    79                 if (this->callback_)
    80                     delete this->callback_;
    8179
    8280            }
     
    168166            }
    169167
    170             inline void setCallback(Functor* callback)
     168            inline void setCallback(const FunctorPtr& callback)
    171169            {
    172170                this->callback_ = callback;
    173171            }
    174172
    175             inline Functor* getFunctor() const
     173            inline const FunctorPtr& getCallback() const
    176174            {
    177175                return this->callback_;
     
    189187            T* pointer_;
    190188            OrxonoxClass* base_;
    191             Functor* callback_;
     189            FunctorPtr callback_;
    192190    };
    193191
Note: See TracChangeset for help on using the changeset viewer.