[Marble-commits] KDE/kdeedu/marble/src/plugins/render/positionmarker
Dennis Nienhüser
earthwings at gentoo.org
Mon Oct 11 23:35:53 CEST 2010
SVN commit 1184937 by nienhueser:
valgrind: Use of unitialized values.
M +4 -8 PositionMarker.cpp
--- trunk/KDE/kdeedu/marble/src/plugins/render/positionmarker/PositionMarker.cpp #1184936:1184937
@@ -111,10 +111,6 @@
// calculate the arrow shape, oriented by the heading
// and with constant size
QPointF unitVector = position - previousPosition;
- QPointF relativeLeft;
- QPointF relativeRight;
- QPointF relativeTip;
-
// check that some screen progress was made
if( unitVector.x() || unitVector.y() ) {
// magnitude should be >0
@@ -122,10 +118,9 @@
+ ( unitVector.y() * unitVector.y() ) );
unitVector = unitVector / magnitude;
QPointF unitVector2 = QPointF ( -unitVector.y(), unitVector.x() );
- relativeLeft = - ( unitVector * 9 ) + ( unitVector2 * 9 );
- relativeRight = - ( unitVector * 9 ) - ( unitVector2 * 9 );
- relativeTip = unitVector * 19.0 ;
- }
+ QPointF relativeLeft = - ( unitVector * 9 ) + ( unitVector2 * 9 );
+ QPointF relativeRight = - ( unitVector * 9 ) - ( unitVector2 * 9 );
+ QPointF relativeTip = unitVector * 19.0 ;
m_arrow.clear();
m_arrow << position
@@ -138,6 +133,7 @@
m_dirtyRegion += ( m_previousArrow.boundingRect().toRect() );
}
}
+}
bool PositionMarker::render( GeoPainter *painter,
ViewportParams *viewport,
More information about the Marble-commits
mailing list