mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Fixed two casting issues.
This commit is contained in:
parent
6cee6d2732
commit
dd94aeec96
|
@ -102,11 +102,10 @@ void RatingComponent::onSizeChanged()
|
|||
mSize.x = mSize.y * NUM_RATING_STARS;
|
||||
|
||||
if (mSize.y > 0.0f) {
|
||||
size_t heightPx = static_cast<size_t>(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();
|
||||
|
|
|
@ -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<int>(width);
|
||||
mHeight = static_cast<int>(height);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue