Minor performance enhancement

`list.empty()` runs in constant time; `list.size` can run in linear time.
`list.empty()` runs in constant time; `list.size` can run in linear time.

Sources:
http://www.cplusplus.com/reference/list/list/size/
http://www.cplusplus.com/reference/list/list/empty/
This commit is contained in:
Moshe Kaplan
2014-07-03 10:10:40 -04:00
parent 63f1eea7ca
commit 240d1715c9
+1 -1
View File
@@ -53,7 +53,7 @@ pos_map_queue &pos_map_queue::operator=( const pos_map_queue &rhs )
void pos_map_queue::Insert( int64_t iSourceFrame, int iFrames, int64_t iDestFrame, float fSourceToDestRatio )
{
if( m_pImpl->m_Queue.size() )
if( !m_pImpl->m_Queue.empty() )
{
/* Optimization: If the last entry lines up with this new entry, just merge them. */
pos_map_t &last = m_pImpl->m_Queue.back();