objectpairhash: Use Contains helper

pull/70/head
Joshua Ashton 5 months ago committed by Joshie
parent 9946d6847c
commit bdd5b2ca9b

@ -54,8 +54,7 @@ void JoltPhysicsObjectPairHash::RemoveObjectPair( void *pObject0, void *pObject1
bool JoltPhysicsObjectPairHash::IsObjectPairInHash( void *pObject0, void *pObject1 )
{
auto pair = CreateSortedPair( pObject0, pObject1 );
auto &pairHashes = m_PairHashes[ GetHashArrayIndex( PointerHasher{}( pair ) ) ];
return pairHashes.find( pair ) != pairHashes.end();
return Contains( m_PairHashes[GetHashArrayIndex( PointerHasher{}( pair ) )], pair );
}
void JoltPhysicsObjectPairHash::RemoveAllPairsForObject( void *pObject0 )
@ -72,7 +71,7 @@ void JoltPhysicsObjectPairHash::RemoveAllPairsForObject( void *pObject0 )
bool JoltPhysicsObjectPairHash::IsObjectInHash( void *pObject0 )
{
return m_Objects.find( pObject0 ) != m_Objects.end();
return Contains( m_Objects, pObject0 );
}
//-------------------------------------------------------------------------------------------------

Loading…
Cancel
Save