Browse Source

DebugTools: use Utility::copy() instead of std::copy().

Again due to <string> pulling in some parts of <algorithm>. When it gets
removed, I'd have to include <algorithm> myself.
pull/240/merge
Vladimír Vondruš 4 years ago
parent
commit
1ce421e915
  1. 5
      src/Magnum/DebugTools/BufferData.cpp

5
src/Magnum/DebugTools/BufferData.cpp

@ -26,11 +26,12 @@
#include "BufferData.h"
#ifndef MAGNUM_TARGET_WEBGL
#include <Corrade/Utility/Algorithms.h>
namespace Magnum { namespace DebugTools { namespace Implementation {
void bufferSubData(GL::Buffer& buffer, GLintptr offset, GLsizeiptr size, void* output) {
Containers::ArrayView<const char> data = buffer.mapRead(offset, size);
std::copy(data.begin(), data.end(), reinterpret_cast<char*>(output));
Utility::copy(buffer.mapRead(offset, size), Containers::ArrayView<char>{static_cast<char*>(output), std::size_t(size)});
buffer.unmap();
}

Loading…
Cancel
Save