Fix a conversion warning

This commit is contained in:
Laurent Rineau 2020-01-31 11:08:58 +01:00
parent b56cdcb743
commit db55548830
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ public:
{ {
m_iterators[i] = m_cont.insert(m_values[i]); m_iterators[i] = m_cont.insert(m_values[i]);
// Random-pick an element to erase // Random-pick an element to erase
int index_to_erase = rand() % m_values.size(); auto index_to_erase = rand() % m_values.size();
// If it exists // If it exists
bool comparand = false; bool comparand = false;
if (m_free_elements[index_to_erase].compare_exchange_weak(comparand, true) ) if (m_free_elements[index_to_erase].compare_exchange_weak(comparand, true) )