Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 29, 2015, 5:35:59 PM (9 years ago)
Author:
landauf
Message:

renamed SmartPtr to StrongPtr (now we have weak and strong pointers)

Location:
code/branches/core7/src/orxonox/sound
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/orxonox/sound/AmbientSound.cc

    r10380 r10555  
    5151        if (GameMode::playsSound())
    5252        {
    53             // Smoothly fade out by keeping a SmartPtr
     53            // Smoothly fade out by keeping a StrongPtr
    5454            SoundManager::getInstance().unregisterAmbientSound(this);
    5555        }
  • code/branches/core7/src/orxonox/sound/SoundBuffer.h

    r6764 r10555  
    4646        friend class SoundManager;
    4747#if !defined(_MSC_VER) || _MSC_VER >= 1500
    48         // Make sure nobody deletes an instance (using smart pointers)
     48        // Make sure nobody deletes an instance (using strong pointers)
    4949        template <class T>
    5050        friend void boost::checked_delete(T*);
  • code/branches/core7/src/orxonox/sound/SoundManager.cc

    r10464 r10555  
    165165    SoundManager::~SoundManager()
    166166    {
    167         // Erase fade lists because of the smart pointers
     167        // Erase fade lists because of the strong pointers
    168168        this->bDestructorCalled_ = true;
    169169        this->fadeInList_.clear();
     
    419419    }
    420420
    421     void SoundManager::fadeIn(const SmartPtr<AmbientSound>& sound)
     421    void SoundManager::fadeIn(const StrongPtr<AmbientSound>& sound)
    422422    {
    423423        // If we're already fading out --> remove that
    424         for (std::list<SmartPtr<AmbientSound> >::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); it++)
     424        for (std::list<StrongPtr<AmbientSound> >::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); it++)
    425425        {
    426426            if (*it == sound)
     
    435435    }
    436436
    437     void SoundManager::fadeOut(const SmartPtr<AmbientSound>& sound)
     437    void SoundManager::fadeOut(const StrongPtr<AmbientSound>& sound)
    438438    {
    439439        // If we're already fading in --> remove that
    440         for (std::list<SmartPtr<AmbientSound> >::iterator it = this->fadeInList_.begin(); it != this->fadeInList_.end(); it++)
     440        for (std::list<StrongPtr<AmbientSound> >::iterator it = this->fadeInList_.begin(); it != this->fadeInList_.end(); it++)
    441441        {
    442442            if (*it == sound)
     
    461461
    462462        // FADE IN
    463         for (std::list<SmartPtr<AmbientSound> >::iterator it= this->fadeInList_.begin(); it != this->fadeInList_.end(); )
     463        for (std::list<StrongPtr<AmbientSound> >::iterator it= this->fadeInList_.begin(); it != this->fadeInList_.end(); )
    464464        {
    465465            if ((*it)->getVolume() + this->crossFadeStep_*dt > 1.0f)
     
    476476
    477477        // FADE OUT
    478         for (std::list<SmartPtr<AmbientSound> >::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); )
     478        for (std::list<StrongPtr<AmbientSound> >::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); )
    479479        {
    480480            if ((*it)->getVolume() - this->crossFadeStep_*dt < 0.0f)
  • code/branches/core7/src/orxonox/sound/SoundManager.h

    r10413 r10555  
    4040#include "util/Singleton.h"
    4141#include "core/config/Configurable.h"
    42 #include "core/object/SmartPtr.h"
     42#include "core/object/StrongPtr.h"
    4343#include "core/UpdateListener.h"
    4444
     
    106106    private:
    107107        void processCrossFading(float dt);
    108         void fadeIn(const SmartPtr<AmbientSound>& sound);
    109         void fadeOut(const SmartPtr<AmbientSound>& sound);
     108        void fadeIn(const StrongPtr<AmbientSound>& sound);
     109        void fadeOut(const StrongPtr<AmbientSound>& sound);
    110110
    111111        void checkFadeStepValidity();
     
    129129        //! Absolute change per second (0.1 means 10% of the nominal volume) for cross fading
    130130        float                              crossFadeStep_;
    131         std::list<SmartPtr<AmbientSound> > fadeInList_;
    132         std::list<SmartPtr<AmbientSound> > fadeOutList_;
     131        std::list<StrongPtr<AmbientSound> > fadeInList_;
     132        std::list<StrongPtr<AmbientSound> > fadeOutList_;
    133133
    134134        // Volume related
Note: See TracChangeset for help on using the changeset viewer.