diff --git a/src/Magnum/DebugTools/BufferData.cpp b/src/Magnum/DebugTools/BufferData.cpp index 80d8bb64e..746846963 100644 --- a/src/Magnum/DebugTools/BufferData.cpp +++ b/src/Magnum/DebugTools/BufferData.cpp @@ -26,11 +26,12 @@ #include "BufferData.h" #ifndef MAGNUM_TARGET_WEBGL +#include + namespace Magnum { namespace DebugTools { namespace Implementation { void bufferSubData(GL::Buffer& buffer, GLintptr offset, GLsizeiptr size, void* output) { - Containers::ArrayView data = buffer.mapRead(offset, size); - std::copy(data.begin(), data.end(), reinterpret_cast(output)); + Utility::copy(buffer.mapRead(offset, size), Containers::ArrayView{static_cast(output), std::size_t(size)}); buffer.unmap(); }