Fix buggy rebase

Former-commit-id: 6037d1f326116e5aae56be9a73a8f9ca68a45bbe
This commit is contained in:
John Sully 2019-07-18 21:57:17 -04:00
parent 589628823f
commit 010450e68f

View File

@ -12,24 +12,10 @@
*
*************************************************/
<<<<<<< HEAD
<<<<<<< HEAD
template<typename T, bool MEMMOVE_SAFE=false>
class compactvector
{
static_assert(MEMMOVE_SAFE || std::is_trivially_copyable<T>::value, "compactvector requires trivially copyable types");
=======
template<typename T>
class compactvector
{
static_assert(std::is_trivially_copyable<T>::value, "compactvector requires trivially copyable types");
>>>>>>> New expire datastructure and algorithm. Allows us to expire in sublinear time
=======
template<typename T, bool MEMMOVE_SAFE=false>
class compactvector
{
static_assert(MEMMOVE_SAFE || std::is_trivially_copyable<T>::value, "compactvector requires trivially copyable types");
>>>>>>> Initial prototype of EXPIREMEMBER command
T *m_data = nullptr;
unsigned m_celem = 0;
unsigned m_max = 0;
@ -40,14 +26,7 @@ public:
compactvector() noexcept = default;
~compactvector() noexcept
{
<<<<<<< HEAD
<<<<<<< HEAD
clear(); // call dtors
=======
>>>>>>> New expire datastructure and algorithm. Allows us to expire in sublinear time
=======
clear(); // call dtors
>>>>>>> Initial prototype of EXPIREMEMBER command
zfree(m_data);
}
@ -99,15 +78,7 @@ public:
assert(idx < m_max);
where = m_data + idx;
memmove(m_data + idx + 1, m_data + idx, (m_celem - idx)*sizeof(T));
<<<<<<< HEAD
<<<<<<< HEAD
new(m_data + idx) T(std::move(val));
=======
m_data[idx] = val;
>>>>>>> New expire datastructure and algorithm. Allows us to expire in sublinear time
=======
new(m_data + idx) T(std::move(val));
>>>>>>> Initial prototype of EXPIREMEMBER command
++m_celem;
return where;
}