clang-format : Fixes related to bug in clang-format plugin

The LLVM/clang plugin to visual studio has a bug related to single space formatting changes. This commit fixes invalid formatting related to these issues.
This commit is contained in:
Magne Sjaastad 2019-11-07 07:37:50 +01:00
parent 7d2f1ec9c1
commit 0caaaf7159
8 changed files with 57 additions and 57 deletions

View File

@ -266,22 +266,22 @@ cvf::ref<cvf::DrawableGeo> RicPointTangentManipulatorPartMgr::createHorizontalPl
float cos_5pi_12 = cos( 5.5 * MY_PI / 12 ); float cos_5pi_12 = cos( 5.5 * MY_PI / 12 );
float sin_5pi_12 = sin( 5.5 * MY_PI / 12 ); float sin_5pi_12 = sin( 5.5 * MY_PI / 12 );
vertexArray->set( 0, { 1.25, 0, 0 } ); vertexArray->set( 0, {1.25, 0, 0} );
vertexArray->set( 1, { cos_pi_12, sin_pi_12, 0 } ); vertexArray->set( 1, {cos_pi_12, sin_pi_12, 0} );
vertexArray->set( 2, { cos_3pi_12, sin_3pi_12, 0 } ); vertexArray->set( 2, {cos_3pi_12, sin_3pi_12, 0} );
vertexArray->set( 3, { cos_5pi_12, sin_5pi_12, 0 } ); vertexArray->set( 3, {cos_5pi_12, sin_5pi_12, 0} );
vertexArray->set( 4, { 0, 1.25, 0 } ); vertexArray->set( 4, {0, 1.25, 0} );
vertexArray->set( 5, { -cos_5pi_12, sin_5pi_12, 0 } ); vertexArray->set( 5, {-cos_5pi_12, sin_5pi_12, 0} );
vertexArray->set( 6, { -cos_3pi_12, sin_3pi_12, 0 } ); vertexArray->set( 6, {-cos_3pi_12, sin_3pi_12, 0} );
vertexArray->set( 7, { -cos_pi_12, sin_pi_12, 0 } ); vertexArray->set( 7, {-cos_pi_12, sin_pi_12, 0} );
vertexArray->set( 8, { -1.25, 0, 0 } ); vertexArray->set( 8, {-1.25, 0, 0} );
vertexArray->set( 9, { -cos_pi_12, -sin_pi_12, 0 } ); vertexArray->set( 9, {-cos_pi_12, -sin_pi_12, 0} );
vertexArray->set( 10, { -cos_3pi_12, -sin_3pi_12, 0 } ); vertexArray->set( 10, {-cos_3pi_12, -sin_3pi_12, 0} );
vertexArray->set( 11, { -cos_5pi_12, -sin_5pi_12, 0 } ); vertexArray->set( 11, {-cos_5pi_12, -sin_5pi_12, 0} );
vertexArray->set( 12, { 0, -1.25, 0 } ); vertexArray->set( 12, {0, -1.25, 0} );
vertexArray->set( 13, { cos_5pi_12, -sin_5pi_12, 0 } ); vertexArray->set( 13, {cos_5pi_12, -sin_5pi_12, 0} );
vertexArray->set( 14, { cos_3pi_12, -sin_3pi_12, 0 } ); vertexArray->set( 14, {cos_3pi_12, -sin_3pi_12, 0} );
vertexArray->set( 15, { cos_pi_12, -sin_pi_12, 0 } ); vertexArray->set( 15, {cos_pi_12, -sin_pi_12, 0} );
Vec3f origin( m_origin ); Vec3f origin( m_origin );
for ( cvf::Vec3f& vx : *vertexArray ) for ( cvf::Vec3f& vx : *vertexArray )
@ -340,7 +340,7 @@ cvf::ref<cvf::DrawableGeo> RicPointTangentManipulatorPartMgr::createVerticalAxis
float s = 0.5 * m_handleSize; float s = 0.5 * m_handleSize;
Vec3f origin( m_origin ); Vec3f origin( m_origin );
geomBuilder->transformVertexRange( 0, geomBuilder->vertexCount(), cvf::Mat4f::fromScaling( { s, s, s } ) ); geomBuilder->transformVertexRange( 0, geomBuilder->vertexCount(), cvf::Mat4f::fromScaling( {s, s, s} ) );
geomBuilder->transformVertexRange( 0, geomBuilder->vertexCount(), cvf::Mat4f::fromTranslation( origin ) ); geomBuilder->transformVertexRange( 0, geomBuilder->vertexCount(), cvf::Mat4f::fromTranslation( origin ) );
unsigned vxArraySizeFirstCylinder = geomBuilder->vertexCount(); unsigned vxArraySizeFirstCylinder = geomBuilder->vertexCount();
@ -349,10 +349,10 @@ cvf::ref<cvf::DrawableGeo> RicPointTangentManipulatorPartMgr::createVerticalAxis
geomBuilder->transformVertexRange( vxArraySizeFirstCylinder, geomBuilder->transformVertexRange( vxArraySizeFirstCylinder,
geomBuilder->vertexCount(), geomBuilder->vertexCount(),
cvf::Mat4f::fromTranslation( { 0.0f, 0.0f, -1.0f } ) ); cvf::Mat4f::fromTranslation( {0.0f, 0.0f, -1.0f} ) );
geomBuilder->transformVertexRange( vxArraySizeFirstCylinder, geomBuilder->transformVertexRange( vxArraySizeFirstCylinder,
geomBuilder->vertexCount(), geomBuilder->vertexCount(),
cvf::Mat4f::fromScaling( { s, s, s } ) ); cvf::Mat4f::fromScaling( {s, s, s} ) );
geomBuilder->transformVertexRange( vxArraySizeFirstCylinder, geomBuilder->transformVertexRange( vxArraySizeFirstCylinder,
geomBuilder->vertexCount(), geomBuilder->vertexCount(),
cvf::Mat4f::fromTranslation( origin ) ); cvf::Mat4f::fromTranslation( origin ) );

