Fixed type conversion warnings

This commit is contained in:
Laurent Gomila 2012-02-16 23:09:55 +01:00
parent 091fbd9d42
commit 48c7db52c3
2 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ void ConvexShape::SetPointCount(unsigned int count)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
unsigned int ConvexShape::GetPointCount() const unsigned int ConvexShape::GetPointCount() const
{ {
return myPoints.size(); return static_cast<unsigned int>(myPoints.size());
} }

View File

@ -50,7 +50,7 @@ myPrimitiveType(type)
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
unsigned int VertexArray::GetVertexCount() const unsigned int VertexArray::GetVertexCount() const
{ {
return myVertices.size(); return static_cast<unsigned int>(myVertices.size());
} }
@ -144,7 +144,7 @@ FloatRect VertexArray::GetBounds() const
void VertexArray::Draw(RenderTarget& target, RenderStates states) const void VertexArray::Draw(RenderTarget& target, RenderStates states) const
{ {
if (!myVertices.empty()) if (!myVertices.empty())
target.Draw(&myVertices[0], myVertices.size(), myPrimitiveType, states); target.Draw(&myVertices[0], static_cast<unsigned int>(myVertices.size()), myPrimitiveType, states);
} }
} // namespace sf } // namespace sf