#5101 clang-format: Adjusted penalties

Use lower absolute values to improve control of behavior
This commit is contained in:
Magne Sjaastad
2020-02-12 11:43:15 +01:00
parent 10f0abc9b5
commit c82df63e10
710 changed files with 3167 additions and 4721 deletions

View File

@@ -144,8 +144,8 @@ void RimPlotCellPropertyFilter::updateCellVisibilityFromFilter( size_t timeStepI
if ( !resDef->currentGridCellResults()->hasResultEntry( resDef->eclipseResultAddress() ) ) return;
const std::vector<double>& cellResultValues = cellResultsData->cellScalarResults( resDef->eclipseResultAddress(),
timeStepIndex );
const std::vector<double>& cellResultValues =
cellResultsData->cellScalarResults( resDef->eclipseResultAddress(), timeStepIndex );
if ( cellResultValues.empty() ) return;
const RigActiveCellInfo* actCellInfo = cellResultsData->activeCellInfo();

View File

@@ -921,8 +921,8 @@ void RimGridCrossPlot::updateAxisInQwt( RiaDefines::PlotAxis axisType )
if ( axisProperties->isLogarithmicScaleEnabled )
{
QwtLogScaleEngine* currentScaleEngine = dynamic_cast<QwtLogScaleEngine*>(
m_plotWidget->axisScaleEngine( axisProperties->qwtPlotAxisType() ) );
QwtLogScaleEngine* currentScaleEngine =
dynamic_cast<QwtLogScaleEngine*>( m_plotWidget->axisScaleEngine( axisProperties->qwtPlotAxisType() ) );
if ( !currentScaleEngine )
{
m_plotWidget->setAxisScaleEngine( axisProperties->qwtPlotAxisType(), new QwtLogScaleEngine );
@@ -950,8 +950,8 @@ void RimGridCrossPlot::updateAxisInQwt( RiaDefines::PlotAxis axisType )
}
else
{
QwtLinearScaleEngine* currentScaleEngine = dynamic_cast<QwtLinearScaleEngine*>(
m_plotWidget->axisScaleEngine( axisProperties->qwtPlotAxisType() ) );
QwtLinearScaleEngine* currentScaleEngine =
dynamic_cast<QwtLinearScaleEngine*>( m_plotWidget->axisScaleEngine( axisProperties->qwtPlotAxisType() ) );
if ( !currentScaleEngine )
{
m_plotWidget->setAxisScaleEngine( axisProperties->qwtPlotAxisType(), new QwtLinearScaleEngine );

View File

@@ -119,9 +119,7 @@ protected:
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void updateAxes() override;
void updatePlot();

View File

@@ -553,11 +553,10 @@ void RimGridCrossPlotDataSet::assignCurveDataGroups( const RigEclipseCrossPlotRe
for ( size_t i = 0; i < result.xValues.size(); ++i )
{
auto upperBoundIt = std::lower_bound( tickValues.begin(),
tickValues.end(),
result.groupValuesContinuous[i] );
int upperBoundIndex = static_cast<int>( upperBoundIt - tickValues.begin() );
int categoryNum = std::min( (int)tickValues.size() - 2, std::max( 0, upperBoundIndex - 1 ) );
auto upperBoundIt =
std::lower_bound( tickValues.begin(), tickValues.end(), result.groupValuesContinuous[i] );
int upperBoundIndex = static_cast<int>( upperBoundIt - tickValues.begin() );
int categoryNum = std::min( (int)tickValues.size() - 2, std::max( 0, upperBoundIndex - 1 ) );
m_groupedResults[categoryNum].xValues.push_back( result.xValues[i] );
m_groupedResults[categoryNum].yValues.push_back( result.yValues[i] );
if ( !result.groupValuesContinuous.empty() )
@@ -960,10 +959,7 @@ QList<caf::PdmOptionItemInfo>
}
else if ( fieldNeedingOptions == &m_grouping )
{
std::set<RigGridCrossPlotCurveGrouping> validOptions = {NO_GROUPING,
GROUP_BY_TIME,
GROUP_BY_FORMATION,
GROUP_BY_RESULT};
std::set<RigGridCrossPlotCurveGrouping> validOptions = {NO_GROUPING, GROUP_BY_TIME, GROUP_BY_FORMATION, GROUP_BY_RESULT};
if ( !hasMultipleTimeSteps() )
{
validOptions.erase( GROUP_BY_TIME );
@@ -1035,8 +1031,8 @@ void RimGridCrossPlotDataSet::updateLegendRange()
}
if ( !m_legendOverlayFrame )
{
m_legendOverlayFrame = new RiuDraggableOverlayFrame( parent->viewer()->canvas(),
parent->viewer()->overlayMargins() );
m_legendOverlayFrame =
new RiuDraggableOverlayFrame( parent->viewer()->canvas(), parent->viewer()->overlayMargins() );
}
m_legendOverlayFrame->setContentFrame( legendConfig()->makeLegendFrame() );
parent->viewer()->addOverlayFrame( m_legendOverlayFrame );
@@ -1335,8 +1331,7 @@ void RimGridCrossPlotDataSet::defineEditorAttribute( const caf::PdmFieldHandle*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotDataSet::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
QString uiConfigName /*= ""*/ )
void RimGridCrossPlotDataSet::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
{
if ( groupingEnabled() )
{

View File

@@ -152,9 +152,7 @@ protected:
std::map<int, cvf::UByteArray> calculateCellVisibility( RimEclipseCase* eclipseCase ) const;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,

View File

@@ -81,8 +81,8 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro
cvf::Color3f curveColor = RiaColorTables::summaryCurveBluePaletteColors().cycledColor3f( 0 );
curveSet->setCustomColor( curveColor );
RimPlotCellPropertyFilter* cellFilter = createEquilibriumRegionPropertyFilter( eclipseResultCase,
zeroBasedEquilRegionIndex );
RimPlotCellPropertyFilter* cellFilter =
createEquilibriumRegionPropertyFilter( eclipseResultCase, zeroBasedEquilRegionIndex );
curveSet->addCellFilter( cellFilter );
}
@@ -96,8 +96,8 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro
cvf::Color3f curveColor = RiaColorTables::summaryCurveRedPaletteColors().cycledColor3f( 0 );
curveSet->setCustomColor( curveColor );
RimPlotCellPropertyFilter* cellFilter = createEquilibriumRegionPropertyFilter( eclipseResultCase,
zeroBasedEquilRegionIndex );
RimPlotCellPropertyFilter* cellFilter =
createEquilibriumRegionPropertyFilter( eclipseResultCase, zeroBasedEquilRegionIndex );
curveSet->addCellFilter( cellFilter );
{
@@ -112,9 +112,8 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro
maxDepth = gasOilContactDepth;
RimPlotCellPropertyFilter* depthCellFilter = createDepthPropertyFilter( eclipseResultCase,
minDepth,
maxDepth );
RimPlotCellPropertyFilter* depthCellFilter =
createDepthPropertyFilter( eclipseResultCase, minDepth, maxDepth );
curveSet->addCellFilter( depthCellFilter );
}
@@ -160,9 +159,8 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion( RiaDefines::Poro
minDepth = gasOilContactDepth;
maxDepth = waterOilContactDepth;
RimPlotCellPropertyFilter* depthCellFilter = createDepthPropertyFilter( eclipseResultCase,
minDepth,
maxDepth );
RimPlotCellPropertyFilter* depthCellFilter =
createDepthPropertyFilter( eclipseResultCase, minDepth, maxDepth );
curveSet->addCellFilter( depthCellFilter );
}

View File

@@ -38,12 +38,7 @@ RimSaturationPressurePlotCollection::RimSaturationPressurePlotCollection()
{
CAF_PDM_InitObject( "Saturation Pressure Plots", ":/SummaryXPlotsLight16x16.png", "", "" );
CAF_PDM_InitFieldNoDefault( &m_saturationPressurePlots,
"SaturationPressurePlots",
"Saturation Pressure Plots",
"",
"",
"" );
CAF_PDM_InitFieldNoDefault( &m_saturationPressurePlots, "SaturationPressurePlots", "Saturation Pressure Plots", "", "", "" );
m_saturationPressurePlots.uiCapability()->setUiHidden( true );
}