#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

@@ -105,8 +105,8 @@ bool RicPointTangentManipulator::eventFilter( QObject* obj, QEvent* inputEvent )
if ( m_partManager->isManipulatorActive() )
{
m_isDraggingInComparisonView = m_viewer->isMousePosWithinComparisonView( mouseEvent->x(),
mouseEvent->y() );
m_isDraggingInComparisonView =
m_viewer->isMousePosWithinComparisonView( mouseEvent->x(), mouseEvent->y() );
emit notifySelected();

View File

@@ -415,8 +415,7 @@ cvf::ref<cvf::DrawableGeo>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo>
RicPointTangentManipulatorPartMgr::createTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray )
cvf::ref<cvf::DrawableGeo> RicPointTangentManipulatorPartMgr::createTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray )
{
using namespace cvf;
ref<DrawableGeo> geo = new DrawableGeo;

View File

@@ -83,10 +83,7 @@ private:
void addHandlePart( cvf::DrawableGeo* geo, const cvf::Color4f& color, HandleType handleId, const cvf::String& partName );
void addActiveModePart( cvf::DrawableGeo* geo,
const cvf::Color4f& color,
HandleType handleId,
const cvf::String& partName );
void addActiveModePart( cvf::DrawableGeo* geo, const cvf::Color4f& color, HandleType handleId, const cvf::String& partName );
static cvf::ref<cvf::DrawableGeo> createTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray );
static cvf::ref<cvf::DrawableGeo> createIndexedTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray,

View File