View File

@ -306,7 +306,7 @@ bool RifEclipseInputFileTools::exportGrid( const QString& fileName,
cvf::Vec2f origin( mapAxes[2] - minPoint2f.x(), mapAxes[3] - minPoint2f.y() ); cvf::Vec2f origin( mapAxes[2] - minPoint2f.x(), mapAxes[3] - minPoint2f.y() );
cvf::Vec2f xPoint = cvf::Vec2f( mapAxes[4], mapAxes[5] ) - minPoint2f; cvf::Vec2f xPoint = cvf::Vec2f( mapAxes[4], mapAxes[5] ) - minPoint2f;
cvf::Vec2f yPoint = cvf::Vec2f( mapAxes[0], mapAxes[1] ) - minPoint2f; cvf::Vec2f yPoint = cvf::Vec2f( mapAxes[0], mapAxes[1] ) - minPoint2f;
mapAxes = { yPoint.x(), yPoint.y(), origin.x(), origin.y(), xPoint.x(), xPoint.y() }; mapAxes = {yPoint.x(), yPoint.y(), origin.x(), origin.y(), xPoint.x(), xPoint.y()};
mapAxisTrans.setTranslation( mapAxisTrans.translation() - minPoint3d ); mapAxisTrans.setTranslation( mapAxisTrans.translation() - minPoint3d );
} }

View File

@ -123,5 +123,5 @@ private:
cvf::Color3f m_gridColor; cvf::Color3f m_gridColor;
cvf::Color3f m_gridLegendColor; cvf::Color3f m_gridLegendColor;
bool m_needsRegeneration; bool m_needsRegeneration;
}; };

View File

