Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit e4136438 authored by Bernhard Beschow's avatar Bernhard Beschow

simplify

parent d65bff0d
......@@ -358,11 +358,8 @@ void ClipPainterPrivate::labelPosition(const QPolygonF & polygon, QVector<QPoint
if ( labelPositionFlags.testFlag( LineCenter ) ) {
// The Label at the center of the polyline:
int labelPosition = static_cast<int>( polygon.size() / 2.0 );
if ( polygon.size() > 0 ) {
if ( labelPosition >= polygon.size() ) {
labelPosition = polygon.size() - 1;
}
const int labelPosition = polygon.size() / 2; // implied: 0 <= labelPosition < polygon.size()
labelNodes << polygon.at( labelPosition );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment