diff --git a/src/DefaultFramebuffer.cpp b/src/DefaultFramebuffer.cpp index fe7a7d75a..60a628f30 100644 --- a/src/DefaultFramebuffer.cpp +++ b/src/DefaultFramebuffer.cpp @@ -44,6 +44,7 @@ DefaultFramebuffer* DefaultFramebuffer::mapForDraw(std::initializer_list max) max = attachment.first; /* Create linear array from associative */ + /** @todo C++14: use VLA to avoid heap allocation */ GLenum* _attachments = new GLenum[max+1]; std::fill_n(_attachments, max, GL_NONE); for(const auto& attachment: attachments) @@ -56,6 +57,7 @@ DefaultFramebuffer* DefaultFramebuffer::mapForDraw(std::initializer_list attachments) { + /** @todo C++14: use VLA to avoid heap allocation */ GLenum* _attachments = new GLenum[attachments.size()]; for(std::size_t i = 0; i != attachments.size(); ++i) _attachments[i] = GLenum(*(attachments.begin()+i)); @@ -66,6 +68,7 @@ void DefaultFramebuffer::invalidate(std::initializer_list attachments, const Rectanglei& rectangle) { + /** @todo C++14: use VLA to avoid heap allocation */ GLenum* _attachments = new GLenum[attachments.size()]; for(std::size_t i = 0; i != attachments.size(); ++i) _attachments[i] = GLenum(*(attachments.begin()+i)); diff --git a/src/Framebuffer.cpp b/src/Framebuffer.cpp index ae727c33f..001f8d71a 100644 --- a/src/Framebuffer.cpp +++ b/src/Framebuffer.cpp @@ -74,6 +74,7 @@ Framebuffer* Framebuffer::mapForDraw(std::initializer_list max) max = attachment.first; /* Create linear array from associative */ + /** @todo C++14: use VLA to avoid heap allocation */ GLenum* _attachments = new GLenum[max+1]; std::fill_n(_attachments, max, GL_NONE); for(const auto& attachment: attachments) @@ -85,6 +86,7 @@ Framebuffer* Framebuffer::mapForDraw(std::initializer_list attachments) { + /** @todo C++14: use VLA to avoid heap allocation */ GLenum* _attachments = new GLenum[attachments.size()]; for(std::size_t i = 0; i != attachments.size(); ++i) _attachments[i] = GLenum(*(attachments.begin()+i)); @@ -95,6 +97,7 @@ void Framebuffer::invalidate(std::initializer_list attac } void Framebuffer::invalidate(std::initializer_list attachments, const Rectanglei& rectangle) { + /** @todo C++14: use VLA to avoid heap allocation */ GLenum* _attachments = new GLenum[attachments.size()]; for(std::size_t i = 0; i != attachments.size(); ++i) _attachments[i] = GLenum(*(attachments.begin()+i));