mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 18:32:10 -05:00
#10649 ApplicationLibCode: Use collection.empty() instead of comparing with size
This commit is contained in:
1 parent
98796b0dd9
commit
959c9d48fa
220 files changed
+432
-431
No files matched your search
@@ -722,7 +722,7 @@ std::vector<RigFlowDiagSolverInterface::RelPermCurve> RigFlowDiagSolverInterface
|
||||
const RelPermCurve::Ident curveIdent = curveIdentNameArr[i].first;
|
||||
const std::string curveName = curveIdentNameArr[i].second;
|
||||
const Opm::FlowDiagnostics::Graph& srcGraph = graphArr[i];
|
||||
if ( srcGraph.first.size() > 0 )
|
||||
if ( !srcGraph.first.empty() )
|
||||
{
|
||||
const std::vector<double>& xVals = srcGraph.first;
|
||||
const std::vector<double>& yVals = srcGraph.second;
|
||||
@@ -771,7 +771,7 @@ std::vector<RigFlowDiagSolverInterface::PvtCurve> RigFlowDiagSolverInterface::ca
|
||||
pvtNum );
|
||||
for ( Opm::ECLPVT::PVTGraph srcGraph : graphArr )
|
||||
{
|
||||
if ( srcGraph.press.size() > 0 )
|
||||
if ( !srcGraph.press.empty() )
|
||||
{
|
||||
retCurveArr.push_back( { PvtCurve::Bo, PvtCurve::OIL, srcGraph.press, srcGraph.value, srcGraph.mixRat } );
|
||||
}
|
||||
@@ -786,7 +786,7 @@ std::vector<RigFlowDiagSolverInterface::PvtCurve> RigFlowDiagSolverInterface::ca
|
||||
pvtNum );
|
||||
for ( Opm::ECLPVT::PVTGraph srcGraph : graphArr )
|
||||
{
|
||||
if ( srcGraph.press.size() > 0 )
|
||||
if ( !srcGraph.press.empty() )
|
||||
{
|
||||
retCurveArr.push_back( { PvtCurve::Bg, PvtCurve::GAS, srcGraph.press, srcGraph.value, srcGraph.mixRat } );
|
||||
}
|
||||
@@ -804,7 +804,7 @@ std::vector<RigFlowDiagSolverInterface::PvtCurve> RigFlowDiagSolverInterface::ca
|
||||
pvtNum );
|
||||
for ( Opm::ECLPVT::PVTGraph srcGraph : graphArr )
|
||||
{
|
||||
if ( srcGraph.press.size() > 0 )
|
||||
if ( !srcGraph.press.empty() )
|
||||
{
|
||||
retCurveArr.push_back( { PvtCurve::Visc_o, PvtCurve::OIL, srcGraph.press, srcGraph.value, srcGraph.mixRat } );
|
||||
}
|
||||
@@ -819,7 +819,7 @@ std::vector<RigFlowDiagSolverInterface::PvtCurve> RigFlowDiagSolverInterface::ca
|
||||
pvtNum );
|
||||
for ( Opm::ECLPVT::PVTGraph srcGraph : graphArr )
|
||||
{
|
||||
if ( srcGraph.press.size() > 0 )
|
||||
if ( !srcGraph.press.empty() )
|
||||
{
|
||||
retCurveArr.push_back( { PvtCurve::Visc_g, PvtCurve::GAS, srcGraph.press, srcGraph.value, srcGraph.mixRat } );
|
||||
}
|
||||
@@ -867,7 +867,7 @@ bool RigFlowDiagSolverInterface::calculatePvtDynamicPropertiesFvf( int pvtNum, d
|
||||
pvtNum,
|
||||
phasePress,
|
||||
mixRatio );
|
||||
if ( valArr.size() > 0 )
|
||||
if ( !valArr.empty() )
|
||||
{
|
||||
*bo = valArr[0];
|
||||
}
|
||||
@@ -883,7 +883,7 @@ bool RigFlowDiagSolverInterface::calculatePvtDynamicPropertiesFvf( int pvtNum, d
|
||||
pvtNum,
|
||||
phasePress,
|
||||
mixRatio );
|
||||
if ( valArr.size() > 0 )
|
||||
if ( !valArr.empty() )
|
||||
{
|
||||
*bg = valArr[0];
|
||||
}
|
||||
@@ -929,7 +929,7 @@ bool RigFlowDiagSolverInterface::calculatePvtDynamicPropertiesViscosity( int pvt
|
||||
pvtNum,
|
||||
phasePress,
|
||||
mixRatio );
|
||||
if ( valArr.size() > 0 )
|
||||
if ( !valArr.empty() )
|
||||
{
|
||||
*mu_o = valArr[0];
|
||||
}
|
||||
@@ -945,7 +945,7 @@ bool RigFlowDiagSolverInterface::calculatePvtDynamicPropertiesViscosity( int pvt
|
||||
pvtNum,
|
||||
phasePress,
|
||||
mixRatio );
|
||||
if ( valArr.size() > 0 )
|
||||
if ( !valArr.empty() )
|
||||
{
|
||||
*mu_g = valArr[0];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user