From 9afd53a3295b36b6799324e0e4ba8c37c9f2e376 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 20 Feb 2021 15:00:43 +0000 Subject: Fix constness of Mesh constructor params --- gfx/models/mesh.cpp | 2 +- gfx/models/mesh.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/models/mesh.cpp b/gfx/models/mesh.cpp index 3487083..0834394 100644 --- a/gfx/models/mesh.cpp +++ b/gfx/models/mesh.cpp @@ -1,7 +1,7 @@ #include "mesh.h" #include "vertex.hpp" -Mesh::Mesh(std::span vertices, std::span indices, GLenum m) : +Mesh::Mesh(const std::span vertices, const std::span indices, GLenum m) : m_vertexArrayObject {}, m_vertexArrayBuffers {}, m_numIndices {indices.size()}, mode {m} { glGenVertexArrays(1, &m_vertexArrayObject); diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h index 1e53407..8825aa2 100644 --- a/gfx/models/mesh.h +++ b/gfx/models/mesh.h @@ -14,7 +14,7 @@ enum MeshBufferPositions { POSITION_VB, TEXCOORD_VB, NORMAL_VB, INDEX_VB }; class Mesh { public: - Mesh(std::span vertices, std::span indices, GLenum = GL_TRIANGLES); + Mesh(const std::span vertices, const std::span indices, GLenum = GL_TRIANGLES); virtual ~Mesh(); NO_COPY(Mesh); -- cgit v1.2.3