Skip to content

Commit 3a43380

Browse files
committed
Fix some logical-not-parentheses warnings thrown by clang 5.1
1 parent 8bd80f4 commit 3a43380

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/app/composer/qgsatlascompositionwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void QgsAtlasCompositionWidget::on_mAtlasSortFeatureCheckBox_stateChanged( int s
175175
void QgsAtlasCompositionWidget::updateAtlasFeatures()
176176
{
177177
//only do this if composer mode is preview
178-
if ( !mComposition->atlasMode() == QgsComposition::PreviewAtlas )
178+
if ( !( mComposition->atlasMode() == QgsComposition::PreviewAtlas ) )
179179
{
180180
return;
181181
}

src/app/composer/qgscomposer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3114,7 +3114,7 @@ void QgsComposer::setAtlasFeature( QgsMapLayer* layer, QgsFeature * feat )
31143114

31153115
//check if composition has atlas preview
31163116
QgsAtlasComposition& atlas = mComposition->atlasComposition();
3117-
if ( ! atlas.enabled() || ! mComposition->atlasMode() == QgsComposition::PreviewAtlas || atlas.coverageLayer() != layer )
3117+
if ( ! atlas.enabled() || !( mComposition->atlasMode() == QgsComposition::PreviewAtlas ) || atlas.coverageLayer() != layer )
31183118
{
31193119
//either atlas preview isn't enabled, or layer doesn't match
31203120
return;

src/astyle/ASBeautifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ string ASBeautifier::beautify(const string &originalLine)
10321032
outBuffer.append(1, '*');
10331033
i++;
10341034
size_t j = line.find_first_not_of(" \t");
1035-
if (!line.compare(j, 2, "/*") == 0) // does line start with comment?
1035+
if (!(line.compare(j, 2, "/*") == 0)) // does line start with comment?
10361036
blockCommentNoIndent = true; // if no, cannot indent continuation lines
10371037
continue;
10381038
}

src/astyle/ASFormatter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2212,7 +2212,7 @@ void ASFormatter::formatBrackets(BracketType bracketType)
22122212
else
22132213
{
22142214
if (!isCharImmediatelyPostComment
2215-
&& !bracketFormatMode == NONE_MODE
2215+
&& !(bracketFormatMode == NONE_MODE)
22162216
&& !isImmediatelyPostEmptyBlock)
22172217
isInLineBreak = false;
22182218

src/core/qgsnetworkreplyparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ QgsNetworkReplyParser::QgsNetworkReplyParser( QNetworkReply *reply )
5353

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

56-
if ( !re.indexIn( contentType ) == 0 )
56+
if ( !( re.indexIn( contentType ) == 0 ) )
5757
{
5858
mError = tr( "Cannot find boundary in multipart content type" );
5959
return;

src/gui/symbology-ng/qgscptcitycolorrampv2dialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class TreeFilterProxyModel : public QSortFilterProxyModel
4646
bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const
4747
{
4848
QgsCptCityDataItem* item = mModel->dataItem( mModel->index( sourceRow, 0, sourceParent ) );
49-
return ( item && ! item->type() == QgsCptCityDataItem::ColorRamp );
49+
return ( item && !( item->type() == QgsCptCityDataItem::ColorRamp ) );
5050
}
5151
// bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
5252

0 commit comments

Comments
 (0)