From 1315d0dd830a679c31c5bf9840933fcb3c974e89 Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Thu, 29 Jan 2015 09:43:47 +0100 Subject: [PATCH] Use empty() to check for emptiness. --- .../VTKExtensions/Default/vtkPVLegacyGlyphFilter.cxx | 2 +- ParaViewCore/VTKExtensions/Default/vtkPhastaReader.cxx | 2 +- ParaViewCore/VTKExtensions/Default/vtkSciVizStatistics.cxx | 2 +- Plugins/SciberQuestToolKit/SciberQuest/GDAMetaData.cxx | 2 +- Plugins/SciberQuestToolKit/SciberQuest/vtkSQFTLE.cxx | 2 +- Plugins/SciberQuestToolKit/SciberQuest/vtkSQImageGhosts.cxx | 2 +- .../SciberQuest/vtkSQKernelConvolution.cxx | 6 +++--- .../SciberQuestToolKit/SciberQuest/vtkSQVortexFilter.cxx | 4 ++-- Utilities/TestDriver/vtkSMTestDriver.cxx | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ParaViewCore/VTKExtensions/Default/vtkPVLegacyGlyphFilter.cxx b/ParaViewCore/VTKExtensions/Default/vtkPVLegacyGlyphFilter.cxx index 836c1df0cde..613a231a037 100644 --- a/ParaViewCore/VTKExtensions/Default/vtkPVLegacyGlyphFilter.cxx +++ b/ParaViewCore/VTKExtensions/Default/vtkPVLegacyGlyphFilter.cxx @@ -487,7 +487,7 @@ void vtkPVLegacyGlyphFilter::CalculatePtsToGlyph(double PtsNotBlanked) this->BlockPointCounter = 0; this->BlockNumGlyphedPts = 0; - if( !this->KeepRandomPoints || !this->RandomPtsInDataset.size() || this->MaximumNumberOfPoints != this->MaximumNumberOfPointsOld ) + if( !this->KeepRandomPoints || this->RandomPtsInDataset.empty() || this->MaximumNumberOfPoints != this->MaximumNumberOfPointsOld ) { //Reset the random points vector this->RandomPtsInDataset.clear(); diff --git a/ParaViewCore/VTKExtensions/Default/vtkPhastaReader.cxx b/ParaViewCore/VTKExtensions/Default/vtkPhastaReader.cxx index 75696305d1c..b296129ef78 100644 --- a/ParaViewCore/VTKExtensions/Default/vtkPhastaReader.cxx +++ b/ParaViewCore/VTKExtensions/Default/vtkPhastaReader.cxx @@ -560,7 +560,7 @@ int vtkPhastaReader::RequestData(vtkInformation*, points->Delete(); } - if (!this->Internal->FieldInfoMap.size()) + if (this->Internal->FieldInfoMap.empty()) { vtkDataSetAttributes* field = output->GetPointData(); this->ReadFieldFile(this->FieldFileName, fvn, field, noOfNodes); diff --git a/ParaViewCore/VTKExtensions/Default/vtkSciVizStatistics.cxx b/ParaViewCore/VTKExtensions/Default/vtkSciVizStatistics.cxx index c6799af96de..63aff267c0f 100644 --- a/ParaViewCore/VTKExtensions/Default/vtkSciVizStatistics.cxx +++ b/ParaViewCore/VTKExtensions/Default/vtkSciVizStatistics.cxx @@ -221,7 +221,7 @@ int vtkSciVizStatistics::RequestData( return 1; } - if ( ! this->P->Buffer.size() ) + if ( this->P->Buffer.empty() ) { // Silently ignore empty requests. return 1; diff --git a/Plugins/SciberQuestToolKit/SciberQuest/GDAMetaData.cxx b/Plugins/SciberQuestToolKit/SciberQuest/GDAMetaData.cxx index c1f3972343b..f0a1e0ed4a1 100644 --- a/Plugins/SciberQuestToolKit/SciberQuest/GDAMetaData.cxx +++ b/Plugins/SciberQuestToolKit/SciberQuest/GDAMetaData.cxx @@ -356,7 +356,7 @@ int GDAMetaData::OpenDatasetForRead(const char *fileName) prefix+="_"; } GetSeriesIds(path,prefix.c_str(),this->TimeSteps); - if (!this->TimeSteps.size()) + if (this->TimeSteps.empty()) { sqErrorMacro(std::cerr, << " Error: Time series was not found in " << path << "." diff --git a/Plugins/SciberQuestToolKit/SciberQuest/vtkSQFTLE.cxx b/Plugins/SciberQuestToolKit/SciberQuest/vtkSQFTLE.cxx index 553a152012b..b3f41ead9c8 100644 --- a/Plugins/SciberQuestToolKit/SciberQuest/vtkSQFTLE.cxx +++ b/Plugins/SciberQuestToolKit/SciberQuest/vtkSQFTLE.cxx @@ -247,7 +247,7 @@ void vtkSQFTLE::ClearInputArrays() << "=====vtkSQFTLE::ClearInputArrays" << std::endl; #endif - if (this->InputArrays.size()) + if (!this->InputArrays.empty()) { this->InputArrays.clear(); this->Modified(); diff --git a/Plugins/SciberQuestToolKit/SciberQuest/vtkSQImageGhosts.cxx b/Plugins/SciberQuestToolKit/SciberQuest/vtkSQImageGhosts.cxx index 4273d979b8b..54ee53a03a7 100644 --- a/Plugins/SciberQuestToolKit/SciberQuest/vtkSQImageGhosts.cxx +++ b/Plugins/SciberQuestToolKit/SciberQuest/vtkSQImageGhosts.cxx @@ -157,7 +157,7 @@ void vtkSQImageGhosts::ClearArraysToCopy() pCerr() << "=====vtkSQImageGhosts::ClearArraysToCopy" << std::endl; #endif - if (this->ArraysToCopy.size()) + if (!this->ArraysToCopy.empty()) { this->ArraysToCopy.clear(); this->Modified(); diff --git a/Plugins/SciberQuestToolKit/SciberQuest/vtkSQKernelConvolution.cxx b/Plugins/SciberQuestToolKit/SciberQuest/vtkSQKernelConvolution.cxx index f477c0d3a6b..e5df9248fc9 100644 --- a/Plugins/SciberQuestToolKit/SciberQuest/vtkSQKernelConvolution.cxx +++ b/Plugins/SciberQuestToolKit/SciberQuest/vtkSQKernelConvolution.cxx @@ -396,7 +396,7 @@ void vtkSQKernelConvolution::ClearInputArrays() << "=====vtkSQKernelConvolution::ClearInputArrays" << std::endl; #endif - if (this->InputArrays.size()) + if (!this->InputArrays.empty()) { this->InputArrays.clear(); this->Modified(); @@ -425,7 +425,7 @@ void vtkSQKernelConvolution::ClearArraysToCopy() pCerr() << "=====vtkSQKernelConvolution::ClearArraysToCopy" << std::endl; #endif - if (this->ArraysToCopy.size()) + if (!this->ArraysToCopy.empty()) { this->ArraysToCopy.clear(); this->Modified(); @@ -1225,7 +1225,7 @@ int vtkSQKernelConvolution::RequestData( } // Deep copy the input - if (this->ArraysToCopy.size()) + if (!this->ArraysToCopy.empty()) { if (this->LogLevel || globalLogLevel) { diff --git a/Plugins/SciberQuestToolKit/SciberQuest/vtkSQVortexFilter.cxx b/Plugins/SciberQuestToolKit/SciberQuest/vtkSQVortexFilter.cxx index 5550934c04e..74d6c483d96 100644 --- a/Plugins/SciberQuestToolKit/SciberQuest/vtkSQVortexFilter.cxx +++ b/Plugins/SciberQuestToolKit/SciberQuest/vtkSQVortexFilter.cxx @@ -192,7 +192,7 @@ void vtkSQVortexFilter::ClearInputArrays() << "=====vtkSQVortexFilter::ClearInputArrays" << std::endl; #endif - if (this->InputArrays.size()) + if (!this->InputArrays.empty()) { this->InputArrays.clear(); this->Modified(); @@ -221,7 +221,7 @@ void vtkSQVortexFilter::ClearArraysToCopy() pCerr() << "=====vtkSQVortexFilter::ClearArraysToCopy" << std::endl; #endif - if (this->ArraysToCopy.size()) + if (!this->ArraysToCopy.empty()) { this->ArraysToCopy.clear(); this->Modified(); diff --git a/Utilities/TestDriver/vtkSMTestDriver.cxx b/Utilities/TestDriver/vtkSMTestDriver.cxx index 4194cca8779..076bc21afa0 100644 --- a/Utilities/TestDriver/vtkSMTestDriver.cxx +++ b/Utilities/TestDriver/vtkSMTestDriver.cxx @@ -390,7 +390,7 @@ vtkSMTestDriver::CreateCommandLine(std::vector& commandLine, } } - if(this->PVSSHFlags.size() && (type == SERVER || type == DATA_SERVER)) + if(!this->PVSSHFlags.empty() && (type == SERVER || type == DATA_SERVER)) { { // First add the ssh command: