#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

@@ -55,8 +55,8 @@ void RicAsciiExportWellLogPlotFeature::onActionTriggered( bool isChecked )
std::vector<RimWellLogPlot*> selectedWellLogPlots;
caf::SelectionManager::instance()->objectsByType( &selectedWellLogPlots );
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
"PLOT_ASCIIEXPORT_DIR" );
QString defaultDir =
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "PLOT_ASCIIEXPORT_DIR" );
caf::ProgressInfo pi( selectedWellLogPlots.size(), QString( "Exporting plot data to ASCII" ) );
size_t progress = 0;
@@ -128,8 +128,7 @@ QString RicAsciiExportWellLogPlotFeature::makeValidExportFileName( const RimWell
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicAsciiExportWellLogPlotFeature::exportAsciiForWellLogPlot( const QString& fileName,
const RimWellLogPlot* wellLogPlot )
bool RicAsciiExportWellLogPlotFeature::exportAsciiForWellLogPlot( const QString& fileName, const RimWellLogPlot* wellLogPlot )
{
QFile file( fileName );
if ( !file.open( QIODevice::WriteOnly | QIODevice::Text ) )

View File

@@ -76,9 +76,8 @@ RimWellBoreStabilityPlot*
{
caf::ProgressInfo progInfo( 100, "Creating Well Bore Stability Plot" );
RimWellBoreStabilityPlot* plot = RicNewWellLogPlotFeatureImpl::createWellBoreStabilityPlot( false,
"Well Bore Stability",
parameters );
RimWellBoreStabilityPlot* plot =
RicNewWellLogPlotFeatureImpl::createWellBoreStabilityPlot( false, "Well Bore Stability", parameters );
{
auto task = progInfo.task( "Creating formation track", 2 );
@@ -180,8 +179,8 @@ void RicNewWellBoreStabilityPlotFeature::onActionTriggered( bool isChecked )
if ( !wellPath->wellPathGeometry() )
{
RiaLogging::error( QString( "The well path %1 has no geometry. Cannot create a Well Bore Stability Plot" )
.arg( wellPath->name() ) );
RiaLogging::error(
QString( "The well path %1 has no geometry. Cannot create a Well Bore Stability Plot" ).arg( wellPath->name() ) );
return;
}
if ( wellPath->wellPathGeometry()->rkbDiff() == HUGE_VAL )
@@ -250,9 +249,8 @@ void RicNewWellBoreStabilityPlotFeature::createParametersTrack( RimWellBoreStabi
RimGeoMechCase* geoMechCase,
int timeStep )
{
RimWellLogTrack* paramCurvesTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false,
"WBS Parameters",
plot );
RimWellLogTrack* paramCurvesTrack =
RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "WBS Parameters", plot );
paramCurvesTrack->setColSpan( RimPlot::THREE );
paramCurvesTrack->setVisibleXRange( 0.0, 1.0 );
paramCurvesTrack->setAutoScaleXEnabled( true );
@@ -274,14 +272,8 @@ void RicNewWellBoreStabilityPlotFeature::createParametersTrack( RimWellBoreStabi
for ( const RigWbsParameter& param : parameters )
{
RigFemResultAddress resAddr( RIG_WELLPATH_DERIVED, param.name().toStdString(), "" );
RimWellLogExtractionCurve* curve = RicWellLogTools::addWellLogExtractionCurve( paramCurvesTrack,
geoMechCase,
nullptr,
wellPath,
nullptr,
-1,
false,
false );
RimWellLogExtractionCurve* curve =
RicWellLogTools::addWellLogExtractionCurve( paramCurvesTrack, geoMechCase, nullptr, wellPath, nullptr, -1, false, false );
curve->setGeoMechResultAddress( resAddr );
curve->setCurrentTimeStep( timeStep );
curve->setColor( colors.cycledColor3f( i ) );
@@ -356,9 +348,8 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack( RimWellBore
{
if ( measurement->wellName() == wellPath->name() && measurement->kind() == wbsMeasurementKind )
{
RimWellMeasurementCurve* curve = RicWellLogTools::addWellMeasurementCurve( stabilityCurvesTrack,
wellPath,
wbsMeasurementKind );
RimWellMeasurementCurve* curve =
RicWellLogTools::addWellMeasurementCurve( stabilityCurvesTrack, wellPath, wbsMeasurementKind );
curve->loadDataAndUpdate( false );
break; // Only one per measurement kind
}
@@ -376,9 +367,8 @@ void RicNewWellBoreStabilityPlotFeature::createAnglesTrack( RimWellBoreStability
RimGeoMechCase* geoMechCase,
int timeStep )
{
RimWellLogTrack* wellPathAnglesTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false,
"Well Path Angles",
plot );
RimWellLogTrack* wellPathAnglesTrack =
RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, "Well Path Angles", plot );
double minValue = 360.0, maxValue = 0.0;
const double angleIncrement = 90.0;
std::vector<QString> resultNames = RiaDefines::wbsAngleResultNames();

View File

@@ -56,8 +56,6 @@ private:
RimWellPath* wellPath,
RimGeoMechCase* geoMechCase,
int timeStep );
static void createAnglesTrack( RimWellBoreStabilityPlot* plot,
RimWellPath* wellPath,
RimGeoMechCase* geoMechCase,
int timeStep );
static void
createAnglesTrack( RimWellBoreStabilityPlot* plot, RimWellPath* wellPath, RimGeoMechCase* geoMechCase, int timeStep );
};

View File

@@ -93,9 +93,8 @@ void RicNewWellLogCurveExtractionFeature::onActionTriggered( bool isChecked )
if ( wellPath || simWell )
{
RimWellLogTrack* newWellLogPlotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( true,
"",
wellLogPlot );
RimWellLogTrack* newWellLogPlotTrack =
RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( true, "", wellLogPlot );
if ( wellPath )
{
newWellLogPlotTrack->setFormationWellPath( wellPath );

View File

@@ -42,8 +42,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellLogPlotTrackFeature, "RicNewWellLogPlotTrackFeatu
//--------------------------------------------------------------------------------------------------
bool RicNewWellLogPlotTrackFeature::isCommandEnabled()
{
if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ||
RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() )
if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() || RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() )
{
return false;
}

View File

@@ -45,8 +45,8 @@ bool RicPasteWellLogCurveFeature::isCommandEnabled()
if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ) return false;
if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false;
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
caf::SelectionManager::instance()->selectedItem() );
caf::PdmObjectHandle* destinationObject =
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
if ( !destinationObject ) return false;
RimWellLogTrack* wellLogTrack = nullptr;
@@ -80,8 +80,8 @@ void RicPasteWellLogCurveFeature::onActionTriggered( bool isChecked )
{
if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ) return;
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
caf::SelectionManager::instance()->selectedItem() );
caf::PdmObjectHandle* destinationObject =
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
if ( !destinationObject ) return;
RimWellLogTrack* wellLogTrack = nullptr;

View File

@@ -38,8 +38,8 @@ CAF_CMD_SOURCE_INIT( RicPasteWellLogPlotFeature, "RicPasteWellLogPlotFeature" );
//--------------------------------------------------------------------------------------------------
bool RicPasteWellLogPlotFeature::isCommandEnabled()
{
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
caf::SelectionManager::instance()->selectedItem() );
caf::PdmObjectHandle* destinationObject =
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
if ( !destinationObject ) return false;
RimWellLogPlotCollection* wellLogPlotCollection = nullptr;
@@ -57,8 +57,8 @@ bool RicPasteWellLogPlotFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicPasteWellLogPlotFeature::onActionTriggered( bool isChecked )
{
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
caf::SelectionManager::instance()->selectedItem() );
caf::PdmObjectHandle* destinationObject =
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
if ( !destinationObject ) return;
RimWellLogPlotCollection* wellLogPlotCollection = nullptr;

View File

@@ -42,8 +42,8 @@ bool RicPasteWellLogTrackFeature::isCommandEnabled()
{
if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ) return false;
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
caf::SelectionManager::instance()->selectedItem() );
caf::PdmObjectHandle* destinationObject =
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
if ( !destinationObject ) return false;
RimWellLogPlot* wellLogPlot = nullptr;

View File

@@ -86,8 +86,8 @@ std::vector<RimWellLogCurve*> RicWellLogPlotCurveFeatureImpl::selectedWellLogCur
//--------------------------------------------------------------------------------------------------
RimWellAllocationPlot* RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()
{
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
caf::SelectionManager::instance()->selectedItem() );
caf::PdmObjectHandle* destinationObject =
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
if ( !destinationObject ) return nullptr;
RimWellAllocationPlot* wellAllocationPlot = nullptr;
@@ -101,8 +101,8 @@ RimWellAllocationPlot* RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot(
//--------------------------------------------------------------------------------------------------
RimWellRftPlot* RicWellLogPlotCurveFeatureImpl::parentWellRftPlot()
{
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
caf::SelectionManager::instance()->selectedItem() );
caf::PdmObjectHandle* destinationObject =
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
if ( !destinationObject ) return nullptr;
RimWellRftPlot* wellRftPlot = nullptr;
@@ -116,8 +116,8 @@ RimWellRftPlot* RicWellLogPlotCurveFeatureImpl::parentWellRftPlot()
//--------------------------------------------------------------------------------------------------
RimWellBoreStabilityPlot* RicWellLogPlotCurveFeatureImpl::parentWellBoreStabilityPlot()
{
caf::PdmObjectHandle* destinationObject = dynamic_cast<caf::PdmObjectHandle*>(
caf::SelectionManager::instance()->selectedItem() );
caf::PdmObjectHandle* destinationObject =
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
if ( !destinationObject ) return nullptr;
RimWellBoreStabilityPlot* wbsPlot = nullptr;