From a8736be3cd71dcc4647dfd87827daf59ff7ef0fc Mon Sep 17 00:00:00 2001 From: "Vogel, Rick" Date: Wed, 2 Aug 2023 11:54:16 +0200 Subject: [PATCH] remove unused variables and functions --- src/controls/private/QskLevelingSensor.cpp | 11 ----------- src/controls/private/QskLevelingSensorSkinlet.cpp | 12 ++++++++++++ src/controls/private/QskLevelingSensorUtility.h | 3 +-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/controls/private/QskLevelingSensor.cpp b/src/controls/private/QskLevelingSensor.cpp index 4514c9f6..dec03f26 100644 --- a/src/controls/private/QskLevelingSensor.cpp +++ b/src/controls/private/QskLevelingSensor.cpp @@ -32,17 +32,6 @@ namespace return false; } - template<> - bool compareExchange< double >( double& dst, const double& src ) - { - if ( !qskFuzzyCompare( dst, src ) ) - { - dst = src; - return true; - } - return false; - } - inline bool isAxis( const Qt::Axis axis ) { return axis == Qt::XAxis || axis == Qt::YAxis || axis == Qt::ZAxis; diff --git a/src/controls/private/QskLevelingSensorSkinlet.cpp b/src/controls/private/QskLevelingSensorSkinlet.cpp index d824f462..77d0b53c 100644 --- a/src/controls/private/QskLevelingSensorSkinlet.cpp +++ b/src/controls/private/QskLevelingSensorSkinlet.cpp @@ -220,6 +220,7 @@ template<> Q_REQUIRED_RESULT QRectF QskLevelingSensorSkinlet::subControlRect< R::Horizon >( const QskLevelingSensor* const sensor, const QRectF& contentsRect ) const { + Q_UNUSED(contentsRect) const auto scale = sensor->strutSizeHint( Q::Horizon ); const auto width = 2 * innerRadius( sensor ) * scale.width(); const auto height = width; @@ -251,6 +252,8 @@ template<> QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::OuterDisk >( const QskLevelingSensor* const sensor, const quint8 nodeRole, QSGNode* const node ) const { + Q_UNUSED(nodeRole) + const auto subControl = Q::OuterDisk; const auto contentsRect = sensor->contentsRect(); const auto boxRect = subControlRect< OuterDisk >( sensor, contentsRect ); @@ -282,6 +285,8 @@ template<> QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::Horizon >( const QskLevelingSensor* const sensor, const quint8 nodeRole, QSGNode* const node ) const { + Q_UNUSED(nodeRole) + const auto subControl = Q::Horizon; const State< QskAspect::Subcontrol > state( sensor, subControl ); @@ -351,6 +356,7 @@ template<> QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::TickmarksX >( const QskLevelingSensor* const sensor, const quint8 nodeRole, QSGNode* const node ) const { + Q_UNUSED(nodeRole) return updateLinearTickmarksNode( sensor, Q::TickmarksX, sensor->tickmarks( Qt::XAxis ), Qt::Horizontal, node ); } @@ -359,6 +365,7 @@ template<> QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::TickmarksY >( const QskLevelingSensor* const sensor, const quint8 nodeRole, QSGNode* const node ) const { + Q_UNUSED(nodeRole) return updateLinearTickmarksNode( sensor, Q::TickmarksY, sensor->tickmarks( Qt::YAxis ), Qt::Vertical, node ); } @@ -367,6 +374,7 @@ template<> QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::TickmarksZ >( const QskLevelingSensor* const sensor, const quint8 nodeRole, QSGNode* const node ) const { + Q_UNUSED(nodeRole) const auto subControl = Q::TickmarksZ; const State< QskAspect::Subcontrol > state( sensor, subControl ); const auto color = sensor->color( subControl ); @@ -390,6 +398,7 @@ template<> QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::TickmarksXLabels >( const QskLevelingSensor* const sensor, const quint8 nodeRole, QSGNode* const node ) const { + Q_UNUSED(nodeRole) const auto subControl = Q::TickmarksXLabels; const State< QskAspect::Subcontrol > state( sensor, subControl ); const auto r3 = state.r1 * sensor->strutSizeHint( Q::TickmarksX ).height(); @@ -409,6 +418,7 @@ template<> QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::TickmarksYLabels >( const QskLevelingSensor* const sensor, const quint8 nodeRole, QSGNode* const node ) const { + Q_UNUSED(nodeRole) const auto subControl = Q::TickmarksYLabels; const State< QskAspect::Subcontrol > state( sensor, subControl ); const auto r3 = state.r1 * sensor->strutSizeHint( Q::TickmarksY ).width(); @@ -428,6 +438,7 @@ template<> QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::TickmarksZLabels >( const QskLevelingSensor* const sensor, const quint8 nodeRole, QSGNode* const node ) const { + Q_UNUSED(nodeRole) const auto subControl = Q::TickmarksZLabels; const State< QskAspect::Subcontrol > state( sensor, subControl ); auto* const tNode = ensureNodes< QSGTransformNode, RadialTickmarksLabelsNode >( node ); @@ -442,6 +453,7 @@ template<> QSGNode* QskLevelingSensorSkinlet::updateSubNode< R::HorizonClip >( const QskLevelingSensor* const sensor, const quint8 nodeRole, QSGNode* const node ) const { + Q_UNUSED(nodeRole) const auto cX = center( sensor ).x(); const auto cY = center( sensor ).y(); const auto r1 = innerRadius( sensor ); diff --git a/src/controls/private/QskLevelingSensorUtility.h b/src/controls/private/QskLevelingSensorUtility.h index 3b4b89d5..bee11064 100644 --- a/src/controls/private/QskLevelingSensorUtility.h +++ b/src/controls/private/QskLevelingSensorUtility.h @@ -8,8 +8,7 @@ #include #include -inline Q_REQUIRED_RESULT QMatrix4x4 matrix_deg( float rZ = 0.0f, - float tX = 0.0f, float tY = 0.0f, float tZ = 0.0f ) +inline Q_REQUIRED_RESULT QMatrix4x4 matrix_deg( float rZ = 0.0f, float tX = 0.0f, float tY = 0.0f ) { QTransform transform; transform.translate( tX, tY );