mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 04:24:28 +00:00
loader/lottie: fix all data conversion compiler warnings on windows
This commit is contained in:
parent
c90962a26c
commit
664f028c15
2 changed files with 6 additions and 6 deletions
|
@ -351,7 +351,7 @@ static void _updatePrecomp(LottieLayer* precomp, int32_t frameNo)
|
||||||
static void _updateSolid(LottieLayer* layer, int32_t frameNo)
|
static void _updateSolid(LottieLayer* layer, int32_t frameNo)
|
||||||
{
|
{
|
||||||
auto shape = Shape::gen();
|
auto shape = Shape::gen();
|
||||||
shape->appendRect(0, 0, layer->w, layer->h);
|
shape->appendRect(0, 0, static_cast<float>(layer->w), static_cast<float>(layer->h));
|
||||||
shape->fill(layer->color.rgb[0], layer->color.rgb[1], layer->color.rgb[2], layer->opacity(frameNo));
|
shape->fill(layer->color.rgb[0], layer->color.rgb[1], layer->color.rgb[2], layer->opacity(frameNo));
|
||||||
layer->scene->push(std::move(shape));
|
layer->scene->push(std::move(shape));
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,12 +39,12 @@ static bool _checkDotLottie(const char *str)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int _str2float(const char* str, int len)
|
static float _str2float(const char* str, int len)
|
||||||
{
|
{
|
||||||
auto tmp = strDuplicate(str, len);
|
auto tmp = strDuplicate(str, len);
|
||||||
auto ret = strToFloat(tmp, nullptr);
|
auto ret = strToFloat(tmp, nullptr);
|
||||||
free(tmp);
|
free(tmp);
|
||||||
return lround(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,8 +71,8 @@ void LottieLoader::run(unsigned tid)
|
||||||
comp = parser.comp;
|
comp = parser.comp;
|
||||||
if (!comp) return;
|
if (!comp) return;
|
||||||
builder->build(comp);
|
builder->build(comp);
|
||||||
w = comp->w;
|
w = static_cast<float>(comp->w);
|
||||||
h = comp->h;
|
h = static_cast<float>(comp->h);
|
||||||
frameDuration = comp->duration();
|
frameDuration = comp->duration();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ bool LottieLoader::header()
|
||||||
//Quickly validate the given Lottie file without parsing in order to get the animation info.
|
//Quickly validate the given Lottie file without parsing in order to get the animation info.
|
||||||
auto startFrame = 0.0f;
|
auto startFrame = 0.0f;
|
||||||
auto endFrame = 0.0f;
|
auto endFrame = 0.0f;
|
||||||
float frameRate = 0.0f;
|
auto frameRate = 0.0f;
|
||||||
uint32_t depth = 0;
|
uint32_t depth = 0;
|
||||||
|
|
||||||
auto p = content;
|
auto p = content;
|
||||||
|
|
Loading…
Add table
Reference in a new issue