Fixes by clang-format

This commit is contained in:
magnesj
2020-11-09 12:44:29 +00:00
committed by Magne Sjaastad
parent 6efad29aa6
commit 0258874e17
204 changed files with 67512 additions and 67423 deletions

View File

@@ -212,8 +212,8 @@ public:
std::array<FaceType, 4> adjacentFaces( FaceType face )
{
std::array<FaceType, 4> clipFaces = {FaceType::NO_FACE, FaceType::NO_FACE, FaceType::NO_FACE, FaceType::NO_FACE};
FaceType oppFace = cvf::StructGridInterface::oppositeFace( face );
std::array<FaceType, 4> clipFaces = { FaceType::NO_FACE, FaceType::NO_FACE, FaceType::NO_FACE, FaceType::NO_FACE };
FaceType oppFace = cvf::StructGridInterface::oppositeFace( face );
int clipFaceCount = 0;
for ( int faceCand = 0; faceCand < 6; ++faceCand )
{

View File

@@ -188,7 +188,7 @@ public:
{
cvf::Vec3d highestVx = p0.z() > p1.z() ? p0 : p1;
auto itIsInsertedPair = faultToHighestFaultMeshVxMap.insert( {fault, highestVx} );
auto itIsInsertedPair = faultToHighestFaultMeshVxMap.insert( { fault, highestVx } );
if ( !itIsInsertedPair.second )
{
if ( itIsInsertedPair.first->second.z() < highestVx.z() )
@@ -430,7 +430,7 @@ void RivExtrudedCurveIntersectionGeometryGenerator::calculateArrays()
for ( const auto& it : meshAcc.faultToHighestFaultMeshVxMap )
{
m_faultMeshLabelAndAnchorPositions.push_back( {it.first->name(), it.second} );
m_faultMeshLabelAndAnchorPositions.push_back( { it.first->name(), it.second } );
}
}
@@ -508,7 +508,8 @@ cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::create
displayCoords.push_back( transform->translateToDisplayCoord( pt ) );
}
return RivPolylineGenerator::createLineAlongPolylineDrawable( std::vector<std::vector<cvf::Vec3d>>( {displayCoords} ) );
return RivPolylineGenerator::createLineAlongPolylineDrawable(
std::vector<std::vector<cvf::Vec3d>>( { displayCoords } ) );
}
//--------------------------------------------------------------------------------------------------
@@ -533,7 +534,8 @@ cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::create
displayCoords.push_back( transform->translateToDisplayCoord( pt ) );
}
return RivPolylineGenerator::createPointsFromPolylineDrawable( std::vector<std::vector<cvf::Vec3d>>( {displayCoords} ) );
return RivPolylineGenerator::createPointsFromPolylineDrawable(
std::vector<std::vector<cvf::Vec3d>>( { displayCoords } ) );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -105,9 +105,9 @@ void RivReachCircleAnnotationPartMgr::buildParts( const caf::DisplayCoordTransfo
double yMin = centerPos.y() - symbolSize / 2.0;
double yMax = yMin + symbolSize;
double z = centerPos.z();
std::vector<Vec3d> line1 = {{xMin, yMin, z}, {xMax, yMax, z}};
std::vector<Vec3d> line2 = {{xMax, yMin, z}, {xMin, yMax, z}};
std::vector<std::vector<Vec3d>> symbol = {line1, line2};
std::vector<Vec3d> line1 = { { xMin, yMin, z }, { xMax, yMax, z } };
std::vector<Vec3d> line2 = { { xMax, yMin, z }, { xMin, yMax, z } };
std::vector<std::vector<Vec3d>> symbol = { line1, line2 };
cvf::ref<cvf::DrawableGeo> drawableGeo = RivPolylineGenerator::createLineAlongPolylineDrawable( symbol );
cvf::ref<cvf::Part> part = new cvf::Part;

View File

@@ -175,11 +175,11 @@ void RivReservoirFaultsPartMgr::appendPartsToModel( cvf::ModelBasicList* model )
}
{
QStringList stringsToMatch{RiaDefines::combinedRiTranResultName(),
RiaDefines::combinedRiMultResultName(),
RiaDefines::combinedRiAreaNormTranResultName(),
RiaDefines::combinedTransmissibilityResultName(),
RiaDefines::combinedMultResultName()};
QStringList stringsToMatch{ RiaDefines::combinedRiTranResultName(),
RiaDefines::combinedRiMultResultName(),
RiaDefines::combinedRiAreaNormTranResultName(),
RiaDefines::combinedTransmissibilityResultName(),
RiaDefines::combinedMultResultName() };
for ( const auto& s : stringsToMatch )
{

View File

@@ -175,7 +175,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts( const caf::DisplayCoordTransfor
cvf::Vec3d flattenedStartOffset = cvf::Vec3d::ZERO;
if ( m_pipeBranchesCLCoords.size() > branchIdxStart && m_pipeBranchesCLCoords[branchIdxStart].size() )
{
flattenedStartOffset = {0.0, 0.0, m_pipeBranchesCLCoords[branchIdxStart][0].z()};
flattenedStartOffset = { 0.0, 0.0, m_pipeBranchesCLCoords[branchIdxStart][0].z() };
}
for ( size_t brIdx = branchIdxStart; brIdx < branchIdxStop; ++brIdx )
@@ -351,7 +351,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts( const caf::DisplayCoordTransfor
}
}
if ( doFlatten ) flattenedStartOffset += {2 * flattenedIntersectionExtentLength, 0.0, 0.0};
if ( doFlatten ) flattenedStartOffset += { 2 * flattenedIntersectionExtentLength, 0.0, 0.0 };
}
}

