mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +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;
|
mSize.x = mSize.y * NUM_RATING_STARS;
|
||||||
|
|
||||||
if (mSize.y > 0.0f) {
|
if (mSize.y > 0.0f) {
|
||||||
size_t heightPx = static_cast<size_t>(std::round(mSize.y));
|
|
||||||
if (mFilledTexture)
|
if (mFilledTexture)
|
||||||
mFilledTexture->rasterizeAt(heightPx, heightPx);
|
mFilledTexture->rasterizeAt(mSize.y, mSize.y);
|
||||||
if (mUnfilledTexture)
|
if (mUnfilledTexture)
|
||||||
mUnfilledTexture->rasterizeAt(heightPx, heightPx);
|
mUnfilledTexture->rasterizeAt(mSize.y, mSize.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateVertices();
|
updateVertices();
|
||||||
|
|
|
@ -147,8 +147,8 @@ bool TextureData::initFromRGBA(const unsigned char* dataRGBA, size_t width, size
|
||||||
mDataRGBA.reserve(width * height * 4);
|
mDataRGBA.reserve(width * height * 4);
|
||||||
mDataRGBA.insert(mDataRGBA.begin(), dataRGBA, dataRGBA + (width * height * 4));
|
mDataRGBA.insert(mDataRGBA.begin(), dataRGBA, dataRGBA + (width * height * 4));
|
||||||
|
|
||||||
mWidth = width;
|
mWidth = static_cast<int>(width);
|
||||||
mHeight = height;
|
mHeight = static_cast<int>(height);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue