Merge pull request #2146 from Azaezel/specializationShenanigans

changes find, swap, for_each, and delete_pointer from global to t3d namespace
This commit is contained in:
Areloch 2018-04-17 03:02:03 -05:00 committed by GitHub
commit bc1b506205
20 changed files with 70 additions and 69 deletions

View file

@ -142,7 +142,7 @@ void SFXController::_compileList( SFXPlayList* playList )
{
// Randomly exchange slots in the list.
for( U32 i = 0; i < SFXPlayList::NUM_SLOTS; ++ i )
swap( slotList[ gRandGen.randI( 0, SFXPlayList::NUM_SLOTS - 1 ) ], slotList[ i ] );
T3D::swap( slotList[ gRandGen.randI( 0, SFXPlayList::NUM_SLOTS - 1 ) ], slotList[ i ] );
}
break;

View file

@ -165,7 +165,7 @@ void SFXDevice::_removeBuffer( SFXBuffer* buffer )
{
AssertFatal( buffer, "SFXDevice::_removeBuffer() - Got a null buffer!" );
BufferIterator iter = find( mBuffers.begin(), mBuffers.end(), buffer );
BufferIterator iter = T3D::find( mBuffers.begin(), mBuffers.end(), buffer );
if( iter != mBuffers.end() )
{
SFXBuffer* buffer = *iter;
@ -201,7 +201,7 @@ void SFXDevice::_removeVoice( SFXVoice* voice )
{
AssertFatal( voice, "SFXDevice::_removeVoice() - Got null voice!" );
VoiceIterator iter = find( mVoices.begin(), mVoices.end(), voice );
VoiceIterator iter = T3D::find( mVoices.begin(), mVoices.end(), voice );
if( iter != mVoices.end() )
{
mStatNumVoices --;

View file

@ -647,7 +647,7 @@ void SFXSystem::deleteWhenStopped( SFXSource* source )
// If the source isn't already on the play-once source list,
// put it there now.
Vector< SFXSource* >::iterator iter = find( mPlayOnceSources.begin(), mPlayOnceSources.end(), source );
Vector< SFXSource* >::iterator iter = T3D::find( mPlayOnceSources.begin(), mPlayOnceSources.end(), source );
if( iter == mPlayOnceSources.end() )
mPlayOnceSources.push_back( source );
}
@ -674,7 +674,7 @@ void SFXSystem::_onRemoveSource( SFXSource* source )
{
// Check if it was a play once source.
Vector< SFXSource* >::iterator iter = find( mPlayOnceSources.begin(), mPlayOnceSources.end(), source );
Vector< SFXSource* >::iterator iter = T3D::find( mPlayOnceSources.begin(), mPlayOnceSources.end(), source );
if ( iter != mPlayOnceSources.end() )
mPlayOnceSources.erase_fast( iter );
@ -684,7 +684,7 @@ void SFXSystem::_onRemoveSource( SFXSource* source )
if( dynamic_cast< SFXSound* >( source ) )
{
SFXSoundVector::iterator iter = find( mSounds.begin(), mSounds.end(), static_cast< SFXSound* >( source ) );
SFXSoundVector::iterator iter = T3D::find( mSounds.begin(), mSounds.end(), static_cast< SFXSound* >( source ) );
if( iter != mSounds.end() )
mSounds.erase_fast( iter );