View File

@@ -407,7 +407,7 @@ void RivTensorResultPartMgr::createOneColorPerPrincipalScalarMapper( const RimTe
// Using a linear color mapper to set colors for three discrete principal numbers (1, 2, 3)
// by setting the 3 + 1 interval levels so the principal numbers match the center of the intervals.
std::set<double> levelValues = {0.5, 1.5, 2.5, 3.5};
std::set<double> levelValues = { 0.5, 1.5, 2.5, 3.5 };
scalarMapper->setLevelsFromValues( levelValues );
}

View File

@@ -254,5 +254,5 @@ void RivTernarySaturationOverlayItem::setRangeText( const cvf::String& soilRange
//--------------------------------------------------------------------------------------------------
cvf::Vec2ui RivTernarySaturationOverlayItem::preferredSize()
{
return {140, 180}; // Could do more elaborate text width checks.
return { 140, 180 }; // Could do more elaborate text width checks.
}

View File

@@ -98,7 +98,7 @@ void RivTextAnnotationPartMgr::buildParts( const caf::DisplayCoordTransform* dis
// Line part
{
std::vector<cvf::Vec3d> points = {anchorPosition, labelPosition};
std::vector<cvf::Vec3d> points = { anchorPosition, labelPosition };
cvf::ref<cvf::DrawableGeo> drawableGeo = RivPolylineGenerator::createLineAlongPolylineDrawable( points );

View File

@@ -267,14 +267,14 @@ cvf::ref<cvf::DrawableGeo> RivWellConnectionsPartMgr::createArrowGeometry( const
// : flat : : : : : : : : end 18 18
// 1 3 5 7 9 11 19 13 15 17 17
static const cvf::uint producerArrowFaceList[8 * 5 + 4] = {4, 0, 1, 3, 2, 4, 2, 3, 5, 4, 4, 4, 5, 7, 6,
4, 6, 7, 9, 8, 4, 8, 9, 11, 10, 4, 10, 11, 20, 19,
4, 19, 20, 13, 12, 4, 12, 13, 15, 14, 3, 16, 17, 18};
static const cvf::uint producerArrowFaceList[8 * 5 + 4] = { 4, 0, 1, 3, 2, 4, 2, 3, 5, 4, 4, 4, 5, 7, 6,
4, 6, 7, 9, 8, 4, 8, 9, 11, 10, 4, 10, 11, 20, 19,
4, 19, 20, 13, 12, 4, 12, 13, 15, 14, 3, 16, 17, 18 };
static const cvf::uint injectorArrowFaceList[8 * 5 + 8] = {4, 0, 1, 3, 2, 4, 2, 3, 5, 4, 4, 4,
5, 7, 6, 4, 6, 7, 9, 8, 4, 8, 9, 11,
10, 4, 10, 11, 20, 19, 4, 19, 20, 13, 12, 4,
12, 13, 15, 14, 3, 14, 18, 16, 3, 18, 15, 17};
static const cvf::uint injectorArrowFaceList[8 * 5 + 8] = { 4, 0, 1, 3, 2, 4, 2, 3, 5, 4, 4, 4,
5, 7, 6, 4, 6, 7, 9, 8, 4, 8, 9, 11,
10, 4, 10, 11, 20, 19, 4, 19, 20, 13, 12, 4,
12, 13, 15, 14, 3, 14, 18, 16, 3, 18, 15, 17 };
cvf::Vec3f endPointInTopPlane = endPoint;
if ( m_useCurvedArrows ) endPointInTopPlane.z() = startPoint.z();

View File

@@ -183,9 +183,9 @@ void RivWellDiskPartMgr::buildWellDiskParts( size_t frameIndex, const caf::Displ
cvf::ref<cvf::Effect> effectToUse = RiaGuiApplication::instance()->useShaders() ? m_shaderEffect : m_fixedFuncEffect;
const cvf::Color3ub colorTable[] = {cvf::Color3ub( 0, 177, 89 ), // Green
cvf::Color3ub( 255, 66, 66 ), // Red
cvf::Color3ub( 66, 66, 255 )}; // Blue
const cvf::Color3ub colorTable[] = { cvf::Color3ub( 0, 177, 89 ), // Green
cvf::Color3ub( 255, 66, 66 ), // Red
cvf::Color3ub( 66, 66, 255 ) }; // Blue
size_t vertexCount = geo1->vertexCount();
cvf::ref<cvf::Color3ubArray> colorArray = new cvf::Color3ubArray;

View File

@@ -466,9 +466,9 @@ void RivWellPathPartMgr::appendPerforationsToModel( cvf::ModelBasicList*
vector<cvf::Mat4d> flatningCSs =
RivSectionFlattner::calculateFlatteningCSsForPolyline( perfIntervalCL,
cvf::Vec3d::Z_AXIS,
{horizontalLengthAlongWellPath,
0.0,
perfIntervalCL[0].z()},
{ horizontalLengthAlongWellPath,
0.0,
perfIntervalCL[0].z() },
&dummy );
for ( size_t cIdx = 0; cIdx < perfIntervalCL.size(); ++cIdx )
@@ -520,15 +520,15 @@ void RivWellPathPartMgr::appendPerforationValvesToModel( cvf::ModelBasicList*
cvf::Color3f valveColor = valve->defaultComponentColor();
if ( valve->componentType() == RiaDefines::WellPathComponentType::ICV )
{
measuredDepthsRelativeToStartMD = {0.0, 1.0, 1.5, 4.0, 5.0, 5.5, 8.0, 9.0};
radii = {wellPathRadius,
wellPathRadius * 1.8,
wellPathRadius * 2.0,
wellPathRadius * 2.0,
wellPathRadius * 1.8,
wellPathRadius * 1.7,
wellPathRadius * 1.7,
wellPathRadius};
measuredDepthsRelativeToStartMD = { 0.0, 1.0, 1.5, 4.0, 5.0, 5.5, 8.0, 9.0 };
radii = { wellPathRadius,
wellPathRadius * 1.8,
wellPathRadius * 2.0,
wellPathRadius * 2.0,
wellPathRadius * 1.8,
wellPathRadius * 1.7,
wellPathRadius * 1.7,
wellPathRadius };
double startMD = valve->startMD();
std::vector<cvf::Vec3d> displayCoords;
@@ -696,9 +696,9 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
std::vector<cvf::Mat4d> flatningCSs =
RivSectionFlattner::calculateFlatteningCSsForPolyline( clippedWellPathCenterLine,
cvf::Vec3d::Z_AXIS,
{horizontalLengthAlongWellToClipPoint,
0.0,
clippedWellPathCenterLine[0].z()},
{ horizontalLengthAlongWellToClipPoint,
0.0,
clippedWellPathCenterLine[0].z() },
&dummy );
for ( size_t cIdx = 0; cIdx < cvfCoords->size(); ++cIdx )

View File

@@ -110,7 +110,7 @@ public:
{
cvf::Vec3d highestVx = p0.z() > p1.z() ? p0 : p1;
auto itIsInsertedPair = faultToHighestFaultMeshVxMap.insert( {fault, highestVx} );
auto itIsInsertedPair = faultToHighestFaultMeshVxMap.insert( { fault, highestVx } );
if ( !itIsInsertedPair.second )
{
if ( itIsInsertedPair.first->second.z() < highestVx.z() )
@@ -309,7 +309,7 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
for ( const auto& it : meshAcc.faultToHighestFaultMeshVxMap )
{
m_faultMeshLabelAndAnchorPositions.push_back( {it.first->name(), it.second} );
m_faultMeshLabelAndAnchorPositions.push_back( { it.first->name(), it.second } );
}
}

View File

@@ -73,7 +73,7 @@ RivWindowEdgeAxesOverlayItem::RivWindowEdgeAxesOverlayItem( Font* font )
CVF_ASSERT( font );
CVF_ASSERT( !font->isEmpty() );
setLayoutFixedPosition( {0, 0} );
setLayoutFixedPosition( { 0, 0 } );
updateGeomerySizes();
}
@@ -561,8 +561,8 @@ void RivWindowEdgeAxesOverlayItem::renderShaderFrameAndTickLines( OpenGLContext*
// Triangle indices for the frame background
static const ushort backgroundTriangleIndices[] = {0, 1, 5, 0, 5, 4, 1, 2, 6, 1, 6, 5,
3, 0, 4, 3, 4, 7, 2, 3, 6, 3, 7, 6};
static const ushort backgroundTriangleIndices[] = { 0, 1, 5, 0, 5, 4, 1, 2, 6, 1, 6, 5,
3, 0, 4, 3, 4, 7, 2, 3, 6, 3, 7, 6 };
glDrawRangeElements( GL_TRIANGLES, 0, 7, 24, GL_UNSIGNED_SHORT, backgroundTriangleIndices );
@@ -571,13 +571,13 @@ void RivWindowEdgeAxesOverlayItem::renderShaderFrameAndTickLines( OpenGLContext*
UniformFloat uniformColor( "u_color", Color4f( m_lineColor, m_showAxisLines ? 0.25f : 1.0f ) );
shaderProgram->applyUniform( oglContext, uniformColor );
static const ushort frameLineIndices[] = {7, 4, 4, 5, 5, 6, 6, 7};
static const ushort frameLineIndices[] = { 7, 4, 4, 5, 5, 6, 6, 7 };
glDrawRangeElements( GL_LINES, 0, 7, 8, GL_UNSIGNED_SHORT, frameLineIndices );
// Render tickmarks
static const ushort tickLineIndices[] = {0, 1};
static const ushort tickLineIndices[] = { 0, 1 };
// X - axis Tick lines