using reference parameters

This commit is contained in:
Uwe Rathmann 2022-03-24 08:09:30 +01:00
parent 057866e7ff
commit 80a42f6d56
2 changed files with 5 additions and 5 deletions

View File

@ -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++ )

View File

@ -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