Replaced unsigned int with std::size_t for array indices/sizes
This commit is contained in:
parent
b0d6c2bea9
commit
1cfa5c6f1d
13 changed files with 51 additions and 51 deletions
|
@ -49,7 +49,7 @@ public:
|
|||
/// \param pointCount Number of points composing the circle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
explicit CircleShape(float radius = 0, unsigned int pointCount = 30);
|
||||
explicit CircleShape(float radius = 0, std::size_t pointCount = 30);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the radius of the circle
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
/// \see getPointCount
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void setPointCount(unsigned int count);
|
||||
void setPointCount(std::size_t count);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the number of points of the circle
|
||||
|
@ -89,7 +89,7 @@ public:
|
|||
/// \see setPointCount
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual unsigned int getPointCount() const;
|
||||
virtual std::size_t getPointCount() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of the circle
|
||||
|
@ -104,15 +104,15 @@ public:
|
|||
/// \return index-th point of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual Vector2f getPoint(unsigned int index) const;
|
||||
virtual Vector2f getPoint(std::size_t index) const;
|
||||
|
||||
private:
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Member data
|
||||
////////////////////////////////////////////////////////////
|
||||
float m_radius; ///< Radius of the circle
|
||||
unsigned int m_pointCount; ///< Number of points composing the circle
|
||||
float m_radius; ///< Radius of the circle
|
||||
std::size_t m_pointCount; ///< Number of points composing the circle
|
||||
};
|
||||
|
||||
} // namespace sf
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
/// \param pointCount Number of points of the polygon
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
explicit ConvexShape(unsigned int pointCount = 0);
|
||||
explicit ConvexShape(std::size_t pointCount = 0);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the number of points of the polygon
|
||||
|
@ -61,7 +61,7 @@ public:
|
|||
/// \see getPointCount
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void setPointCount(unsigned int count);
|
||||
void setPointCount(std::size_t count);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the number of points of the polygon
|
||||
|
@ -71,7 +71,7 @@ public:
|
|||
/// \see setPointCount
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual unsigned int getPointCount() const;
|
||||
virtual std::size_t getPointCount() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the position of a point
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
/// \see getPoint
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void setPoint(unsigned int index, const Vector2f& point);
|
||||
void setPoint(std::size_t index, const Vector2f& point);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a point
|
||||
|
@ -105,7 +105,7 @@ public:
|
|||
/// \see setPoint
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual Vector2f getPoint(unsigned int index) const;
|
||||
virtual Vector2f getPoint(std::size_t index) const;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
/// shapes, this number is always 4.
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual unsigned int getPointCount() const;
|
||||
virtual std::size_t getPointCount() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of the rectangle
|
||||
|
@ -92,7 +92,7 @@ public:
|
|||
/// \return index-th point of the shape
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual Vector2f getPoint(unsigned int index) const;
|
||||
virtual Vector2f getPoint(std::size_t index) const;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ public:
|
|||
/// \param states Render states to use for drawing
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void draw(const Vertex* vertices, unsigned int vertexCount,
|
||||
void draw(const Vertex* vertices, std::size_t vertexCount,
|
||||
PrimitiveType type, const RenderStates& states = RenderStates::Default);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -193,7 +193,7 @@ public:
|
|||
/// \see getPoint
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual unsigned int getPointCount() const = 0;
|
||||
virtual std::size_t getPointCount() const = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a point of the shape
|
||||
|
@ -210,7 +210,7 @@ public:
|
|||
/// \see getPointCount
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
virtual Vector2f getPoint(unsigned int index) const = 0;
|
||||
virtual Vector2f getPoint(std::size_t index) const = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the local bounding rectangle of the entity
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
/// \param vertexCount Initial number of vertices in the array
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
explicit VertexArray(PrimitiveType type, unsigned int vertexCount = 0);
|
||||
explicit VertexArray(PrimitiveType type, std::size_t vertexCount = 0);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the vertex count
|
||||
|
@ -69,7 +69,7 @@ public:
|
|||
/// \return Number of vertices in the array
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
unsigned int getVertexCount() const;
|
||||
std::size_t getVertexCount() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a read-write access to a vertex by its index
|
||||
|
@ -85,7 +85,7 @@ public:
|
|||
/// \see getVertexCount
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
Vertex& operator [](unsigned int index);
|
||||
Vertex& operator [](std::size_t index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a read-only access to a vertex by its index
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
/// \see getVertexCount
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
const Vertex& operator [](unsigned int index) const;
|
||||
const Vertex& operator [](std::size_t index) const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Clear the vertex array
|
||||
|
@ -126,7 +126,7 @@ public:
|
|||
/// \param vertexCount New size of the array (number of vertices)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void resize(unsigned int vertexCount);
|
||||
void resize(std::size_t vertexCount);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Add a vertex to the array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue