clang-format : Added extension .inl

Applied clang-format on all files in ApplicationCode including new extension .inl. Also includes some missing clang-format on other files.
This commit is contained in:
Magne Sjaastad
2019-11-19 11:08:59 +01:00
parent ae9575feb2
commit 651c28dc49
8 changed files with 602 additions and 563 deletions

View File

@@ -21,20 +21,20 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
template<class T>
template <class T>
RiaWeightedMeanCalculator<T>::RiaWeightedMeanCalculator()
: m_aggregatedValue(T{})
, m_aggregatedWeight(0.0)
: m_aggregatedValue( T{} )
, m_aggregatedWeight( 0.0 )
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
template<class T>
void RiaWeightedMeanCalculator<T>::addValueAndWeight(T value, double weight)
template <class T>
void RiaWeightedMeanCalculator<T>::addValueAndWeight( T value, double weight )
{
CVF_ASSERT(weight >= 0.0);
CVF_ASSERT( weight >= 0.0 );
m_aggregatedValue = m_aggregatedValue + value * weight;
m_aggregatedWeight += weight;
@@ -43,14 +43,14 @@ void RiaWeightedMeanCalculator<T>::addValueAndWeight(T value, double weight)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
template<class T>
template <class T>
T RiaWeightedMeanCalculator<T>::weightedMean() const
{
bool validWeights = validAggregatedWeight();
CVF_TIGHT_ASSERT(validWeights);
if (validWeights)
CVF_TIGHT_ASSERT( validWeights );
if ( validWeights )
{
return m_aggregatedValue * (1.0 / m_aggregatedWeight);
return m_aggregatedValue * ( 1.0 / m_aggregatedWeight );
}
return T{};
}
@@ -58,17 +58,16 @@ T RiaWeightedMeanCalculator<T>::weightedMean() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
template<class T>
template <class T>
double RiaWeightedMeanCalculator<T>::aggregatedWeight() const
{
return m_aggregatedWeight;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
template<class T>
template <class T>
bool RiaWeightedMeanCalculator<T>::validAggregatedWeight() const
{
return m_aggregatedWeight > 1.0e-12;

View File

@@ -49,7 +49,7 @@ void RiaPolyArcLineSampler::sampledPointsAndMDs( double sample
CVF_ASSERT( sampleInterval > 0.0 );
m_maxSamplingsInterval = sampleInterval;
m_isResamplingLines = isResamplingLines;
m_isResamplingLines = isResamplingLines;
double startMD = 0.0;
points->clear();
@@ -160,7 +160,7 @@ void RiaPolyArcLineSampler::sampleArc( cvf::Vec3d t1, cvf::Vec3d p1, cvf::Vec3d
double angleInc = m_maxSamplingsInterval / radius;
angleInc = angleInc < m_maxSamplingArcAngle ? angleInc: m_maxSamplingArcAngle; // Angle from 6 deg dogleg on 10 m
angleInc = angleInc < m_maxSamplingArcAngle ? angleInc : m_maxSamplingArcAngle; // Angle from 6 deg dogleg on 10 m
cvf::Vec3d C = CS_rad.center();
cvf::Vec3d N = CS_rad.normal();

View File

@@ -42,10 +42,10 @@ private:
std::vector<cvf::Vec3d>* m_points; // Internal temporary pointers to collections beeing filled.
std::vector<double>* m_meshDs;
double m_maxSamplingsInterval;
const double m_maxSamplingArcAngle = 0.07310818;// Angle from 6 deg dogleg on 10 m
bool m_isResamplingLines;
double m_totalMD;
double m_maxSamplingsInterval;
const double m_maxSamplingArcAngle = 0.07310818; // Angle from 6 deg dogleg on 10 m
bool m_isResamplingLines;
double m_totalMD;
cvf::Vec3d m_startTangent;
std::vector<cvf::Vec3d> m_lineArcEndPoints;