Commit d532cfbc authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Fixing bug in CreateScene and some style changes

parent 8de455e2
...@@ -3775,6 +3775,8 @@ std::string CVACoreImpl::CreateScene( const CVAStruct& oParams, const std::strin ...@@ -3775,6 +3775,8 @@ std::string CVACoreImpl::CreateScene( const CVAStruct& oParams, const std::strin
std::string sDestFilename = correctPath( m_oCoreConfig.mMacros.SubstituteMacros( sFilePath ) ); std::string sDestFilename = correctPath( m_oCoreConfig.mMacros.SubstituteMacros( sFilePath ) );
for( std::vector<CVAAudioRendererDesc>::iterator it = m_voRenderers.begin(); it != m_voRenderers.end(); ++it ) for( std::vector<CVAAudioRendererDesc>::iterator it = m_voRenderers.begin(); it != m_voRenderers.end(); ++it )
it->pInstance->LoadScene( sDestFilename ); it->pInstance->LoadScene( sDestFilename );
return sDestFilename;
} }
else else
{ {
......
...@@ -105,9 +105,10 @@ public: ...@@ -105,9 +105,10 @@ public:
m_mID2Ref.erase( iID ); m_mID2Ref.erase( iID );
}; };
// Gibt zu einer ID das assozierte Objekt zurck //! Gibt zu einer ID das assozierte Objekt zurck
// (Gibt nullptr zurck, falls das Objekt nicht enthalten ist) /** (Gibt nullptr zurck, falls das Objekt nicht enthalten ist)
inline T* GetObject( int iID ) const */
inline T* GetObject( const int iID ) const
{ {
typename std::map< int, T* >::const_iterator cit = m_mID2Object.find( iID ); typename std::map< int, T* >::const_iterator cit = m_mID2Object.find( iID );
return ( cit == m_mID2Object.end() ? nullptr : cit->second ); return ( cit == m_mID2Object.end() ? nullptr : cit->second );
...@@ -142,12 +143,14 @@ public: ...@@ -142,12 +143,14 @@ public:
return ( it == m_mID2Ref.end() ? -1 : ( it->second > 0 ? --( it->second ) : 0 ) ); return ( it == m_mID2Ref.end() ? -1 : ( it->second > 0 ? --( it->second ) : 0 ) );
}; };
// Wie GetObject(), erhht aber direkt den Referenzzhler //! Wie GetObject(), erhht aber direkt den Referenzzhler
inline T* Request( int iID ) { inline T* Request( const int iID )
{
T* pObject = GetObject( iID ); T* pObject = GetObject( iID );
// Gltige ID? Dann Referenzzhler erhhen // Gltige ID? Dann Referenzzhler erhhen
if( pObject ) IncRefCount( iID ); if( pObject )
IncRefCount( iID );
return pObject; return pObject;
}; };
......
...@@ -55,6 +55,7 @@ void CVADirectivityManager::Finalize() ...@@ -55,6 +55,7 @@ void CVADirectivityManager::Finalize()
void CVADirectivityManager::Reset() void CVADirectivityManager::Reset()
{ {
VA_VERBOSE( "DirectivityManager", "Resetting" );
for( CVAObjectContainer< IVADirectivity >::iterator it = m_oDirectivities.begin(); it != m_oDirectivities.end(); ++it ) for( CVAObjectContainer< IVADirectivity >::iterator it = m_oDirectivities.begin(); it != m_oDirectivities.end(); ++it )
{ {
delete it->second; delete it->second;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment