From b2ad2e287b65c2ff5201775f313915c7149b669c Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Tue, 7 Dec 2021 11:41:00 +0100 Subject: [PATCH] Fix warnings --- QtAwesome/QtAwesome.h | 2 +- QtAwesome/QtAwesomeAnim.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/QtAwesome/QtAwesome.h b/QtAwesome/QtAwesome.h index 5aabd1b..2859113 100644 --- a/QtAwesome/QtAwesome.h +++ b/QtAwesome/QtAwesome.h @@ -826,7 +826,7 @@ Q_OBJECT public: - explicit QtAwesome(QObject *parent = 0); + explicit QtAwesome(QObject *parent = nullptr); virtual ~QtAwesome(); void init( const QString& fontname ); diff --git a/QtAwesome/QtAwesomeAnim.cpp b/QtAwesome/QtAwesomeAnim.cpp index 8ad44b6..6e4cf8d 100644 --- a/QtAwesome/QtAwesomeAnim.cpp +++ b/QtAwesome/QtAwesomeAnim.cpp @@ -9,7 +9,7 @@ QtAwesomeAnimation::QtAwesomeAnimation(QWidget *parentWidget, int interval, int step) : parentWidgetRef_( parentWidget ) - , timer_( 0 ) + , timer_( nullptr ) , interval_( interval ) , step_( step ) , angle_( 0.0f ) @@ -29,8 +29,8 @@ void QtAwesomeAnimation::setup( QPainter &painter, const QRect &rect) else { //timer, angle, self.step = self.info[self.parent_widget] - float x_center = rect.width() * 0.5; - float y_center = rect.height() * 0.5; + float x_center = rect.width() * 0.5f; + float y_center = rect.height() * 0.5f; painter.translate(x_center, y_center); painter.rotate(angle_); painter.translate(-x_center, -y_center);