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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)
Note: See TracChangeset for help on using the changeset viewer.