diff --git a/es-core/src/components/RatingComponent.cpp b/es-core/src/components/RatingComponent.cpp index 6c2c22c6f..7dcdecf7b 100644 --- a/es-core/src/components/RatingComponent.cpp +++ b/es-core/src/components/RatingComponent.cpp @@ -102,11 +102,10 @@ void RatingComponent::onSizeChanged() mSize.x = mSize.y * NUM_RATING_STARS; if (mSize.y > 0.0f) { - size_t heightPx = static_cast(std::round(mSize.y)); if (mFilledTexture) - mFilledTexture->rasterizeAt(heightPx, heightPx); + mFilledTexture->rasterizeAt(mSize.y, mSize.y); if (mUnfilledTexture) - mUnfilledTexture->rasterizeAt(heightPx, heightPx); + mUnfilledTexture->rasterizeAt(mSize.y, mSize.y); } updateVertices(); diff --git a/es-core/src/resources/TextureData.cpp b/es-core/src/resources/TextureData.cpp index 8e1eba5c5..9537b25d7 100644 --- a/es-core/src/resources/TextureData.cpp +++ b/es-core/src/resources/TextureData.cpp @@ -147,8 +147,8 @@ bool TextureData::initFromRGBA(const unsigned char* dataRGBA, size_t width, size mDataRGBA.reserve(width * height * 4); mDataRGBA.insert(mDataRGBA.begin(), dataRGBA, dataRGBA + (width * height * 4)); - mWidth = width; - mHeight = height; + mWidth = static_cast(width); + mHeight = static_cast(height); return true; }