Browse Source

Avoid ambiguity when constructing BufferImage.

pull/203/merge
Vladimír Vondruš 9 years ago
parent
commit
714a6e6ed4
  1. 3
      src/Magnum/BufferImage.h

3
src/Magnum/BufferImage.h

@ -104,8 +104,9 @@ template<UnsignedInt dimensions> class BufferImage {
/* To avoid decay of sized arrays and nullptr to const void* and
unwanted use of deprecated function */
template<class T, std::size_t dataSize> explicit BufferImage(PixelFormat format, PixelType type, const VectorTypeFor<dimensions, Int>& size, const T(&data)[dataSize], BufferUsage usage): BufferImage{{}, format, type, size, Containers::ArrayView<const void>{data}, usage} {}
/* To avoid ambiguous overload when passing Containers::Array */
/* To avoid ambiguous overload when passing Containers::Array[View] */
template<class T> explicit BufferImage(PixelFormat format, PixelType type, const VectorTypeFor<dimensions, Int>& size, const Containers::Array<T>& data, BufferUsage usage): BufferImage{{}, format, type, size, Containers::ArrayView<const void>{data}, usage} {}
template<class T> explicit BufferImage(PixelFormat format, PixelType type, const VectorTypeFor<dimensions, Int>& size, const Containers::ArrayView<T>& data, BufferUsage usage): BufferImage{{}, format, type, size, Containers::ArrayView<const void>{data}, usage} {}
#endif
#endif

Loading…
Cancel
Save