fix(util/buffer): warning produced by clang++

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-01-08 11:27:11 -08:00
parent 3564665b44
commit dd6c13abb0

View file

@ -32,7 +32,7 @@ protected:
void expand() {
unsigned new_capacity = m_capacity << 1;
char * new_buffer = new char[sizeof(T) * new_capacity];
std::memcpy(new_buffer, m_buffer, m_pos * sizeof(T));
std::memcpy(new_buffer, static_cast<void*>(m_buffer), m_pos * sizeof(T));
free_memory();
m_buffer = reinterpret_cast<T*>(new_buffer);
m_capacity = new_capacity;