Libmv: Cleanup, make strict compiler more happy

In C++ it is not really safe to memcpy objects, and newer GCC will warn
about this. However, we don't use our vector for unsafe-to-memcpy objects,
so just explicitly silence that warning.
This commit is contained in:
Sergey Sharybin
2018-06-11 12:53:11 +02:00
parent d0956e9cb3
commit a6e582164f

View File

@@ -121,7 +121,7 @@ class vector {
void reserve(unsigned int size) {
if (size > size_) {
T *data = static_cast<T *>(allocate(size));
memcpy(data, data_, sizeof(*data)*size_);
memcpy(static_cast<void *>(data), data_, sizeof(*data)*size_);
allocator_.deallocate(data_, capacity_);
data_ = data;
capacity_ = size;