#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

@@ -182,9 +182,7 @@ void RicfFieldReader<cvf::Color3f>::readFieldData( cvf::Color3f& fieldValue,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicfFieldWriter<cvf::Color3f>::writeFieldData( const cvf::Color3f& fieldValue,
QTextStream& outputStream,
bool quoteStrings )
void RicfFieldWriter<cvf::Color3f>::writeFieldData( const cvf::Color3f& fieldValue, QTextStream& outputStream, bool quoteStrings )
{
QColor qColor = RiaColorTools::toQColor( fieldValue );
QString fieldStringValue = qColor.name();

View File

@@ -140,8 +140,7 @@ std::vector<RicfCommandObject*> RicfCommandFileReader::readCommands( QTextStream
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicfCommandFileReader::writeCommands( QTextStream& outputStream,
const std::vector<RicfCommandObject*>& commandsToWrite )
void RicfCommandFileReader::writeCommands( QTextStream& outputStream, const std::vector<RicfCommandObject*>& commandsToWrite )
{
for ( const auto& cmdObj : commandsToWrite )
{

View File

@@ -47,8 +47,7 @@ std::vector<RimWellPath*> RicfApplicationTools::wellPathsFromNames( const QStrin
for ( auto wellPath : allWellPaths )
{
auto matchedName = RiaWellNameComparer::tryMatchNameInList( wellPath->name(),
toStringVector( wellPathNames ) );
auto matchedName = RiaWellNameComparer::tryMatchNameInList( wellPath->name(), toStringVector( wellPathNames ) );
if ( !matchedName.isEmpty() )
{
wellPaths.push_back( wellPath );

View File

@@ -169,7 +169,8 @@ std::vector<RicfCommandObject*>
//
// The reason for this is based on two requirements
// 1. Ability to aggregate info from multiple replaceCase() statements in a command file
// 2. Improve performance, as a replace case is implemented by reading a project file from XML and replace file paths
// 2. Improve performance, as a replace case is implemented by reading a project file from XML and replace file
// paths
// during project loading
std::vector<RicfCommandObject*> executableCommands;

View File

@@ -117,9 +117,7 @@ RicfCommandResponse RicfCreateLgrForCompletions::execute()
m_timeStep,
lgrCellCounts,
m_splitType(),
{RigCompletionData::PERFORATION,
RigCompletionData::FRACTURE,
RigCompletionData::FISHBONES},
{RigCompletionData::PERFORATION, RigCompletionData::FRACTURE, RigCompletionData::FISHBONES},
&wellsIntersectingOtherLgrs );
feature->updateViews( eclipseCase );

View File

@@ -96,8 +96,8 @@ RicfCommandResponse RicfCreateMultipleFractures::execute()
wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound );
if ( !wellsNotFound.empty() )
{
QString error = QString( "createMultipleFractures: These well paths were not found: %1" )
.arg( wellsNotFound.join( ", " ) );
QString error =
QString( "createMultipleFractures: These well paths were not found: %1" ).arg( wellsNotFound.join( ", " ) );
RiaLogging::error( error );
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
}
@@ -112,7 +112,8 @@ RicfCommandResponse RicfCreateMultipleFractures::execute()
if ( !fractureTemplate )
{
QString error = QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( m_templateId );
QString error =
QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( m_templateId );
RiaLogging::error( error );
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
}
@@ -187,7 +188,6 @@ RimFractureTemplate* RicfCreateMultipleFractures::fractureTemplateFromId( int te
if ( t->id() == templateId ) return t;
}
RiaLogging::error(
QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( templateId ) );
RiaLogging::error( QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( templateId ) );
return nullptr;
}

View File

@@ -96,11 +96,9 @@ RicfCommandResponse RicfCreateWellBoreStabilityPlotFeature::execute()
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
}
RimWellBoreStabilityPlot* wbsPlot = RicNewWellBoreStabilityPlotFeature::createPlot( chosenCase,
chosenWellPath,
m_timeStep(),
m_wbsParameters() );
RicfCommandResponse response;
RimWellBoreStabilityPlot* wbsPlot =
RicNewWellBoreStabilityPlotFeature::createPlot( chosenCase, chosenWellPath, m_timeStep(), m_wbsParameters() );
RicfCommandResponse response;
response.setResult( new RicfCreateWbsPlotResult( wbsPlot->id() ) );
return response;
}

View File

@@ -109,9 +109,7 @@ RicfCommandResponse RicfExportLgrForCompletions::execute()
m_timeStep,
lgrCellCounts,
m_splitType(),
{RigCompletionData::PERFORATION,
RigCompletionData::FRACTURE,
RigCompletionData::FISHBONES},
{RigCompletionData::PERFORATION, RigCompletionData::FRACTURE, RigCompletionData::FISHBONES},
&wellsIntersectingOtherLgrs );
RicfCommandResponse response;

View File

@@ -128,11 +128,11 @@ RicfCommandResponse RicfExportPropertyInViews::execute()
if ( resultAccessor.isNull() )
{
QString warning = QString(
"exportProperty: Could not find property. Case ID %1, time step %2, property '%3'" )
.arg( m_caseId )
.arg( view->currentTimeStep() )
.arg( propertyName );
QString warning =
QString( "exportProperty: Could not find property. Case ID %1, time step %2, property '%3'" )
.arg( m_caseId )
.arg( view->currentTimeStep() )
.arg( propertyName );
RiaLogging::warning( warning );
response.updateStatus( RicfCommandResponse::COMMAND_WARNING, warning );
continue;

View File

@@ -102,12 +102,11 @@ RicfCommandResponse RicfExportSimWellFractureCompletions::execute()
}
if ( views.empty() )
{
QString error =
QString(
"exportSimWellCompletions: Could not find any views with id %1 or named \"%2\" in the case with ID %3" )
.arg( m_viewId )
.arg( m_viewName )
.arg( m_caseId() );
QString error = QString( "exportSimWellCompletions: Could not find any views with id %1 or named \"%2\" in the "
"case with ID %3" )
.arg( m_viewId )
.arg( m_viewName )
.arg( m_caseId() );
RiaLogging::error( error );
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
}

View File

@@ -83,8 +83,8 @@ RicfCommandResponse RicfExportSnapshots::execute()
mainWnd->hideAllDockWidgets();
RiaGuiApplication::instance()->processEvents();
QString absolutePathToSnapshotDir = RicfCommandFileExecutor::instance()->getExportPath(
RicfCommandFileExecutor::SNAPSHOTS );
QString absolutePathToSnapshotDir =
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::SNAPSHOTS );
if ( !m_exportFolder().isEmpty() )
{
@@ -92,8 +92,8 @@ RicfCommandResponse RicfExportSnapshots::execute()
}
if ( absolutePathToSnapshotDir.isNull() )
{
absolutePathToSnapshotDir = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath(
"snapshots" );
absolutePathToSnapshotDir =
RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
}
if ( m_type == RicfExportSnapshots::VIEWS || m_type == RicfExportSnapshots::ALL )
{

View File

@@ -75,13 +75,7 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
"" );
RICF_InitField( &m_performTransScaling, "performTransScaling", false, "Perform Transmissibility Scaling", "", "", "" );
RICF_InitField( &m_transScalingTimeStep,
"transScalingTimeStep",
0,
"Transmissibility Scaling Pressure Time Step",
"",
"",
"" );
RICF_InitField( &m_transScalingTimeStep, "transScalingTimeStep", 0, "Transmissibility Scaling Pressure Time Step", "", "", "" );
RICF_InitField( &m_transScalingInitialWBHP,
"transScalingWBHPFromSummary",
RicExportCompletionDataSettingsUi::TransScalingWBHPSource(),
@@ -89,13 +83,7 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
"",
"",
"" );
RICF_InitField( &m_transScalingWBHP,
"transScalingWBHP",
200.0,
"Transmissibility Scaling Constant WBHP Value",
"",
"",
"" );
RICF_InitField( &m_transScalingWBHP, "transScalingWBHP", 200.0, "Transmissibility Scaling Constant WBHP Value", "", "", "" );
}
//--------------------------------------------------------------------------------------------------
@@ -168,8 +156,8 @@ RicfCommandResponse RicfExportWellPathCompletions::execute()
{
for ( const QString& wellPathName : m_wellPathNames() )
{
RimWellPath* wellPath = RiaApplication::instance()->project()->activeOilField()->wellPathCollection->wellPathByName(
wellPathName );
RimWellPath* wellPath =
RiaApplication::instance()->project()->activeOilField()->wellPathCollection->wellPathByName( wellPathName );
if ( wellPath )
{
wellPaths.push_back( wellPath );

View File

@@ -71,11 +71,10 @@ RicfCommandResponse RicfRunOctaveScript::execute()
}
else
{
ok = RiaApplication::instance()
->launchProcessForMultipleCases( octavePath,
processArguments,
caseIds,
RiaApplication::instance()->octaveProcessEnvironment() );
ok = RiaApplication::instance()->launchProcessForMultipleCases( octavePath,
processArguments,
caseIds,
RiaApplication::instance()->octaveProcessEnvironment() );
}
RicfCommandResponse response;

View File

@@ -67,9 +67,8 @@ RicfCommandResponse RicfScaleFractureTemplate::execute()
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
}
RimFractureTemplateCollection* templColl = !project->allFractureTemplateCollections().empty()
? project->allFractureTemplateCollections()[0]
: nullptr;
RimFractureTemplateCollection* templColl =
!project->allFractureTemplateCollections().empty() ? project->allFractureTemplateCollections()[0] : nullptr;
RimFractureTemplate* templ = templColl ? templColl->fractureTemplate( m_id ) : nullptr;
if ( !templ )

View File

@@ -59,9 +59,8 @@ RicfCommandResponse RicfSetFractureContainment::execute()
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
}
RimFractureTemplateCollection* templColl = !project->allFractureTemplateCollections().empty()
? project->allFractureTemplateCollections()[0]
: nullptr;
RimFractureTemplateCollection* templColl =
!project->allFractureTemplateCollections().empty() ? project->allFractureTemplateCollections()[0] : nullptr;
RimFractureTemplate* templ = templColl ? templColl->fractureTemplate( m_id ) : nullptr;
if ( !templ )