mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#10649 ApplicationLibCode: Use collection.empty() instead of comparing with size
This commit is contained in:
@@ -426,7 +426,7 @@ void RigStatisticsDataCache::computeHistogramStatisticsIfNeeded( size_t timeStep
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigStatisticsDataCache::computeUniqueValuesIfNeeded()
|
||||
{
|
||||
if ( m_statsAllTimesteps.m_uniqueValues.size() == 0 )
|
||||
if ( m_statsAllTimesteps.m_uniqueValues.empty() )
|
||||
{
|
||||
std::set<int> setValues;
|
||||
m_statisticsCalculator->uniqueValues( 0, setValues ); // This is a Hack ! Only using first timestep. Ok for
|
||||
@@ -444,7 +444,7 @@ void RigStatisticsDataCache::computeUniqueValuesIfNeeded()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigStatisticsDataCache::computeUniqueValuesIfNeeded( size_t timeStepIndex )
|
||||
{
|
||||
if ( m_statsPrTs[timeStepIndex].m_uniqueValues.size() == 0 )
|
||||
if ( m_statsPrTs[timeStepIndex].m_uniqueValues.empty() )
|
||||
{
|
||||
std::set<int> setValues;
|
||||
m_statisticsCalculator->uniqueValues( timeStepIndex, setValues );
|
||||
|
||||
@@ -182,7 +182,7 @@ std::vector<double> RigStatisticsMath::calculateNearestRankPercentiles( const st
|
||||
std::sort( sortedValues.begin(), sortedValues.end() );
|
||||
|
||||
std::vector<double> percentiles( pValPositions.size(), HUGE_VAL );
|
||||
if ( sortedValues.size() )
|
||||
if ( !sortedValues.empty() )
|
||||
{
|
||||
for ( size_t i = 0; i < pValPositions.size(); ++i )
|
||||
{
|
||||
@@ -226,7 +226,7 @@ std::vector<double> RigStatisticsMath::calculateInterpolatedPercentiles( const s
|
||||
std::sort( sortedValues.begin(), sortedValues.end() );
|
||||
|
||||
std::vector<double> percentiles( pValPositions.size(), HUGE_VAL );
|
||||
if ( sortedValues.size() )
|
||||
if ( !sortedValues.empty() )
|
||||
{
|
||||
for ( size_t i = 0; i < pValPositions.size(); ++i )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user