#5101 clang-format: Allow short functions on a single line

Use AllowShortFunctionsOnASingleLine: InlineOnly
This commit is contained in:
Magne Sjaastad
2020-02-12 11:13:38 +01:00
parent ab9d46ee75
commit 10f0abc9b5
428 changed files with 1519 additions and 1990 deletions

View File

@@ -34,43 +34,16 @@ public:
typedef caf::AppEnum<RiaEclipseUnitTools::UnitSystem> UnitSystemType;
static double feetPerMeter()
{
return 3.2808399;
}
static double meterPerFeet()
{
return 0.3048000;
}
static double feetPerMeter() { return 3.2808399; }
static double meterPerFeet() { return 0.3048000; }
static double meterToFeet( double meter )
{
return meter * feetPerMeter();
}
static double feetToMeter( double feet )
{
return feet * meterPerFeet();
}
static double meterToInch( double meter )
{
return meter * feetPerMeter() * 12.0;
}
static double inchToMeter( double inch )
{
return ( inch / 12.0 ) * meterPerFeet();
}
static double inchToFeet( double inch )
{
return ( inch / 12.0 );
}
static double mmToMeter( double mm )
{
return mm / 1000.0;
}
static double meterToMm( double meter )
{
return 1000.0 * meter;
}
static double meterToFeet( double meter ) { return meter * feetPerMeter(); }
static double feetToMeter( double feet ) { return feet * meterPerFeet(); }
static double meterToInch( double meter ) { return meter * feetPerMeter() * 12.0; }
static double inchToMeter( double inch ) { return ( inch / 12.0 ) * meterPerFeet(); }
static double inchToFeet( double inch ) { return ( inch / 12.0 ); }
static double mmToMeter( double mm ) { return mm / 1000.0; }
static double meterToMm( double meter ) { return 1000.0 * meter; }
static double darcysConstant( UnitSystem unitSystem );

View File

@@ -35,7 +35,9 @@ RiaGitDiff::RiaGitDiff( const QString& pathToDiffTool )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaGitDiff::~RiaGitDiff() {}
RiaGitDiff::~RiaGitDiff()
{
}
//--------------------------------------------------------------------------------------------------
///

View File

@@ -28,7 +28,9 @@ RiaImageCompareReporter::RiaImageCompareReporter( void )
m_showInteractiveDiff = false;
}
RiaImageCompareReporter::~RiaImageCompareReporter( void ) {}
RiaImageCompareReporter::~RiaImageCompareReporter( void )
{
}
//--------------------------------------------------------------------------------------------------
///

View File

@@ -37,7 +37,9 @@ RiaImageFileCompare::RiaImageFileCompare( QString compareExecutable )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaImageFileCompare::~RiaImageFileCompare() {}
RiaImageFileCompare::~RiaImageFileCompare()
{
}
//--------------------------------------------------------------------------------------------------
///

View File

@@ -66,18 +66,9 @@ public:
else
incAziR[0] = acos( -vec[2] / incAziR[2] );
}
double inc() const
{
return incAziR[0];
}
double azi() const
{
return incAziR[1];
}
double r() const
{
return incAziR[2];
}
double inc() const { return incAziR[0]; }
double azi() const { return incAziR[1]; }
double r() const { return incAziR[2]; }
// Note that this is a double function, while the rest of the class is float.
// Todo: Convert class to a template to enable float and double versions of everything

View File

@@ -34,7 +34,9 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaProjectModifier::RiaProjectModifier() {}
RiaProjectModifier::RiaProjectModifier()
{
}
//--------------------------------------------------------------------------------------------------
///

View File

@@ -159,23 +159,11 @@ public:
{
}
int years() const
{
return m_years;
}
int months() const
{
return m_months;
}
int days() const
{
return m_days;
}
int years() const { return m_years; }
int months() const { return m_months; }
int days() const { return m_days; }
bool isEmpty()
{
return m_years == 0 && m_months == 0 && m_days;
}
bool isEmpty() { return m_years == 0 && m_months == 0 && m_days; }
private:
int m_years;

View File

@@ -88,7 +88,9 @@ RiaRegressionTest::RiaRegressionTest( void )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaRegressionTest::~RiaRegressionTest( void ) {}
RiaRegressionTest::~RiaRegressionTest( void )
{
}
//--------------------------------------------------------------------------------------------------
///

View File

@@ -29,7 +29,9 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaSummaryCurveAnalyzer::RiaSummaryCurveAnalyzer() {}
RiaSummaryCurveAnalyzer::RiaSummaryCurveAnalyzer()
{
}
//--------------------------------------------------------------------------------------------------
///

View File

@@ -34,7 +34,9 @@ RiaTextFileCompare::RiaTextFileCompare( const QString& pathToDiffTool )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaTextFileCompare::~RiaTextFileCompare() {}
RiaTextFileCompare::~RiaTextFileCompare()
{
}
//--------------------------------------------------------------------------------------------------
///

View File

@@ -44,7 +44,9 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiaTimeHistoryCurveResampler::RiaTimeHistoryCurveResampler() {}
RiaTimeHistoryCurveResampler::RiaTimeHistoryCurveResampler()
{
}
//--------------------------------------------------------------------------------------------------
///

