Skip to content

Commit

Permalink
Fix some logical-not-parentheses warnings thrown by clang 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Apr 5, 2014
1 parent 8bd80f4 commit 3a43380
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/composer/qgsatlascompositionwidget.cpp
Expand Up @@ -175,7 +175,7 @@ void QgsAtlasCompositionWidget::on_mAtlasSortFeatureCheckBox_stateChanged( int s
void QgsAtlasCompositionWidget::updateAtlasFeatures() void QgsAtlasCompositionWidget::updateAtlasFeatures()
{ {
//only do this if composer mode is preview //only do this if composer mode is preview
if ( !mComposition->atlasMode() == QgsComposition::PreviewAtlas ) if ( !( mComposition->atlasMode() == QgsComposition::PreviewAtlas ) )
{ {
return; return;
} }
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposer.cpp
Expand Up @@ -3114,7 +3114,7 @@ void QgsComposer::setAtlasFeature( QgsMapLayer* layer, QgsFeature * feat )


//check if composition has atlas preview //check if composition has atlas preview
QgsAtlasComposition& atlas = mComposition->atlasComposition(); QgsAtlasComposition& atlas = mComposition->atlasComposition();
if ( ! atlas.enabled() || ! mComposition->atlasMode() == QgsComposition::PreviewAtlas || atlas.coverageLayer() != layer ) if ( ! atlas.enabled() || !( mComposition->atlasMode() == QgsComposition::PreviewAtlas ) || atlas.coverageLayer() != layer )
{ {
//either atlas preview isn't enabled, or layer doesn't match //either atlas preview isn't enabled, or layer doesn't match
return; return;
Expand Down
2 changes: 1 addition & 1 deletion src/astyle/ASBeautifier.cpp
Expand Up @@ -1032,7 +1032,7 @@ string ASBeautifier::beautify(const string &originalLine)
outBuffer.append(1, '*'); outBuffer.append(1, '*');
i++; i++;
size_t j = line.find_first_not_of(" \t"); size_t j = line.find_first_not_of(" \t");
if (!line.compare(j, 2, "/*") == 0) // does line start with comment? if (!(line.compare(j, 2, "/*") == 0)) // does line start with comment?
blockCommentNoIndent = true; // if no, cannot indent continuation lines blockCommentNoIndent = true; // if no, cannot indent continuation lines
continue; continue;
} }
Expand Down
2 changes: 1 addition & 1 deletion src/astyle/ASFormatter.cpp
Expand Up @@ -2212,7 +2212,7 @@ void ASFormatter::formatBrackets(BracketType bracketType)
else else
{ {
if (!isCharImmediatelyPostComment if (!isCharImmediatelyPostComment
&& !bracketFormatMode == NONE_MODE && !(bracketFormatMode == NONE_MODE)
&& !isImmediatelyPostEmptyBlock) && !isImmediatelyPostEmptyBlock)
isInLineBreak = false; isInLineBreak = false;


Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsnetworkreplyparser.cpp
Expand Up @@ -53,7 +53,7 @@ QgsNetworkReplyParser::QgsNetworkReplyParser( QNetworkReply *reply )


QRegExp re( ".*boundary=\"?([^\"]+)\"?\\s?", Qt::CaseInsensitive ); QRegExp re( ".*boundary=\"?([^\"]+)\"?\\s?", Qt::CaseInsensitive );


if ( !re.indexIn( contentType ) == 0 ) if ( !( re.indexIn( contentType ) == 0 ) )
{ {
mError = tr( "Cannot find boundary in multipart content type" ); mError = tr( "Cannot find boundary in multipart content type" );
return; return;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology-ng/qgscptcitycolorrampv2dialog.cpp
Expand Up @@ -46,7 +46,7 @@ class TreeFilterProxyModel : public QSortFilterProxyModel
bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const
{ {
QgsCptCityDataItem* item = mModel->dataItem( mModel->index( sourceRow, 0, sourceParent ) ); QgsCptCityDataItem* item = mModel->dataItem( mModel->index( sourceRow, 0, sourceParent ) );
return ( item && ! item->type() == QgsCptCityDataItem::ColorRamp ); return ( item && !( item->type() == QgsCptCityDataItem::ColorRamp ) );
} }
// bool lessThan(const QModelIndex &left, const QModelIndex &right) const; // bool lessThan(const QModelIndex &left, const QModelIndex &right) const;


Expand Down

0 comments on commit 3a43380

Please sign in to comment.