Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2015, 7:10:56 PM (9 years ago)
Author:
muemart
Message:

Use emplace_back instead of push_back if beneficial

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc

    r10916 r10918  
    576576            ALuint source = this->availableSoundSources_.back();
    577577            this->availableSoundSources_.pop_back();
    578             this->usedSoundSources_.push_back(std::make_pair(source, object));
     578            this->usedSoundSources_.emplace_back(source, object);
    579579            return source;
    580580        }
     
    588588                if (alIsSource(source) && !alGetError())
    589589                {
    590                     this->usedSoundSources_.push_back(std::make_pair(source, object));
     590                    this->usedSoundSources_.emplace_back(source, object);
    591591                    return source;
    592592                }
Note: See TracChangeset for help on using the changeset viewer.