(Windows) Fixed a couple of MSVC compiler warnings.

This commit is contained in:
Leon Styhre 2022-08-23 22:50:14 +02:00
parent e553f68e90
commit 0060cd48dc
2 changed files with 7 additions and 4 deletions

View file

@ -169,8 +169,9 @@ void ImageComponent::setImage(const std::string& path, bool tile)
if (isScalable) { if (isScalable) {
resize(false); resize(false);
mTexture.reset(); mTexture.reset();
mTexture = TextureResource::get(path, tile, mForceLoad, mDynamic, mLinearInterpolation, mTexture =
false, mSize.x, mSize.y); TextureResource::get(path, tile, mForceLoad, mDynamic, mLinearInterpolation, false,
static_cast<size_t>(mSize.x), static_cast<size_t>(mSize.y));
mTexture->rasterizeAt(mSize.x, mSize.y); mTexture->rasterizeAt(mSize.x, mSize.y);
onSizeChanged(); onSizeChanged();
} }

View file

@ -238,15 +238,17 @@ void RatingComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
else if (mSize.x == 0.0f) else if (mSize.x == 0.0f)
mSize.x = mSize.y * NUM_RATING_STARS; mSize.x = mSize.y * NUM_RATING_STARS;
const size_t sizeY {static_cast<size_t>(mSize.y)};
bool imgChanged {false}; bool imgChanged {false};
if (properties & PATH && elem->has("filledPath")) { if (properties & PATH && elem->has("filledPath")) {
mFilledTexture = TextureResource::get(elem->get<std::string>("filledPath"), true, false, mFilledTexture = TextureResource::get(elem->get<std::string>("filledPath"), true, false,
true, false, false, mSize.y, mSize.y); true, false, false, sizeY, sizeY);
imgChanged = true; imgChanged = true;
} }
if (properties & PATH && elem->has("unfilledPath")) { if (properties & PATH && elem->has("unfilledPath")) {
mUnfilledTexture = TextureResource::get(elem->get<std::string>("unfilledPath"), true, false, mUnfilledTexture = TextureResource::get(elem->get<std::string>("unfilledPath"), true, false,
true, false, false, mSize.y, mSize.y); true, false, false, sizeY, sizeY);
imgChanged = true; imgChanged = true;
} }