From 80a42f6d56e8f0a4d09b5ad0fe30f3d00bdfb991 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Thu, 24 Mar 2022 08:09:30 +0100 Subject: [PATCH] using reference parameters --- src/nodes/QskVertex.cpp | 6 +++--- src/nodes/QskVertex.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nodes/QskVertex.cpp b/src/nodes/QskVertex.cpp index ff741668..7916b3e0 100644 --- a/src/nodes/QskVertex.cpp +++ b/src/nodes/QskVertex.cpp @@ -22,7 +22,7 @@ QDebug operator<<( QDebug debug, Color color ) return debug; } -QDebug operator<<( QDebug debug, ColoredLine line ) +QDebug operator<<( QDebug debug, const ColoredLine& line ) { qDebug() << qRound( line.p1.x ) << qRound( line.p1.y ) << "->" << qRound( line.p2.x ) << qRound( line.p2.y ); @@ -30,7 +30,7 @@ QDebug operator<<( QDebug debug, ColoredLine line ) return debug; } -QDebug operator<<( QDebug debug, Line line ) +QDebug operator<<( QDebug debug, const Line& line ) { qDebug() << qRound( line.p1.x ) << qRound( line.p1.y ) << "->" << qRound( line.p2.x ) << qRound( line.p2.y ); @@ -41,7 +41,7 @@ QDebug operator<<( QDebug debug, Line line ) #endif template< class Line > -static inline void qskDebugGeometry( Line* lines, int count ) +static inline void qskDebugGeometry( const Line* lines, int count ) { #ifndef QT_NO_DEBUG_STREAM for ( int i = 0; i < count; i++ ) diff --git a/src/nodes/QskVertex.h b/src/nodes/QskVertex.h index f1874bbd..0700d0ae 100644 --- a/src/nodes/QskVertex.h +++ b/src/nodes/QskVertex.h @@ -170,8 +170,8 @@ namespace QskVertex #ifndef QT_NO_DEBUG_STREAM class QDebug; QDebug operator<<( QDebug debug, QskVertex::Color ); -QDebug operator<<( QDebug debug, QskVertex::ColoredLine ); -QDebug operator<<( QDebug debug, QskVertex::Line ); +QDebug operator<<( QDebug debug, const QskVertex::ColoredLine& ); +QDebug operator<<( QDebug debug, const QskVertex::Line& ); #endif #endif