@@ -98,16 +98,16 @@ bool RicCreateWellTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEve
auto firstPickItem = eventObject.m_pickItemInfos.front();
auto wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>( firstPickItem.sourceInfo() );
auto intersectionPointInDomain = rimView->displayCoordTransform()->transformToDomainCoord(
firstPickItem.globalPickedPoint() );
auto intersectionPointInDomain =
rimView->displayCoordTransform()->transformToDomainCoord( firstPickItem.globalPickedPoint() );
bool doSetAzimuthAndInclination = false;
double azimuth = 0.0;
double inclination = 0.0;
if ( wellPathSourceInfo )
{
targetPointInDomain = wellPathSourceInfo->closestPointOnCenterLine( firstPickItem.faceIdx(),
intersectionPointInDomain );
targetPointInDomain =
wellPathSourceInfo->closestPointOnCenterLine( firstPickItem.faceIdx(), intersectionPointInDomain );
double md = wellPathSourceInfo->measuredDepth( firstPickItem.faceIdx(), intersectionPointInDomain );
doSetAzimuthAndInclination =
calculateAzimuthAndInclinationAtMd( md,
@@ -125,14 +125,12 @@ bool RicCreateWellTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEve
targetPointInDomain = intersectionPointInDomain;
doSetAzimuthAndInclination = false;
cvf::Vec3d domainRayOrigin = rimView->displayCoordTransform()->transformToDomainCoord(
firstPickItem.globalRayOrigin() );
cvf::Vec3d domainRayOrigin =
rimView->displayCoordTransform()->transformToDomainCoord( firstPickItem.globalRayOrigin() );
cvf::Vec3d domainRayEnd = targetPointInDomain + ( targetPointInDomain - domainRayOrigin );
cvf::Vec3d hexElementIntersection = findHexElementIntersection( rimView,
firstPickItem,
domainRayOrigin,
domainRayEnd );
cvf::Vec3d hexElementIntersection =
findHexElementIntersection( rimView, firstPickItem, domainRayOrigin, domainRayEnd );
CVF_TIGHT_ASSERT( !hexElementIntersection.isUndefined() );
if ( !hexElementIntersection.isUndefined() )
{
@@ -151,8 +149,8 @@ bool RicCreateWellTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEve
if ( wellPathSourceInfo )
{
double mdrkbAtFirstTarget = wellPathSourceInfo->measuredDepth( firstPickItem.faceIdx(),
intersectionPointInDomain );
double mdrkbAtFirstTarget =
wellPathSourceInfo->measuredDepth( firstPickItem.faceIdx(), intersectionPointInDomain );
RimModeledWellPath* modeledWellPath = dynamic_cast<RimModeledWellPath*>( wellPathSourceInfo->wellPath() );
if ( modeledWellPath )

View File

@@ -199,10 +199,8 @@ void RicImportWellPaths::onActionTriggered( bool isChecked )
QString nameList = QString( "Well Paths (%1);;All Files (*.*)" ).arg( wellPathNameFilters().join( " " ) );
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
"Import Well Paths",
defaultDir,
nameList );
QStringList wellPathFilePaths =
QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(), "Import Well Paths", defaultDir, nameList );
if ( wellPathFilePaths.size() >= 1 )
{

View File

@@ -59,8 +59,8 @@ bool RicIntersectionPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& e
cvf::ref<caf::DisplayCoordTransform> transForm = gridView->displayCoordTransform();
cvf::Vec3d domainCoord = transForm->transformToDomainCoord(
eventObject.m_pickItemInfos.front().globalPickedPoint() );
cvf::Vec3d domainCoord =
transForm->transformToDomainCoord( eventObject.m_pickItemInfos.front().globalPickedPoint() );
if ( intersection->inputPolyLineFromViewerEnabled() )
{

View File

@@ -79,9 +79,9 @@ bool RicPolylineTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEvent
{
Rim3dView* rimView = eventObject.m_view;
auto firstPickItem = eventObject.m_pickItemInfos.front();
auto targetPointInDomain = rimView->displayCoordTransform()->transformToDomainCoord(
firstPickItem.globalPickedPoint() );
auto firstPickItem = eventObject.m_pickItemInfos.front();
auto targetPointInDomain =
rimView->displayCoordTransform()->transformToDomainCoord( firstPickItem.globalPickedPoint() );
auto* newTarget = new RimPolylineTarget();
newTarget->setAsPointTargetXYD(

View File

@@ -72,8 +72,8 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
if ( firstPickedPart )
{
const RivObjectSourceInfo* sourceInfo = dynamic_cast<const RivObjectSourceInfo*>(
firstPickedPart->sourceInfo() );
const RivObjectSourceInfo* sourceInfo =
dynamic_cast<const RivObjectSourceInfo*>( firstPickedPart->sourceInfo() );
if ( sourceInfo )
{
if ( dynamic_cast<RimPerforationInterval*>( sourceInfo->object() ) )
@@ -86,16 +86,16 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
const cvf::Part* secondPickedPart = secondPickedItem.pickedPart();
if ( secondPickedPart )
{
auto wellPathSourceCandidate = dynamic_cast<const RivWellPathSourceInfo*>(
secondPickedPart->sourceInfo() );
auto wellPathSourceCandidate =
dynamic_cast<const RivWellPathSourceInfo*>( secondPickedPart->sourceInfo() );
if ( wellPathSourceCandidate )
{
RimWellPath* perforationWellPath = nullptr;
objectToSelect->firstAncestorOrThisOfType( perforationWellPath );
if ( perforationWellPath == wellPathSourceCandidate->wellPath() )
{
wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>(
secondPickedPart->sourceInfo() );
wellPathSourceInfo =
dynamic_cast<const RivWellPathSourceInfo*>( secondPickedPart->sourceInfo() );
wellPathTriangleIndex = secondPickedItem.faceIdx();
}
}
@@ -194,9 +194,9 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
Rim3dView* rimView = RiaApplication::instance()->activeReservoirView();
if ( !rimView ) return false;
cvf::ref<caf::DisplayCoordTransform> transForm = rimView->displayCoordTransform();
cvf::Vec3d pickedPositionInUTM = transForm->transformToDomainCoord(
eventObject.m_pickItemInfos.front().globalPickedPoint() );
cvf::ref<caf::DisplayCoordTransform> transForm = rimView->displayCoordTransform();
cvf::Vec3d pickedPositionInUTM =
transForm->transformToDomainCoord( eventObject.m_pickItemInfos.front().globalPickedPoint() );
if ( auto intersectionView = dynamic_cast<Rim2dIntersectionView*>( rimView ) )
{
@@ -208,8 +208,8 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
// NOTE: This computation was used to find the location for a fracture when clicking on a well path
// It turned out that the computation was a bit inaccurate
// Consider to use code in RigSimulationWellCoordsAndMD instead
cvf::Vec3d trueVerticalDepth = wellPathSourceInfo->closestPointOnCenterLine( wellPathTriangleIndex,
pickedPositionInUTM );
cvf::Vec3d trueVerticalDepth =
wellPathSourceInfo->closestPointOnCenterLine( wellPathTriangleIndex, pickedPositionInUTM );
QString wellPathText;
wellPathText += QString( "Well path name : %1\n" ).arg( wellPathSourceInfo->wellPath()->name() );