From 0df7b1b40dfe5f9d627965b328a6c722e1921626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 8 Sep 2015 09:59:15 +0200 Subject: [PATCH] Avoid ambiguous overloads when passing Containers::Array to BufferImage. --- src/Magnum/BufferImage.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Magnum/BufferImage.h b/src/Magnum/BufferImage.h index f580709e3..7d37ab7fe 100644 --- a/src/Magnum/BufferImage.h +++ b/src/Magnum/BufferImage.h @@ -85,6 +85,8 @@ template class BufferImage { /* To avoid decay of sized arrays and nullptr to const void* and unwanted use of deprecated function */ template explicit BufferImage(PixelFormat format, PixelType type, const VectorTypeFor& size, const T(&data)[dataSize], BufferUsage usage): BufferImage{{}, format, type, size, Containers::ArrayView{data}, usage} {} + /* To avoid ambiguous overload when passing Containers::Array */ + template explicit BufferImage(PixelFormat format, PixelType type, const VectorTypeFor& size, const Containers::Array& data, BufferUsage usage): BufferImage{{}, format, type, size, Containers::ArrayView{data}, usage} {} #endif #endif @@ -193,6 +195,10 @@ template class BufferImage { template void setData(PixelFormat format, PixelType type, const VectorTypeFor& size, const T(&data)[dataSize], BufferUsage usage) { setData({}, format, type, size, Containers::ArrayView{data}, usage); } + /* To avoid ambiguous overload when passing Containers::Array */ + template void setData(PixelFormat format, PixelType type, const VectorTypeFor& size, const Containers::Array& data, BufferUsage usage) { + setData({}, format, type, size, Containers::ArrayView{data}, usage); + } #endif #endif