diff options
Diffstat (limited to 'src/server/mainwindow')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index dcf8973..73fcbaf 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -243,7 +243,7 @@ int distance(QPointF a, QPointF b) const qreal dx = a.x() - b.x(); const qreal dy = a.y() - b.y(); const qreal sum = dx * dx + dy * dy; - return (int)sum; + return int(sum); } /***************************************************************************//** @@ -460,13 +460,13 @@ enum AspectStatus { GRID_OK, GRID_TOO_WIDE, GRID_TOO_TALL }; * */ AspectStatus checkAspectRatio(const QSize& frameSize, const QSize& gridSize) { - float aspectRoom = ((float) gridSize.height()) / ((float) gridSize.width()); - float aspectFrame = ((float) frameSize.height()) / ((float) frameSize.width()); + float aspectRoom = float(gridSize.height()) / float(gridSize.width()); + float aspectFrame = float(frameSize.height()) / float(frameSize.width()); - if (aspectRoom / aspectFrame < 0.8) { + if (aspectRoom / aspectFrame < 0.8f) { return GRID_TOO_WIDE; } - if ( aspectFrame / aspectRoom < 0.8) { + if ( aspectFrame / aspectRoom < 0.8f) { return GRID_TOO_TALL; } return GRID_OK; |