1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-30 04:43:53 +00:00

Mark templated functions inline.

This commit is contained in:
Bartosz Taudul 2019-03-03 22:09:20 +01:00
parent f6913eecf0
commit e13286936c

View File

@ -56,7 +56,7 @@ private:
#pragma pack() #pragma pack()
template<typename T> template<typename T>
void VarArray<T>::CalcHash() inline void VarArray<T>::CalcHash()
{ {
T hash = 5381; T hash = 5381;
for( uint8_t i=0; i<m_size; i++ ) for( uint8_t i=0; i<m_size; i++ )
@ -67,7 +67,7 @@ void VarArray<T>::CalcHash()
} }
template<> template<>
void VarArray<CallstackFrameId>::CalcHash() inline void VarArray<CallstackFrameId>::CalcHash()
{ {
uint64_t hash = 5381; uint64_t hash = 5381;
for( uint8_t i=0; i<m_size; i++ ) for( uint8_t i=0; i<m_size; i++ )
@ -78,7 +78,7 @@ void VarArray<CallstackFrameId>::CalcHash()
} }
template<typename T> template<typename T>
bool Compare( const VarArray<T>& lhs, const VarArray<T>& rhs ) static inline bool Compare( const VarArray<T>& lhs, const VarArray<T>& rhs )
{ {
if( lhs.size() != rhs.size() || lhs.get_hash() != rhs.get_hash() ) return false; if( lhs.size() != rhs.size() || lhs.get_hash() != rhs.get_hash() ) return false;
return memcmp( lhs.data(), rhs.data(), lhs.size() * sizeof( T ) ) == 0; return memcmp( lhs.data(), rhs.data(), lhs.size() * sizeof( T ) ) == 0;