Fix some logical-not-parentheses warnings thrown by clang 5.1

This commit is contained in:
Larry Shaffer 2014-04-04 18:36:59 -06:00
parent 8bd80f43c5
commit 3a43380ca7
6 changed files with 6 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -2212,7 +2212,7 @@ void ASFormatter::formatBrackets(BracketType bracketType)
else
{
if (!isCharImmediatelyPostComment
&& !bracketFormatMode == NONE_MODE
&& !(bracketFormatMode == NONE_MODE)
&& !isImmediatelyPostEmptyBlock)
isInLineBreak = false;

View File

@ -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;

View File

@ -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;