sfx shadowvar cleanup

This commit is contained in:
Azaezel 2018-03-13 21:25:02 -05:00
parent 656c81dd39
commit 577e16ec10
3 changed files with 14 additions and 14 deletions

View file

@ -168,9 +168,9 @@ void SFXDevice::_removeBuffer( SFXBuffer* buffer )
BufferIterator iter = find( mBuffers.begin(), mBuffers.end(), buffer ); BufferIterator iter = find( mBuffers.begin(), mBuffers.end(), buffer );
if( iter != mBuffers.end() ) if( iter != mBuffers.end() )
{ {
SFXBuffer* buffer = *iter; SFXBuffer* curBuf = *iter;
mStatNumBufferBytes -= buffer->getMemoryUsed(); mStatNumBufferBytes -= curBuf->getMemoryUsed();
mStatNumBuffers --; mStatNumBuffers --;
mBuffers.erase( iter ); mBuffers.erase( iter );

View file

@ -174,18 +174,18 @@ void SFXSoundscapeManager::update()
// Activate SFXStates on the ambience. For state slots that // Activate SFXStates on the ambience. For state slots that
// have changed, deactivate states that we have already activated. // have changed, deactivate states that we have already activated.
for( U32 i = 0; i < SFXAmbience::MaxStates; ++ i ) for( U32 ambState = 0; ambState < SFXAmbience::MaxStates; ++ambState)
{ {
SFXState* state = ambience->getState( i ); SFXState* state = ambience->getState(ambState);
if( soundscape->mStates[ i ] != state ) if( soundscape->mStates[ambState] != state )
{ {
if( soundscape->mStates[ i ] ) if( soundscape->mStates[ambState] )
soundscape->mStates[ i ]->deactivate(); soundscape->mStates[ambState]->deactivate();
if( state ) if( state )
state->activate(); state->activate();
soundscape->mStates[ i ] = state; soundscape->mStates[ambState] = state;
} }
} }

View file

@ -674,9 +674,9 @@ void SFXSystem::_onRemoveSource( SFXSource* source )
{ {
// Check if it was a play once source. // Check if it was a play once source.
Vector< SFXSource* >::iterator iter = find( mPlayOnceSources.begin(), mPlayOnceSources.end(), source ); Vector< SFXSource* >::iterator sourceIter = find( mPlayOnceSources.begin(), mPlayOnceSources.end(), source );
if ( iter != mPlayOnceSources.end() ) if (sourceIter != mPlayOnceSources.end() )
mPlayOnceSources.erase_fast( iter ); mPlayOnceSources.erase_fast(sourceIter);
// Update the stats. // Update the stats.
@ -684,9 +684,9 @@ void SFXSystem::_onRemoveSource( SFXSource* source )
if( dynamic_cast< SFXSound* >( source ) ) if( dynamic_cast< SFXSound* >( source ) )
{ {
SFXSoundVector::iterator iter = find( mSounds.begin(), mSounds.end(), static_cast< SFXSound* >( source ) ); SFXSoundVector::iterator vectorIter = find( mSounds.begin(), mSounds.end(), static_cast< SFXSound* >( source ) );
if( iter != mSounds.end() ) if(vectorIter != mSounds.end() )
mSounds.erase_fast( iter ); mSounds.erase_fast(vectorIter);
mStatNumSounds = mSounds.size(); mStatNumSounds = mSounds.size();
} }