Browse Source

GL: use the more explicit initializer list to ArrayView conversion here.

This code got made long before this helper was a thing.
pull/601/head
Vladimír Vondruš 3 years ago
parent
commit
55954be637
  1. 4
      src/Magnum/GL/Buffer.h

4
src/Magnum/GL/Buffer.h

@ -1174,7 +1174,7 @@ class MAGNUM_GL_EXPORT Buffer: public AbstractObject {
* @m_since{2019,10}
*/
template<class T> Buffer& setData(std::initializer_list<T> data, BufferUsage usage = BufferUsage::StaticDraw) {
return setData({data.begin(), data.size()}, usage);
return setData(Containers::arrayView(data), usage);
}
/**
@ -1196,7 +1196,7 @@ class MAGNUM_GL_EXPORT Buffer: public AbstractObject {
* @m_since{2019,10}
*/
template<class T> Buffer& setSubData(GLintptr offset, std::initializer_list<T> data) {
return setSubData(offset, {data.begin(), data.size()});
return setSubData(offset, Containers::arrayView(data));
}
/**

Loading…
Cancel
Save