@ -124,7 +124,7 @@ RimWellAllocationPlot::RimWellAllocationPlot()
m_accumulatedWellFlowPlot->setAvailableDepthUnits( {} ); m_accumulatedWellFlowPlot->setAvailableDepthUnits( {} );
m_accumulatedWellFlowPlot->setAvailableDepthTypes( m_accumulatedWellFlowPlot->setAvailableDepthTypes(
{ RimWellLogPlot::CONNECTION_NUMBER, RimWellLogPlot::TRUE_VERTICAL_DEPTH, RimWellLogPlot::PSEUDO_LENGTH } ); {RimWellLogPlot::CONNECTION_NUMBER, RimWellLogPlot::TRUE_VERTICAL_DEPTH, RimWellLogPlot::PSEUDO_LENGTH} );
m_accumulatedWellFlowPlot->setCommonDataSourceEnabled( false ); m_accumulatedWellFlowPlot->setCommonDataSourceEnabled( false );
} }

View File

@ -1104,7 +1104,7 @@ void RimGridCrossPlot::setShowInfoBox( bool enable )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
std::set<RimPlotAxisPropertiesInterface*> RimGridCrossPlot::allPlotAxes() const std::set<RimPlotAxisPropertiesInterface*> RimGridCrossPlot::allPlotAxes() const
{ {
return { m_xAxisProperties, m_yAxisProperties }; return {m_xAxisProperties, m_yAxisProperties};
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -2240,7 +2240,7 @@ void RimWellLogTrack::updateCurveDataRegionsOnPlot()
caf::ColorTable colorTable( RimRegularLegendConfig::colorArrayFromColorType( m_colorShadingPalette() ) ); caf::ColorTable colorTable( RimRegularLegendConfig::colorArrayFromColorType( m_colorShadingPalette() ) );
std::vector<QString> sourceNames = std::vector<QString> sourceNames =
{ "", "PP=Grid", "PP=Las-File", "PP=Element Property Table", "", "PP=Hydrostatic" }; {"", "PP=Grid", "PP=Las-File", "PP=Element Property Table", "", "PP=Hydrostatic"};
curveData.data = ppValues; curveData.data = ppValues;
std::vector<QString> sourceNamesToPlot; std::vector<QString> sourceNamesToPlot;
@ -2264,12 +2264,12 @@ void RimWellLogTrack::updateCurveDataRegionsOnPlot()
caf::ColorTable colorTable( RimRegularLegendConfig::colorArrayFromColorType( m_colorShadingPalette() ) ); caf::ColorTable colorTable( RimRegularLegendConfig::colorArrayFromColorType( m_colorShadingPalette() ) );
std::vector<QString> sourceNames = std::vector<QString> sourceNames =
{ "", {"",
"", "",
"Poisson=Las-File", "Poisson=Las-File",
"Poisson=Element Property Table", "Poisson=Element Property Table",
QString( "Poisson=%1" ).arg( wellBoreStabilityPlot->userDefinedPoissonRatio() ), QString( "Poisson=%1" ).arg( wellBoreStabilityPlot->userDefinedPoissonRatio() ),
"" }; ""};
curveData.data = poissonValues; curveData.data = poissonValues;
std::vector<QString> sourceNamesToPlot; std::vector<QString> sourceNamesToPlot;
@ -2292,12 +2292,12 @@ void RimWellLogTrack::updateCurveDataRegionsOnPlot()
{ {
caf::ColorTable colorTable( RimRegularLegendConfig::colorArrayFromColorType( m_colorShadingPalette() ) ); caf::ColorTable colorTable( RimRegularLegendConfig::colorArrayFromColorType( m_colorShadingPalette() ) );
std::vector<QString> sourceNames = { "", std::vector<QString> sourceNames = {"",
"", "",
"UCS=Las-File", "UCS=Las-File",
"UCS=Element Property Table", "UCS=Element Property Table",
QString( "UCS=%1" ).arg( wellBoreStabilityPlot->userDefinedUcs() ), QString( "UCS=%1" ).arg( wellBoreStabilityPlot->userDefinedUcs() ),
"" }; ""};
curveData.data = ucsValues; curveData.data = ucsValues;
@ -2367,16 +2367,16 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
} }
} }
const std::map<RiaDefines::WellPathComponentType, int> sortIndices = { { RiaDefines::WELL_PATH, 0 }, const std::map<RiaDefines::WellPathComponentType, int> sortIndices = {{RiaDefines::WELL_PATH, 0},
{ RiaDefines::CASING, 1 }, {RiaDefines::CASING, 1},
{ RiaDefines::LINER, 2 }, {RiaDefines::LINER, 2},
{ RiaDefines::PERFORATION_INTERVAL, 3 }, {RiaDefines::PERFORATION_INTERVAL, 3},
{ RiaDefines::FISHBONES, 4 }, {RiaDefines::FISHBONES, 4},
{ RiaDefines::FRACTURE, 5 }, {RiaDefines::FRACTURE, 5},
{ RiaDefines::PACKER, 6 }, {RiaDefines::PACKER, 6},
{ RiaDefines::ICD, 7 }, {RiaDefines::ICD, 7},
{ RiaDefines::AICD, 8 }, {RiaDefines::AICD, 8},
{ RiaDefines::ICV, 9 } }; {RiaDefines::ICV, 9}};
std::stable_sort( allWellPathComponents.begin(), std::stable_sort( allWellPathComponents.begin(),
allWellPathComponents.end(), allWellPathComponents.end(),

View File

@ -334,7 +334,7 @@ QString RimSummaryPlot::asciiDataForSummaryPlotExport( DateTimePeriod resampling
populateTimeHistoryCurvesData( m_gridTimeHistoryCurves.childObjects(), &timeHistoryCurvesData ); populateTimeHistoryCurvesData( m_gridTimeHistoryCurves.childObjects(), &timeHistoryCurvesData );
// Export observed data // Export observed data
appendToExportData( out, { summaryCurvesObsData }, showTimeAsLongString ); appendToExportData( out, {summaryCurvesObsData}, showTimeAsLongString );
std::vector<CurvesData> exportData( 2 ); std::vector<CurvesData> exportData( 2 );
@ -356,7 +356,7 @@ QString RimSummaryPlot::asciiDataForSummaryPlotExport( DateTimePeriod resampling
CurvesData asciiCurvesData; CurvesData asciiCurvesData;
populateAsciiDataCurvesData( m_asciiDataCurves.childObjects(), &asciiCurvesData ); populateAsciiDataCurvesData( m_asciiDataCurves.childObjects(), &asciiCurvesData );
appendToExportData( out, { asciiCurvesData }, showTimeAsLongString ); appendToExportData( out, {asciiCurvesData}, showTimeAsLongString );
} }
return out; return out;
@ -1179,7 +1179,7 @@ void RimSummaryPlot::addCurveNoUpdate( RimSummaryCurve* curve )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimSummaryPlot::deleteCurve( RimSummaryCurve* curve ) void RimSummaryPlot::deleteCurve( RimSummaryCurve* curve )
{ {
deleteCurves( { curve } ); deleteCurves( {curve} );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -1505,7 +1505,7 @@ void RimSummaryPlot::updateZoomFromQwt()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
std::set<RimPlotAxisPropertiesInterface*> RimSummaryPlot::allPlotAxes() const std::set<RimPlotAxisPropertiesInterface*> RimSummaryPlot::allPlotAxes() const
{ {
return { m_timeAxisProperties, m_bottomAxisProperties, m_leftYAxisProperties, m_rightYAxisProperties }; return {m_timeAxisProperties, m_bottomAxisProperties, m_leftYAxisProperties, m_rightYAxisProperties};
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -2121,13 +2121,13 @@ void populateTimeHistoryCurvesData( std::vector<RimGridTimeHistoryCurve*> curves
if ( curveCaseName == curvesData->caseNames[i] ) casePosInList = i; if ( curveCaseName == curvesData->caseNames[i] ) casePosInList = i;
} }
CurveData curveData = { curve->curveExportDescription(), RifEclipseSummaryAddress(), curve->yValues() }; CurveData curveData = {curve->curveExportDescription(), RifEclipseSummaryAddress(), curve->yValues()};
if ( casePosInList == cvf::UNDEFINED_SIZE_T ) if ( casePosInList == cvf::UNDEFINED_SIZE_T )
{ {
curvesData->caseNames.push_back( curveCaseName ); curvesData->caseNames.push_back( curveCaseName );
curvesData->timeSteps.push_back( curve->timeStepValues() ); curvesData->timeSteps.push_back( curve->timeStepValues() );
curvesData->allCurveData.push_back( std::vector<CurveData>( { curveData } ) ); curvesData->allCurveData.push_back( std::vector<CurveData>( {curveData} ) );
} }
else else
{ {
@ -2153,13 +2153,13 @@ void populateAsciiDataCurvesData( std::vector<RimAsciiDataCurve*> curves, Curves
size_t casePosInList = cvf::UNDEFINED_SIZE_T; size_t casePosInList = cvf::UNDEFINED_SIZE_T;
CurveData curveData = { curve->curveExportDescription(), RifEclipseSummaryAddress(), curve->yValues() }; CurveData curveData = {curve->curveExportDescription(), RifEclipseSummaryAddress(), curve->yValues()};
if ( casePosInList == cvf::UNDEFINED_SIZE_T ) if ( casePosInList == cvf::UNDEFINED_SIZE_T )
{ {
curvesData->caseNames.push_back( "" ); curvesData->caseNames.push_back( "" );
curvesData->timeSteps.push_back( curve->timeSteps() ); curvesData->timeSteps.push_back( curve->timeSteps() );
curvesData->allCurveData.push_back( std::vector<CurveData>( { curveData } ) ); curvesData->allCurveData.push_back( std::vector<CurveData>( {curveData} ) );
} }
else else
{ {
@ -2195,7 +2195,7 @@ void populateSummaryCurvesData( std::vector<RimSummaryCurve*> curves, SummaryCur
if ( curveCaseName == curvesData->caseNames[i] ) casePosInList = i; if ( curveCaseName == curvesData->caseNames[i] ) casePosInList = i;
} }
CurveData curveData = { curve->curveExportDescription(), curve->summaryAddressY(), curve->valuesY() }; CurveData curveData = {curve->curveExportDescription(), curve->summaryAddressY(), curve->valuesY()};
CurveData errorCurveData; CurveData errorCurveData;
// Error data // Error data
@ -2211,7 +2211,7 @@ void populateSummaryCurvesData( std::vector<RimSummaryCurve*> curves, SummaryCur
if ( casePosInList == cvf::UNDEFINED_SIZE_T ) if ( casePosInList == cvf::UNDEFINED_SIZE_T )
{ {
auto curveDataList = std::vector<CurveData>( { curveData } ); auto curveDataList = std::vector<CurveData>( {curveData} );
if ( hasErrorData ) curveDataList.push_back( errorCurveData ); if ( hasErrorData ) curveDataList.push_back( errorCurveData );
curvesData->caseNames.push_back( curveCaseName ); curvesData->caseNames.push_back( curveCaseName );

View File

@ -482,7 +482,7 @@ void RiuGridPlotWindow::dropEvent( QDropEvent* event )
if ( insertAfter != plotToMove ) if ( insertAfter != plotToMove )
{ {
m_plotDefinition->movePlotsToThis( { plotToMove }, insertAfter ); m_plotDefinition->movePlotsToThis( {plotToMove}, insertAfter );
} }
} }
} }