Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 9, 2015, 1:11:13 PM (9 years ago)
Author:
landauf
Message:

BaseObject returns plain pointers instead of StrongPtrs for Namespace, Level, Scene, and Gametype.

Location:
code/branches/core7/src/libraries/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/BaseObject.cc

    r10358 r10571  
    7878        {
    7979            this->setFile(this->creator_->getFile());
    80             this->setNamespace(this->creator_->getNamespace());
    81             this->setScene(this->creator_->getScene(), this->creator_->getSceneID());
    82             this->setGametype(this->creator_->getGametype());
    83             this->setLevel(this->creator_->getLevel());
     80            this->setNamespace(this->creator_->namespace_);
     81            this->setScene(this->creator_->scene_, this->creator_->sceneID_);
     82            this->setGametype(this->creator_->gametype_);
     83            this->setLevel(this->creator_->level_);
    8484        }
    8585        else
  • code/branches/core7/src/libraries/core/BaseObject.h

    r10570 r10571  
    139139
    140140            inline void setNamespace(const StrongPtr<Namespace>& ns) { this->namespace_ = ns; }
    141             inline const StrongPtr<Namespace>& getNamespace() const { return this->namespace_; }
     141            inline Namespace* getNamespace() const { return this->namespace_; }
    142142
    143143            inline void setCreator(BaseObject* creator) { this->creator_ = creator; }
     
    145145
    146146            inline void setScene(const StrongPtr<Scene>& scene, uint32_t sceneID) { this->scene_ = scene; this->sceneID_=sceneID; }
    147             inline const StrongPtr<Scene>& getScene() const { return this->scene_; }
     147            inline Scene* getScene() const { return this->scene_; }
    148148            inline virtual uint32_t getSceneID() const { return this->sceneID_; }
    149149
     
    157157                }
    158158            }
    159             inline const StrongPtr<Gametype>& getGametype() const { return this->gametype_; }
     159            inline Gametype* getGametype() const { return this->gametype_; }
    160160            inline Gametype* getOldGametype() const { return this->oldGametype_; }
    161161            virtual void changedGametype() {}
    162162
    163163            inline void setLevel(const StrongPtr<Level>& level) { this->level_ = level; }
    164             inline const StrongPtr<Level>& getLevel() const { return this->level_; }
     164            inline Level* getLevel() const { return this->level_; }
    165165
    166166            void addEventSource(BaseObject* source, const std::string& state);
Note: See TracChangeset for help on using the changeset viewer.