mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update clang-format.yml (#10068)
* Update to clang-format-15 Removed two custom .clang-format files in subfolders of AppFwk * Fixes by clang-format
This commit is contained in:
@@ -914,7 +914,8 @@ void RimEnsembleWellLogCurveSet::updateStatisticsCurves( const std::vector<RimWe
|
||||
statisticsTypes.push_back( RimEnsembleWellLogStatistics::StatisticsType::MEAN );
|
||||
}
|
||||
|
||||
auto statisticsCurveSymbolFromStatistics = []( RimEnsembleWellLogStatistics::StatisticsType statisticsType ) {
|
||||
auto statisticsCurveSymbolFromStatistics = []( RimEnsembleWellLogStatistics::StatisticsType statisticsType )
|
||||
{
|
||||
if ( statisticsType == RimEnsembleWellLogStatistics::StatisticsType::P10 ) return RiuPlotCurveSymbol::SYMBOL_TRIANGLE;
|
||||
if ( statisticsType == RimEnsembleWellLogStatistics::StatisticsType::P90 ) return RiuPlotCurveSymbol::SYMBOL_DOWN_TRIANGLE;
|
||||
if ( statisticsType == RimEnsembleWellLogStatistics::StatisticsType::P50 ) return RiuPlotCurveSymbol::SYMBOL_DIAMOND;
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
static QList<caf::PdmOptionItemInfo> segmentTimeStepOptions( RifReaderRftInterface* readerRft, const QString& wellName );
|
||||
|
||||
static QList<caf::PdmOptionItemInfo>
|
||||
segmentResultNameOptions( RifReaderRftInterface* readerRft, const QString& wellName, const QDateTime& timeStep );
|
||||
segmentResultNameOptions( RifReaderRftInterface* readerRft, const QString& wellName, const QDateTime& timeStep );
|
||||
static QList<caf::PdmOptionItemInfo> segmentBranchIndexOptions( RifReaderRftInterface* readerRft,
|
||||
const QString& wellName,
|
||||
const QDateTime& timeStep,
|
||||
|
||||
@@ -752,7 +752,8 @@ void RimWellLogExtractionCurve::mapPropertyValuesFromReferenceWell( std::vector<
|
||||
}
|
||||
|
||||
// Only allow asymptotically increasing k-layers - break at first decreasing k-layer value
|
||||
auto createKLayerAndIndexMap = []( const std::vector<double>& indexKValues, int minLayerK, int maxLayerK ) {
|
||||
auto createKLayerAndIndexMap = []( const std::vector<double>& indexKValues, int minLayerK, int maxLayerK )
|
||||
{
|
||||
int prevKLayer = -1;
|
||||
std::map<int, std::vector<size_t>> kLayerAndIndexesMap = {};
|
||||
for ( size_t i = 0; i < indexKValues.size(); ++i )
|
||||
|
||||
@@ -165,7 +165,7 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
QString depthTitle = wellLogPlot->depthAxisTitle();
|
||||
errMsg = QString( "Display of %1 for LAS curves is not possible without %2 "
|
||||
"values in the LAS-file or a well path to derive them from." )
|
||||
"values in the LAS-file or a well path to derive them from." )
|
||||
.arg( depthTitle )
|
||||
.arg( depthTitle );
|
||||
}
|
||||
@@ -221,14 +221,16 @@ std::pair<std::vector<double>, std::vector<double>>
|
||||
{
|
||||
CAF_ASSERT( values.size() == kIndexValues.size() );
|
||||
|
||||
auto findFirstIndex = []( int kLayer, const std::vector<double>& vals ) {
|
||||
auto findFirstIndex = []( int kLayer, const std::vector<double>& vals )
|
||||
{
|
||||
for ( size_t i = 0; i < vals.size(); i++ )
|
||||
if ( kLayer == static_cast<int>( vals[i] ) ) return i;
|
||||
|
||||
return vals.size();
|
||||
};
|
||||
|
||||
auto findLastIndex = []( int kLayer, const std::vector<double>& vals ) {
|
||||
auto findLastIndex = []( int kLayer, const std::vector<double>& vals )
|
||||
{
|
||||
for ( int i = static_cast<int>( vals.size() ) - 1; i >= 0; i-- )
|
||||
if ( kLayer == static_cast<int>( vals[i] ) ) return static_cast<size_t>( i );
|
||||
|
||||
|
||||
@@ -667,7 +667,8 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
std::vector<double> errors = errorValues();
|
||||
std::vector<QString> perPointLabels;
|
||||
|
||||
auto anyValidValuesPresent = []( const std::vector<double>& values ) -> bool {
|
||||
auto anyValidValuesPresent = []( const std::vector<double>& values ) -> bool
|
||||
{
|
||||
for ( const auto& v : values )
|
||||
{
|
||||
if ( RiaStatisticsTools::isValidNumber<double>( v ) ) return true;
|
||||
|
||||
@@ -842,7 +842,8 @@ void RimWellLogTrack::updatePropertyValueAxisAndGridTickIntervals()
|
||||
|
||||
if ( m_propertyAxisMinAndMaxTicksOnly )
|
||||
{
|
||||
auto roundToDigits = []( double value, int numberOfDigits, bool useFloor ) {
|
||||
auto roundToDigits = []( double value, int numberOfDigits, bool useFloor )
|
||||
{
|
||||
if ( value == 0.0 ) return 0.0;
|
||||
|
||||
double factor = std::pow( 10.0, numberOfDigits - std::ceil( std::log10( std::fabs( value ) ) ) );
|
||||
@@ -1324,7 +1325,8 @@ void RimWellLogTrack::updateAxesVisibility( RiaDefines::Orientation orientation,
|
||||
{
|
||||
if ( !m_plotWidget ) return;
|
||||
|
||||
auto setAxisVisible = [this]( QwtAxis::Position axis, bool enable ) {
|
||||
auto setAxisVisible = [this]( QwtAxis::Position axis, bool enable )
|
||||
{
|
||||
auto plot = m_plotWidget->qwtPlot();
|
||||
if ( !plot ) return false;
|
||||
|
||||
@@ -3345,16 +3347,15 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
|
||||
std::stable_sort( allWellPathComponents.begin(),
|
||||
allWellPathComponents.end(),
|
||||
[&sortIndices]( const RimWellPathComponentInterface* lhs, const RimWellPathComponentInterface* rhs ) {
|
||||
return sortIndices.at( lhs->componentType() ) < sortIndices.at( rhs->componentType() );
|
||||
} );
|
||||
[&sortIndices]( const RimWellPathComponentInterface* lhs, const RimWellPathComponentInterface* rhs )
|
||||
{ return sortIndices.at( lhs->componentType() ) < sortIndices.at( rhs->componentType() ); } );
|
||||
|
||||
std::set<QString> completionsAssignedToLegend;
|
||||
for ( const RimWellPathComponentInterface* component : allWellPathComponents )
|
||||
{
|
||||
std::unique_ptr<RiuWellPathComponentPlotItem> plotItem( new RiuWellPathComponentPlotItem( wellPathAttributeSource(), component ) );
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathCompletionsInLegend() && !completionsAssignedToLegend.count( legendTitle );
|
||||
QString legendTitle = plotItem->legendTitle();
|
||||
bool contributeToLegend = m_wellPathCompletionsInLegend() && !completionsAssignedToLegend.count( legendTitle );
|
||||
plotItem->setContributeToLegend( contributeToLegend );
|
||||
m_wellPathAttributePlotObjects.push_back( std::move( plotItem ) );
|
||||
completionsAssignedToLegend.insert( legendTitle );
|
||||
|
||||
Reference in New Issue
Block a user