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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user