View File

@@ -41,48 +41,18 @@ public:
FAILED_INPUT_OVERLAP
};
CurveStatus curveStatus() const
{
return m_curveStatus;
}
CurveStatus curveStatus() const { return m_curveStatus; }
cvf::Mat4d arcCS() const
{
return m_arcCS;
}
double radius() const
{
return m_radius;
}
double arcAngle() const
{
return m_arcAngle;
}
double arcLength() const
{
return m_arcLength;
}
cvf::Vec3d center() const
{
return m_arcCS.translation();
}
cvf::Vec3d normal() const
{
return cvf::Vec3d( m_arcCS.col( 2 ) );
}
cvf::Mat4d arcCS() const { return m_arcCS; }
double radius() const { return m_radius; }
double arcAngle() const { return m_arcAngle; }
double arcLength() const { return m_arcLength; }
cvf::Vec3d center() const { return m_arcCS.translation(); }
cvf::Vec3d normal() const { return cvf::Vec3d( m_arcCS.col( 2 ) ); }
double endAzimuth() const
{
return m_endAzi;
}
double endInclination() const
{
return m_endInc;
}
cvf::Vec3d endTangent() const
{
return m_endTangent;
}
double endAzimuth() const { return m_endAzi; }
double endInclination() const { return m_endInc; }
cvf::Vec3d endTangent() const { return m_endTangent; }
private:
CurveStatus m_curveStatus;

View File

@@ -42,37 +42,16 @@ public:
FAILED_RADIUS_TOO_LARGE
};
CurveStatus curveStatus() const
{
return m_curveStatus;
}
CurveStatus curveStatus() const { return m_curveStatus; }
cvf::Vec3d firstArcEndpoint() const
{
return m_firstArcEndpoint;
}
cvf::Vec3d firstArcEndpoint() const { return m_firstArcEndpoint; }
double radius() const
{
return m_radius;
}
cvf::Vec3d firstCenter() const
{
return m_c1;
}
cvf::Vec3d firstNormal() const
{
return m_n1;
}
double radius() const { return m_radius; }
cvf::Vec3d firstCenter() const { return m_c1; }
cvf::Vec3d firstNormal() const { return m_n1; }
double endAzimuth() const
{
return m_endAzi;
}
double endInclination() const
{
return m_endInc;
}
double endAzimuth() const { return m_endAzi; }
double endInclination() const { return m_endInc; }
private:
CurveStatus m_curveStatus;

View File

@@ -54,18 +54,9 @@ public:
double resultRadius2;
};
cvf::Vec3d startTangent() const
{
return m_startTangent;
}
const std::vector<cvf::Vec3d>& lineArcEndpoints() const
{
return m_lineArcEndpoints;
}
const std::vector<WellTargetStatus>& targetStatuses() const
{
return m_targetStatuses;
}
cvf::Vec3d startTangent() const { return m_startTangent; }
const std::vector<cvf::Vec3d>& lineArcEndpoints() const { return m_lineArcEndpoints; }
const std::vector<WellTargetStatus>& targetStatuses() const { return m_targetStatuses; }
private:
cvf::Vec3d m_startTangent;

View File

@@ -46,51 +46,18 @@ public:
FAILED_MAX_ITERATIONS_REACHED
};
bool isOk() const
{
return m_isCalculationOK;
}
CurveStatus curveStatus() const
{
return m_ctrlPpointCurveStatus;
}
SolveStatus solveStatus() const
{
return m_solveStatus;
}
bool isOk() const { return m_isCalculationOK; }
CurveStatus curveStatus() const { return m_ctrlPpointCurveStatus; }
SolveStatus solveStatus() const { return m_solveStatus; }
cvf::Vec3d firstArcEndpoint() const
{
return m_firstArcEndpoint;
}
cvf::Vec3d secondArcStartpoint() const
{
return m_secondArcStartpoint;
}
cvf::Vec3d firstCenter() const
{
return m_c1;
}
cvf::Vec3d secondCenter() const
{
return m_c2;
}
cvf::Vec3d firstNormal() const
{
return m_n1;
}
cvf::Vec3d secondNormal() const
{
return m_n2;
}
double firstRadius() const
{
return m_r1;
}
double secondRadius() const
{
return m_r2;
}
cvf::Vec3d firstArcEndpoint() const { return m_firstArcEndpoint; }
cvf::Vec3d secondArcStartpoint() const { return m_secondArcStartpoint; }
cvf::Vec3d firstCenter() const { return m_c1; }
cvf::Vec3d secondCenter() const { return m_c2; }
cvf::Vec3d firstNormal() const { return m_n1; }
cvf::Vec3d secondNormal() const { return m_n2; }
double firstRadius() const { return m_r1; }
double secondRadius() const { return m_r2; }
void dump() const;

View File

@@ -41,10 +41,7 @@ public:
double turn;
};
const std::vector<WellPlanSegment>& wellPlan() const
{
return m_wpResult;
}
const std::vector<WellPlanSegment>& wellPlan() const { return m_wpResult; }
private:
void addSegment( cvf::Vec3d t1, cvf::Vec3d p1, cvf::Vec3d p2, cvf::Vec3d* endTangent );