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
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void QgsAtlasCompositionWidget::on_mAtlasSortFeatureCheckBox_stateChanged( int s
void QgsAtlasCompositionWidget::updateAtlasFeatures()
{
//only do this if composer mode is preview
if ( !mComposition->atlasMode() == QgsComposition::PreviewAtlas )
if ( !( mComposition->atlasMode() == QgsComposition::PreviewAtlas ) )
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3114,7 +3114,7 @@ void QgsComposer::setAtlasFeature( QgsMapLayer* layer, QgsFeature * feat )

//check if composition has atlas preview
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
return;
Expand Down
2 changes: 1 addition & 1 deletion src/astyle/ASBeautifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ string ASBeautifier::beautify(const string &originalLine)
outBuffer.append(1, '*');
i++;
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
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/astyle/ASFormatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2212,7 +2212,7 @@ void ASFormatter::formatBrackets(BracketType bracketType)
else
{
if (!isCharImmediatelyPostComment
&& !bracketFormatMode == NONE_MODE
&& !(bracketFormatMode == NONE_MODE)
&& !isImmediatelyPostEmptyBlock)
isInLineBreak = false;

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

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" );
return;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology-ng/qgscptcitycolorrampv2dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class TreeFilterProxyModel : public QSortFilterProxyModel
bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const
{
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;

Expand Down

0 comments on commit 3a43380

Please sign in to comment.