Skip to content

Commit

Permalink
Fix const correctness issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Dec 23, 2024
1 parent feb431a commit 7abc9f0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/CSFML/Graphics/VertexArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ CSFML_GRAPHICS_API void sfVertexArray_setPrimitiveType(sfVertexArray* vertexArra
/// \return Primitive type
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfPrimitiveType sfVertexArray_getPrimitiveType(sfVertexArray* vertexArray);
CSFML_GRAPHICS_API sfPrimitiveType sfVertexArray_getPrimitiveType(const sfVertexArray* vertexArray);

////////////////////////////////////////////////////////////
/// \brief Compute the bounding rectangle of a vertex array
Expand All @@ -163,4 +163,4 @@ CSFML_GRAPHICS_API sfPrimitiveType sfVertexArray_getPrimitiveType(sfVertexArray*
/// \return Bounding rectangle of the vertex array
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfFloatRect sfVertexArray_getBounds(sfVertexArray* vertexArray);
CSFML_GRAPHICS_API sfFloatRect sfVertexArray_getBounds(const sfVertexArray* vertexArray);
2 changes: 1 addition & 1 deletion include/CSFML/Graphics/VertexBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ CSFML_GRAPHICS_API void sfVertexBuffer_swap(sfVertexBuffer* left, sfVertexBuffer
/// \return OpenGL handle of the vertex buffer or 0 if not yet created
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API unsigned int sfVertexBuffer_getNativeHandle(sfVertexBuffer* vertexBuffer);
CSFML_GRAPHICS_API unsigned int sfVertexBuffer_getNativeHandle(const sfVertexBuffer* vertexBuffer);

////////////////////////////////////////////////////////////
/// \brief Set the type of primitives to draw
Expand Down
4 changes: 2 additions & 2 deletions src/CSFML/Graphics/VertexArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ void sfVertexArray_setPrimitiveType(sfVertexArray* vertexArray, sfPrimitiveType


////////////////////////////////////////////////////////////
sfPrimitiveType sfVertexArray_getPrimitiveType(sfVertexArray* vertexArray)
sfPrimitiveType sfVertexArray_getPrimitiveType(const sfVertexArray* vertexArray)
{
assert(vertexArray);
return static_cast<sfPrimitiveType>(vertexArray->getPrimitiveType());
}


////////////////////////////////////////////////////////////
sfFloatRect sfVertexArray_getBounds(sfVertexArray* vertexArray)
sfFloatRect sfVertexArray_getBounds(const sfVertexArray* vertexArray)
{
assert(vertexArray);
return convertRect(vertexArray->getBounds());
Expand Down
2 changes: 1 addition & 1 deletion src/CSFML/Graphics/VertexBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void sfVertexBuffer_swap(sfVertexBuffer* left, sfVertexBuffer* right)


////////////////////////////////////////////////////////////
unsigned int sfVertexBuffer_getNativeHandle(sfVertexBuffer* vertexBuffer)
unsigned int sfVertexBuffer_getNativeHandle(const sfVertexBuffer* vertexBuffer)
{
assert(vertexBuffer);
return vertexBuffer->getNativeHandle();
Expand Down

0 comments on commit 7abc9f0

Please sign in to comment.