clang-format: Set column width to 140

* Set column width to 140
* Use c++20
* Remove redundant virtual
This commit is contained in:
Magne Sjaastad
2023-02-26 10:48:40 +01:00
committed by GitHub
parent 8768e186d8
commit f8c5cf389f
1535 changed files with 10456 additions and 19398 deletions

View File

@@ -74,8 +74,7 @@ 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() ) )
@@ -88,16 +87,14 @@ 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();
}
}
@@ -124,22 +121,21 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
{
RimWellPath* wellPath = nullptr;
RimWellPathAttribute* attribute = static_cast<RimWellPathAttribute*>( sourceInfo->object() );
RimWellPathAttribute* attribute = static_cast<RimWellPathAttribute*>( sourceInfo->object() );
RimWellPathAttributeCollection* collection = nullptr;
attribute->firstAncestorOrThisOfTypeAsserted( collection );
collection->firstAncestorOrThisOfTypeAsserted( wellPath );
QString attrText = QString( "Well Path: %1\nCasing Design Attribute: %2" )
.arg( wellPath->name() )
.arg( attribute->componentLabel() );
QString attrText =
QString( "Well Path: %1\nCasing Design Attribute: %2" ).arg( wellPath->name() ).arg( attribute->componentLabel() );
RiuMainWindow::instance()->setResultInfo( attrText );
RiuMainWindow::instance()->selectAsCurrentItem( collection );
}
else if ( dynamic_cast<RimWellMeasurement*>( sourceInfo->object() ) )
{
RimWellMeasurement* measurement = dynamic_cast<RimWellMeasurement*>( sourceInfo->object() );
RimWellMeasurementCollection* collection = nullptr;
RimWellMeasurement* measurement = dynamic_cast<RimWellMeasurement*>( sourceInfo->object() );
RimWellMeasurementCollection* collection = nullptr;
measurement->firstAncestorOrThisOfTypeAsserted( collection );
QString measurementText = QString( "Well path name: %1\n" ).arg( measurement->wellName() );
@@ -201,8 +197,7 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
if ( !rimView ) return false;
cvf::ref<caf::DisplayCoordTransform> transForm = rimView->displayCoordTransform();
cvf::Vec3d pickedPositionInUTM =
transForm->transformToDomainCoord( eventObject.m_pickItemInfos.front().globalPickedPoint() );
cvf::Vec3d pickedPositionInUTM = transForm->transformToDomainCoord( eventObject.m_pickItemInfos.front().globalPickedPoint() );
if ( auto intersectionView = dynamic_cast<Rim2dIntersectionView*>( rimView ) )
{
@@ -217,8 +212,7 @@ 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() );