From 95515ca5df8adc74a8d09c683e3b0a771a5f3d15 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Tue, 7 Jan 2014 15:39:45 -0800 Subject: [PATCH] chore(*): fix warnings produced by clang++ Signed-off-by: Leonardo de Moura --- src/kernel/environment.cpp | 3 ++- src/util/buffer.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kernel/environment.cpp b/src/kernel/environment.cpp index f460b8537..f4fc7b7b2 100644 --- a/src/kernel/environment.cpp +++ b/src/kernel/environment.cpp @@ -233,7 +233,8 @@ object environment_cell::get_object(name const & n) const { } } -struct universes { +class universes { +public: std::vector m_uvars; universe_constraints m_constraints; }; diff --git a/src/util/buffer.h b/src/util/buffer.h index b9c110f78..6229b3040 100644 --- a/src/util/buffer.h +++ b/src/util/buffer.h @@ -31,10 +31,10 @@ protected: void expand() { unsigned new_capacity = m_capacity << 1; - T * new_buffer = reinterpret_cast(new char[sizeof(T) * new_capacity]); + char * new_buffer = new char[sizeof(T) * new_capacity]; std::memcpy(new_buffer, m_buffer, m_pos * sizeof(T)); free_memory(); - m_buffer = new_buffer; + m_buffer = reinterpret_cast(new_buffer); m_capacity = new_capacity; }