Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10873 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jun 1, 2009
1 parent 731c1b8 commit 211fd89
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 31 deletions.
8 changes: 5 additions & 3 deletions src/core/composer/qgscomposeritem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ void QgsComposerItem::changeItemRectangle( const QPointF& currentPosition, const
break;

case QgsComposerItem::MoveItem:

{
//calculate total move difference
double moveX = currentPosition.x() - mouseMoveStartPos.x();
double moveY = currentPosition.y() - mouseMoveStartPos.y();
Expand All @@ -516,7 +516,10 @@ void QgsComposerItem::changeItemRectangle( const QPointF& currentPosition, const
originalItem->transform().dy() + moveRectY, \
originalItem->rect().width(), originalItem->rect().height() ) );
}
return;
}
return;
case QgsComposerItem::NoAction:
break;
}

if ( !changeComposerItem )
Expand Down Expand Up @@ -544,7 +547,6 @@ void QgsComposerItem::drawSelectionBoxes( QPainter* p )
if ( mComposition->plotStyle() == QgsComposition::Preview )
{
//size of symbol boxes depends on zoom level in composer view
double viewScaleFactor = horizontalViewScaleFactor();
double rectHandlerSize = rectHandlerBorderTolerance();
double sizeLockSymbol = lockSymbolSize();

Expand Down
30 changes: 16 additions & 14 deletions src/core/pal/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,20 +553,22 @@ namespace pal
std::cout << f->x[i] << ";" << f->y[i] << std::endl;
#endif

// Butterfly detector
//
// 3____0
// \ /
// \/ <--- not allowed
// /\
// 1/__\2
//
// 1____0
// \ /
// 2\/5 <--- allowed
// /\
// 3/__\4
//
/*
Butterfly detector
3____0
\ /
\/ <--- not allowed
/\
1/__\2
1____0
\ /
2\/5 <--- allowed
/\
3/__\4
*/

pt_a = -1;
pt_b = -1;
for ( i = 0;i < f->nbPoints - 2;i++ )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsoverlayobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CORE_EXPORT QgsOverlayObject
@note: this function is deprecated. Please use geometry() and QgsGeometry::asGeos instead*/
GEOSGeometry* getGeosGeometry();
/**Feature geometry is released when object is destructed so this function is empty. This function is deprecated and does nothing*/
void releaseGeosGeometry( GEOSGeometry *the_geom ) {}
void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }

//getters
int width() const {return mWidth;}
Expand Down
1 change: 0 additions & 1 deletion src/gui/qgscomposerview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ void QgsComposerView::mouseMoveEvent( QMouseEvent* e )
else
{
QPointF scenePoint = mapToScene( e->pos() );
double newWidth, newHeight; //for rubber band

switch ( mCurrentTool )
{
Expand Down
1 change: 0 additions & 1 deletion src/plugins/diagram_overlay/qgsdiagramoverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ void QgsDiagramOverlay::drawOverlayObjects( QgsRenderContext& context ) const
if ( it.value() )
{
QList<QgsPoint> positionList = it.value()->positions();
const QgsCoordinateTransform* ct = context.coordinateTransform();

QList<QgsPoint>::const_iterator positionIt = positionList.constBegin();
for ( ; positionIt != positionList.constEnd(); ++positionIt )
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/grass/qtermwidget/Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,7 @@ void SessionGroup::setMasterStatus(Session* session , bool master)
bool wasMaster = _sessions[session];
_sessions[session] = master;

if ( !wasMaster && !master
|| wasMaster && master )
if ( wasMaster==master )
return;

QListIterator<Session*> iter(_sessions.keys());
Expand Down
16 changes: 8 additions & 8 deletions src/plugins/grass/qtermwidget/TerminalDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1771,10 +1771,10 @@ void TerminalDisplay::extendSelection( const QPoint& position )
int i;
int selClass;

bool left_not_right = ( here.y() < _iPntSelCorr.y() ||
here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
bool old_left_not_right = ( _pntSelCorr.y() < _iPntSelCorr.y() ||
_pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
bool left_not_right = here.y() < _iPntSelCorr.y() ||
( here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
bool old_left_not_right = _pntSelCorr.y() < _iPntSelCorr.y() ||
( _pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
swapping = left_not_right != old_left_not_right;

// Find left (left_not_right ? from here : from start)
Expand Down Expand Up @@ -1848,10 +1848,10 @@ void TerminalDisplay::extendSelection( const QPoint& position )
int i;
int selClass;

bool left_not_right = ( here.y() < _iPntSelCorr.y() ||
here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
bool old_left_not_right = ( _pntSelCorr.y() < _iPntSelCorr.y() ||
_pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
bool left_not_right = here.y() < _iPntSelCorr.y() ||
( here.y() == _iPntSelCorr.y() && here.x() < _iPntSelCorr.x() );
bool old_left_not_right = _pntSelCorr.y() < _iPntSelCorr.y() ||
( _pntSelCorr.y() == _iPntSelCorr.y() && _pntSelCorr.x() < _iPntSelCorr.x() );
swapping = left_not_right != old_left_not_right;

// Find left (left_not_right ? from here : from start)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/qtermwidget/Vt102Emulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ static void hexdump(int* s, int len)

void Vt102Emulation::scan_buffer_report()
{
if (ppos == 0 || ppos == 1 && (pbuf[0] & 0xff) >= 32) return;
if (ppos == 0 || (ppos == 1 && (pbuf[0] & 0xff) >= 32) ) return;
printf("token: "); hexdump(pbuf,ppos); printf("\n");
}

Expand Down

0 comments on commit 211fd89

Please sign in to comment.