diff --git a/client/renderSDL/SDL_Extensions.cpp b/client/renderSDL/SDL_Extensions.cpp index ae6b4c504..9000473c4 100644 --- a/client/renderSDL/SDL_Extensions.cpp +++ b/client/renderSDL/SDL_Extensions.cpp @@ -664,8 +664,8 @@ void CSDL_Ext::convertToGrayscale( SDL_Surface * surf, const Rect & rect ) template void scaleSurfaceFastInternal(SDL_Surface *surf, SDL_Surface *ret) { - const float factorX = float(surf->w) / float(ret->w); - const float factorY = float(surf->h) / float(ret->h); + const float factorX = static_cast(surf->w) / static_cast(ret->w); + const float factorY = static_cast(surf->h) / static_cast(ret->h); for(int y = 0; y < ret->h; y++) { diff --git a/mapeditor/mainwindow.cpp b/mapeditor/mainwindow.cpp index 1de00e042..b01e637f3 100644 --- a/mapeditor/mainwindow.cpp +++ b/mapeditor/mainwindow.cpp @@ -538,8 +538,8 @@ void MainWindow::addGroupIntoCatalog(const std::string & groupName, bool useCust auto picture = animation.getImage(0); if(picture && picture->width() && picture->height()) { - qreal xscale = qreal(128) / qreal(picture->width()); - qreal yscale = qreal(128) / qreal(picture->height()); + qreal xscale = static_cast(128) / static_cast(picture->width()); + qreal yscale = static_cast(128) / static_cast(picture->height()); qreal scale = std::min(xscale, yscale); painter.scale(scale, scale); painter.drawImage(QPoint(0, 0), *picture);