Cast vectors explicitly using vector_cast.

This commit is contained in:
King_DuckZ 2016-11-02 18:31:59 +01:00
parent 650f8d6de1
commit 68d179975e
11 changed files with 41 additions and 39 deletions

View file

@ -354,7 +354,7 @@ namespace cloonel {
if (m_texture) {
int2 wh;
SDL_QueryTexture(m_texture, nullptr, nullptr, &wh.x(), &wh.y());
m_size = static_cast<float2>(wh);
m_size = vector_cast<float2>(wh);
}
}
@ -369,14 +369,14 @@ namespace cloonel {
RectFloat src(float2(0.0f), m_size);
if (parClip) {
const RectFloat clip(float2(0.0f), static_cast<float2>(m_sdlmain->WidthHeight()));
const RectFloat clip(float2(0.0f), vector_cast<float2>(m_sdlmain->WidthHeight()));
const bool visible = ClipRect(src, dest, clip);
if (not visible)
return;
}
#if !defined(NDEBUG)
else {
const RectFloat clip(float2(0.0f), static_cast<float2>(m_sdlmain->WidthHeight()));
const RectFloat clip(float2(0.0f), vector_cast<float2>(m_sdlmain->WidthHeight()));
assert(IsRectCompletelyInsideRect(dest, clip));
}
#endif