mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 21:16:13 +01:00
Merge pull request #77 from Gyscos/master
Use size_t instead of unsigned int to follow SFML change
This commit is contained in:
commit
9f4c4abaca
17 files changed
+46
-39
No files matched your search
@@ -277,14 +277,14 @@ float sfCircleShape_getOutlineThickness(const sfCircleShape* shape)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int sfCircleShape_getPointCount(const sfCircleShape* shape)
|
||||
size_t sfCircleShape_getPointCount(const sfCircleShape* shape)
|
||||
{
|
||||
CSFML_CALL_RETURN(shape, getPointCount(), 0);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
sfVector2f sfCircleShape_getPoint(const sfCircleShape* shape, unsigned int index)
|
||||
sfVector2f sfCircleShape_getPoint(const sfCircleShape* shape, size_t index)
|
||||
{
|
||||
sfVector2f point = {0, 0};
|
||||
CSFML_CHECK_RETURN(shape, point);
|
||||
@@ -312,7 +312,7 @@ float sfCircleShape_getRadius(const sfCircleShape* shape)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfCircleShape_setPointCount(sfCircleShape* shape, unsigned int count)
|
||||
void sfCircleShape_setPointCount(sfCircleShape* shape, size_t count)
|
||||
{
|
||||
CSFML_CALL(shape, setPointCount(count));
|
||||
}
|
||||
|
||||
@@ -274,14 +274,14 @@ float sfConvexShape_getOutlineThickness(const sfConvexShape* shape)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int sfConvexShape_getPointCount(const sfConvexShape* shape)
|
||||
size_t sfConvexShape_getPointCount(const sfConvexShape* shape)
|
||||
{
|
||||
CSFML_CALL_RETURN(shape, getPointCount(), 0);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, unsigned int index)
|
||||
sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, size_t index)
|
||||
{
|
||||
sfVector2f point = {0, 0};
|
||||
CSFML_CHECK_RETURN(shape, point);
|
||||
@@ -295,14 +295,14 @@ sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, unsigned int index
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfConvexShape_setPointCount(sfConvexShape* shape, unsigned int count)
|
||||
void sfConvexShape_setPointCount(sfConvexShape* shape, size_t count)
|
||||
{
|
||||
CSFML_CALL(shape, setPointCount(count));
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfConvexShape_setPoint(sfConvexShape* shape, unsigned int index, sfVector2f point)
|
||||
void sfConvexShape_setPoint(sfConvexShape* shape, size_t index, sfVector2f point)
|
||||
{
|
||||
CSFML_CALL(shape, setPoint(index, sf::Vector2f(point.x, point.y)));
|
||||
}
|
||||
|
||||
@@ -274,14 +274,14 @@ float sfRectangleShape_getOutlineThickness(const sfRectangleShape* shape)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int sfRectangleShape_getPointCount(const sfRectangleShape* shape)
|
||||
size_t sfRectangleShape_getPointCount(const sfRectangleShape* shape)
|
||||
{
|
||||
CSFML_CALL_RETURN(shape, getPointCount(), 0);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
sfVector2f sfRectangleShape_getPoint(const sfRectangleShape* shape, unsigned int index)
|
||||
sfVector2f sfRectangleShape_getPoint(const sfRectangleShape* shape, size_t index)
|
||||
{
|
||||
sfVector2f point = {0, 0};
|
||||
CSFML_CHECK_RETURN(shape, point);
|
||||
|
||||
@@ -218,7 +218,7 @@ void sfRenderTexture_drawVertexArray(sfRenderTexture* renderTexture, const sfVer
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfRenderTexture_drawPrimitives(sfRenderTexture* renderTexture,
|
||||
const sfVertex* vertices, unsigned int vertexCount,
|
||||
const sfVertex* vertices, size_t vertexCount,
|
||||
sfPrimitiveType type, const sfRenderStates* states)
|
||||
{
|
||||
CSFML_CALL(renderTexture, draw(reinterpret_cast<const sf::Vertex*>(vertices), vertexCount,
|
||||
@@ -280,4 +280,4 @@ void sfRenderTexture_setRepeated(sfRenderTexture* renderTexture, sfBool repeated
|
||||
sfBool sfRenderTexture_isRepeated(const sfRenderTexture* renderTexture)
|
||||
{
|
||||
CSFML_CALL_RETURN(renderTexture, isRepeated(), sfFalse);
|
||||
}
|
||||
}
|
||||
@@ -475,7 +475,7 @@ void sfRenderWindow_drawVertexArray(sfRenderWindow* renderWindow, const sfVertex
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfRenderWindow_drawPrimitives(sfRenderWindow* renderWindow,
|
||||
const sfVertex* vertices, unsigned int vertexCount,
|
||||
const sfVertex* vertices, size_t vertexCount,
|
||||
sfPrimitiveType type, const sfRenderStates* states)
|
||||
{
|
||||
CSFML_CALL(renderWindow, draw(reinterpret_cast<const sf::Vertex*>(vertices), vertexCount,
|
||||
|
||||
@@ -267,14 +267,14 @@ float sfShape_getOutlineThickness(const sfShape* shape)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int sfShape_getPointCount(const sfShape* shape)
|
||||
size_t sfShape_getPointCount(const sfShape* shape)
|
||||
{
|
||||
CSFML_CALL_RETURN(shape, getPointCount(), 0);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
sfVector2f sfShape_getPoint(const sfShape* shape, unsigned int index)
|
||||
sfVector2f sfShape_getPoint(const sfShape* shape, size_t index)
|
||||
{
|
||||
sfVector2f point = {0, 0};
|
||||
CSFML_CHECK_RETURN(shape, point);
|
||||
|
||||
@@ -51,12 +51,12 @@ public :
|
||||
{
|
||||
}
|
||||
|
||||
virtual unsigned int getPointCount() const
|
||||
virtual std::size_t getPointCount() const
|
||||
{
|
||||
return myGetPointCountCallback(myUserData);
|
||||
}
|
||||
|
||||
virtual sf::Vector2f getPoint(unsigned int index) const
|
||||
virtual sf::Vector2f getPoint(std::size_t index) const
|
||||
{
|
||||
sfVector2f point = myGetPointCallback(index, myUserData);
|
||||
return sf::Vector2f(point.x, point.y);
|
||||
|
||||
@@ -54,14 +54,14 @@ void sfVertexArray_destroy(sfVertexArray* vertexArray)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int sfVertexArray_getVertexCount(const sfVertexArray* vertexArray)
|
||||
size_t sfVertexArray_getVertexCount(const sfVertexArray* vertexArray)
|
||||
{
|
||||
CSFML_CALL_RETURN(vertexArray, getVertexCount(), 0);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
sfVertex* sfVertexArray_getVertex(sfVertexArray* vertexArray, unsigned int index)
|
||||
sfVertex* sfVertexArray_getVertex(sfVertexArray* vertexArray, size_t index)
|
||||
{
|
||||
CSFML_CHECK_RETURN(vertexArray, NULL);
|
||||
|
||||
@@ -78,7 +78,7 @@ void sfVertexArray_clear(sfVertexArray* vertexArray)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
void sfVertexArray_resize(sfVertexArray* vertexArray, unsigned int vertexCount)
|
||||
void sfVertexArray_resize(sfVertexArray* vertexArray, size_t vertexCount)
|
||||
{
|
||||
CSFML_CALL(vertexArray, resize(vertexCount));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user