mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Remove "set-but-unused" variables (generates warnings on gcc 7).
This commit is contained in:
parent
59621e38f7
commit
2f4ee076de
@ -809,7 +809,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
|
|||||||
{
|
{
|
||||||
const auto wellPath =
|
const auto wellPath =
|
||||||
RicWellPathExportCompletionsFileTools::findWellPathFromExportName( completion.wellName() );
|
RicWellPathExportCompletionsFileTools::findWellPathFromExportName( completion.wellName() );
|
||||||
auto item = wellPathToLgrNameMap.find( wellPath );
|
|
||||||
wellPathToLgrNameMap[wellPath].insert( completionsForLgr.first );
|
wellPathToLgrNameMap[wellPath].insert( completionsForLgr.first );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -248,9 +248,7 @@ VdeArrayDataPacket
|
|||||||
|
|
||||||
const char* payloadPtr = rawPacketBuffer + VDE_HEADER_SIZE;
|
const char* payloadPtr = rawPacketBuffer + VDE_HEADER_SIZE;
|
||||||
const size_t payloadSizeInBytes = bufferSize - VDE_HEADER_SIZE;
|
const size_t payloadSizeInBytes = bufferSize - VDE_HEADER_SIZE;
|
||||||
|
assert( payloadSizeInBytes == elementCount * sizeOfElement( elementType ) );
|
||||||
const size_t payloadSizeInBytesFromPacketFields = elementCount * sizeOfElement( elementType );
|
|
||||||
assert( payloadSizeInBytes == payloadSizeInBytesFromPacketFields );
|
|
||||||
|
|
||||||
VdeArrayDataPacket packet;
|
VdeArrayDataPacket packet;
|
||||||
packet.assign( packetId, elementType, elementCount, imageWidth, imageHeight, imageCompCount, payloadPtr, payloadSizeInBytes );
|
packet.assign( packetId, elementType, elementCount, imageWidth, imageHeight, imageCompCount, payloadPtr, payloadSizeInBytes );
|
||||||
@ -284,8 +282,7 @@ bool VdeArrayDataPacket::assign( int arrayId,
|
|||||||
bufferWriter.setUint16( VDE_BYTEOFFSET_IMAGE_WIDTH, imageWidth );
|
bufferWriter.setUint16( VDE_BYTEOFFSET_IMAGE_WIDTH, imageWidth );
|
||||||
bufferWriter.setUint16( VDE_BYTEOFFSET_IMAGE_HEIGHT, imageHeight );
|
bufferWriter.setUint16( VDE_BYTEOFFSET_IMAGE_HEIGHT, imageHeight );
|
||||||
|
|
||||||
const size_t calcArraySizeInBytes = elementCount * sizeOfElement( elementType );
|
assert( arrayDataSizeInBytes == elementCount * sizeOfElement( elementType ) );
|
||||||
assert( arrayDataSizeInBytes == calcArraySizeInBytes );
|
|
||||||
|
|
||||||
std::copy( arrayDataPtr, arrayDataPtr + arrayDataSizeInBytes, m_packetBytes.begin() + VDE_HEADER_SIZE );
|
std::copy( arrayDataPtr, arrayDataPtr + arrayDataSizeInBytes, m_packetBytes.begin() + VDE_HEADER_SIZE );
|
||||||
assert( m_packetBytes.size() == totalSizeBytes );
|
assert( m_packetBytes.size() == totalSizeBytes );
|
||||||
|
@ -347,7 +347,6 @@ void Riv3dWellLogCurveGeometryGenerator::createNewVerticesAlongSegment( const cv
|
|||||||
const std::vector<cvf::Vec3d>& drawSurfaceVertices,
|
const std::vector<cvf::Vec3d>& drawSurfaceVertices,
|
||||||
std::vector<cvf::Vec3d>* extraVertices )
|
std::vector<cvf::Vec3d>* extraVertices )
|
||||||
{
|
{
|
||||||
cvf::Vec3d fullSegmentVector = ptEnd - ptStart;
|
|
||||||
extraVertices->push_back( ptStart );
|
extraVertices->push_back( ptStart );
|
||||||
|
|
||||||
// Find segments that intersects the triangle edges
|
// Find segments that intersects the triangle edges
|
||||||
|
@ -93,8 +93,6 @@ void RivContourMapProjectionPartMgr::appendPickPointVisToModel( cvf::ModelBasicL
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::ref<cvf::Vec2fArray> RivContourMapProjectionPartMgr::createTextureCoords( const std::vector<double>& values ) const
|
cvf::ref<cvf::Vec2fArray> RivContourMapProjectionPartMgr::createTextureCoords( const std::vector<double>& values ) const
|
||||||
{
|
{
|
||||||
cvf::Vec2ui patchSize = m_contourMapProjection->numberOfVerticesIJ();
|
|
||||||
|
|
||||||
cvf::ref<cvf::Vec2fArray> textureCoords = new cvf::Vec2fArray( values.size() );
|
cvf::ref<cvf::Vec2fArray> textureCoords = new cvf::Vec2fArray( values.size() );
|
||||||
|
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
|
@ -67,8 +67,6 @@ void RivReachCircleAnnotationPartMgr::buildParts( const caf::DisplayCoordTransfo
|
|||||||
|
|
||||||
cvf::ref<RivReachCircleAnnotationSourceInfo> sourceInfo = new RivReachCircleAnnotationSourceInfo( rimAnnotation );
|
cvf::ref<RivReachCircleAnnotationSourceInfo> sourceInfo = new RivReachCircleAnnotationSourceInfo( rimAnnotation );
|
||||||
|
|
||||||
Vec3d centerPositionInDomain = rimAnnotation->centerPoint();
|
|
||||||
|
|
||||||
auto lineColor = rimAnnotation->appearance()->color();
|
auto lineColor = rimAnnotation->appearance()->color();
|
||||||
auto isDashedLine = rimAnnotation->appearance()->isDashed();
|
auto isDashedLine = rimAnnotation->appearance()->isDashed();
|
||||||
auto lineThickness = rimAnnotation->appearance()->thickness();
|
auto lineThickness = rimAnnotation->appearance()->thickness();
|
||||||
|
@ -103,9 +103,8 @@ void RivWellPathSourceInfo::normalizedIntersection( size_t triangleIn
|
|||||||
cvf::Vec3d segmentStart = rigWellPath->m_wellPathPoints[segIndex];
|
cvf::Vec3d segmentStart = rigWellPath->m_wellPathPoints[segIndex];
|
||||||
cvf::Vec3d segmentEnd = rigWellPath->m_wellPathPoints[segIndex + 1];
|
cvf::Vec3d segmentEnd = rigWellPath->m_wellPathPoints[segIndex + 1];
|
||||||
|
|
||||||
double norm = 0.0;
|
double norm = 0.0;
|
||||||
cvf::Vec3d pointOnLine =
|
cvf::GeometryTools::projectPointOnLine( segmentStart, segmentEnd, globalIntersectionInDomain, &norm );
|
||||||
cvf::GeometryTools::projectPointOnLine( segmentStart, segmentEnd, globalIntersectionInDomain, &norm );
|
|
||||||
norm = cvf::Math::clamp( norm, 0.0, 1.0 );
|
norm = cvf::Math::clamp( norm, 0.0, 1.0 );
|
||||||
|
|
||||||
*firstSegmentIndex = segIndex;
|
*firstSegmentIndex = segIndex;
|
||||||
|
@ -147,10 +147,6 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
|
|||||||
|
|
||||||
MeshLinesAccumulator meshAcc( m_hexGrid.p() );
|
MeshLinesAccumulator meshAcc( m_hexGrid.p() );
|
||||||
|
|
||||||
cvf::BoundingBox gridBBox = m_hexGrid->boundingBox();
|
|
||||||
std::vector<size_t> cellDummy;
|
|
||||||
m_hexGrid->findIntersectingCells( cvf::BoundingBox( cvf::Vec3d::ZERO, cvf::Vec3d::ZERO ), &cellDummy );
|
|
||||||
|
|
||||||
m_usedSurfaceData = m_surfaceInView->surface()->surfaceData();
|
m_usedSurfaceData = m_surfaceInView->surface()->surfaceData();
|
||||||
|
|
||||||
const std::vector<cvf::Vec3d>& nativeVertices = m_usedSurfaceData->vertices();
|
const std::vector<cvf::Vec3d>& nativeVertices = m_usedSurfaceData->vertices();
|
||||||
|
@ -120,7 +120,6 @@ void RimFormationNames::updateConnectedViews()
|
|||||||
std::vector<RimCase*> objects;
|
std::vector<RimCase*> objects;
|
||||||
this->objectsWithReferringPtrFieldsOfType( objects );
|
this->objectsWithReferringPtrFieldsOfType( objects );
|
||||||
|
|
||||||
bool updatedTracks = false;
|
|
||||||
for ( RimCase* caseObj : objects )
|
for ( RimCase* caseObj : objects )
|
||||||
{
|
{
|
||||||
if ( caseObj )
|
if ( caseObj )
|
||||||
@ -135,7 +134,6 @@ void RimFormationNames::updateConnectedViews()
|
|||||||
if ( track->formationNamesCase() == caseObj )
|
if ( track->formationNamesCase() == caseObj )
|
||||||
{
|
{
|
||||||
track->loadDataAndUpdate();
|
track->loadDataAndUpdate();
|
||||||
updatedTracks = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -375,8 +375,7 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
{
|
{
|
||||||
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );
|
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );
|
||||||
|
|
||||||
RiaDefines::DepthTypeEnum depthType = RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH;
|
DerivedMDSource derivedMDSource = NO_SOURCE;
|
||||||
DerivedMDSource derivedMDSource = NO_SOURCE;
|
|
||||||
|
|
||||||
if ( isCurveVisible() )
|
if ( isCurveVisible() )
|
||||||
{
|
{
|
||||||
@ -384,8 +383,6 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
firstAncestorOrThisOfType( wellLogPlot );
|
firstAncestorOrThisOfType( wellLogPlot );
|
||||||
CVF_ASSERT( wellLogPlot );
|
CVF_ASSERT( wellLogPlot );
|
||||||
|
|
||||||
depthType = wellLogPlot->depthType();
|
|
||||||
|
|
||||||
RimWellRftPlot* rftPlot = dynamic_cast<RimWellRftPlot*>( wellLogPlot );
|
RimWellRftPlot* rftPlot = dynamic_cast<RimWellRftPlot*>( wellLogPlot );
|
||||||
bool showErrorBarsInObservedData = rftPlot ? rftPlot->showErrorBarsForObservedData() : false;
|
bool showErrorBarsInObservedData = rftPlot ? rftPlot->showErrorBarsForObservedData() : false;
|
||||||
m_showErrorBars = showErrorBarsInObservedData;
|
m_showErrorBars = showErrorBarsInObservedData;
|
||||||
|
@ -2484,11 +2484,6 @@ void RimWellLogTrack::updateResultPropertyNamesOnPlot()
|
|||||||
RimDepthTrackPlot* plot = nullptr;
|
RimDepthTrackPlot* plot = nullptr;
|
||||||
firstAncestorOrThisOfTypeAsserted( plot );
|
firstAncestorOrThisOfTypeAsserted( plot );
|
||||||
|
|
||||||
RimMainPlotCollection* mainPlotCollection;
|
|
||||||
this->firstAncestorOrThisOfTypeAsserted( mainPlotCollection );
|
|
||||||
|
|
||||||
RimWellLogPlotCollection* wellLogCollection = mainPlotCollection->wellLogPlotCollection();
|
|
||||||
|
|
||||||
RigEclipseWellLogExtractor* eclWellLogExtractor =
|
RigEclipseWellLogExtractor* eclWellLogExtractor =
|
||||||
RiaExtractionTools::wellLogExtractorEclipseCase( m_formationWellPathForSourceCase,
|
RiaExtractionTools::wellLogExtractorEclipseCase( m_formationWellPathForSourceCase,
|
||||||
dynamic_cast<RimEclipseCase*>( m_formationCase() ) );
|
dynamic_cast<RimEclipseCase*>( m_formationCase() ) );
|
||||||
|
@ -83,7 +83,6 @@ double RigGeoMechBoreHoleStressCalculator::solveBisection( double minPw, double
|
|||||||
minPw = largestNegativeValue.first;
|
minPw = largestNegativeValue.first;
|
||||||
double minPwFuncVal = largestNegativeValue.second;
|
double minPwFuncVal = largestNegativeValue.second;
|
||||||
maxPw = smallestPositiveValue.first;
|
maxPw = smallestPositiveValue.first;
|
||||||
double maxPwFuncVal = smallestPositiveValue.second;
|
|
||||||
|
|
||||||
double range = std::abs( maxPw - minPw );
|
double range = std::abs( maxPw - minPw );
|
||||||
|
|
||||||
@ -94,8 +93,7 @@ double RigGeoMechBoreHoleStressCalculator::solveBisection( double minPw, double
|
|||||||
double midPwFuncVal = ( this->*fn )( midPw, &theta );
|
double midPwFuncVal = ( this->*fn )( midPw, &theta );
|
||||||
if ( midPwFuncVal * minPwFuncVal < 0.0 )
|
if ( midPwFuncVal * minPwFuncVal < 0.0 )
|
||||||
{
|
{
|
||||||
maxPw = midPw;
|
maxPw = midPw;
|
||||||
maxPwFuncVal = midPwFuncVal;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,6 @@ RigTofWellDistributionCalculator::RigTofWellDistributionCalculator( RimEclipseRe
|
|||||||
|
|
||||||
for ( const auto& mapElement : tofToCellIndicesMap )
|
for ( const auto& mapElement : tofToCellIndicesMap )
|
||||||
{
|
{
|
||||||
const double tofValue = mapElement.first;
|
|
||||||
const std::vector<size_t>& cellIndicesArr = mapElement.second;
|
const std::vector<size_t>& cellIndicesArr = mapElement.second;
|
||||||
|
|
||||||
for ( size_t cellIndex : cellIndicesArr )
|
for ( size_t cellIndex : cellIndicesArr )
|
||||||
|
@ -278,8 +278,6 @@ double RigWellPathGeometryTools::solveForX( const QwtSpline& spline, double minX
|
|||||||
double c = b - ( b - a ) / phi;
|
double c = b - ( b - a ) / phi;
|
||||||
double d = a + ( b - a ) / phi;
|
double d = a + ( b - a ) / phi;
|
||||||
|
|
||||||
double fa = spline.value( a ) - y;
|
|
||||||
double fb = spline.value( b ) - y;
|
|
||||||
double fc = spline.value( c ) - y;
|
double fc = spline.value( c ) - y;
|
||||||
double fd = spline.value( d ) - y;
|
double fd = spline.value( d ) - y;
|
||||||
|
|
||||||
@ -293,7 +291,6 @@ double RigWellPathGeometryTools::solveForX( const QwtSpline& spline, double minX
|
|||||||
if ( std::fabs( fc ) < std::fabs( fd ) )
|
if ( std::fabs( fc ) < std::fabs( fd ) )
|
||||||
{
|
{
|
||||||
b = d;
|
b = d;
|
||||||
fb = fd;
|
|
||||||
d = c;
|
d = c;
|
||||||
fd = fc;
|
fd = fc;
|
||||||
c = b - ( b - a ) / phi;
|
c = b - ( b - a ) / phi;
|
||||||
@ -302,7 +299,6 @@ double RigWellPathGeometryTools::solveForX( const QwtSpline& spline, double minX
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
a = c;
|
a = c;
|
||||||
fa = fc;
|
|
||||||
c = d;
|
c = d;
|
||||||
fc = fd;
|
fc = fd;
|
||||||
d = a + ( b - a ) / phi;
|
d = a + ( b - a ) / phi;
|
||||||
|
@ -200,12 +200,6 @@ TEST( RifEclipseInputFileToolsTest, EquilData )
|
|||||||
&isStopParsingKeywordDetected,
|
&isStopParsingKeywordDetected,
|
||||||
includeStatementAbsolutePathPrefix );
|
includeStatementAbsolutePathPrefix );
|
||||||
EXPECT_EQ( (int)10, keywordContent.size() );
|
EXPECT_EQ( (int)10, keywordContent.size() );
|
||||||
|
|
||||||
for ( const auto& s : keywordContent )
|
|
||||||
{
|
|
||||||
RigEquil equilRec = RigEquil::parseString( s );
|
|
||||||
// qDebug() << s;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,6 @@ TEST( RigCellGeometryTools, calculateCellVolumeTest )
|
|||||||
corner.x() += 0.5 * bbox.extent().x();
|
corner.x() += 0.5 * bbox.extent().x();
|
||||||
tetrahedronBBox.add( corner );
|
tetrahedronBBox.add( corner );
|
||||||
}
|
}
|
||||||
overlapVertices;
|
|
||||||
RigCellGeometryTools::estimateHexOverlapWithBoundingBox( cornerVertices,
|
RigCellGeometryTools::estimateHexOverlapWithBoundingBox( cornerVertices,
|
||||||
tetrahedronBBox,
|
tetrahedronBBox,
|
||||||
&overlapVertices,
|
&overlapVertices,
|
||||||
|
@ -97,5 +97,5 @@ TEST( RigHexIntersectionTools, DISABLED_planeHexCellIntersectionPerformanceTest
|
|||||||
qDebug() << "Time rim elapsed: " << timeLocal.elapsed();
|
qDebug() << "Time rim elapsed: " << timeLocal.elapsed();
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Time total elapsed: " << timeTotal.elapsed();
|
qDebug() << "Time total elapsed: " << timeTotal.elapsed() << " intersected: " << static_cast<int>( isCellIntersected );
|
||||||
}
|
}
|
||||||
|
@ -867,10 +867,8 @@ void RiuQwtPlotWidget::recalculateAxisExtents( QwtPlot::Axis axis )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
caf::UiStyleSheet RiuQwtPlotWidget::createPlotStyleSheet() const
|
caf::UiStyleSheet RiuQwtPlotWidget::createPlotStyleSheet() const
|
||||||
{
|
{
|
||||||
QColor backgroundColor = QColor( "white" );
|
QColor backgroundColor = QColor( "white" );
|
||||||
QColor highlightColor = QApplication::palette().highlight().color();
|
QColor highlightColor = QApplication::palette().highlight().color();
|
||||||
QColor blendedHighlightColor = RiaColorTools::blendQColors( highlightColor, backgroundColor, 1, 20 );
|
|
||||||
QColor nearlyBackgroundColor = RiaColorTools::blendQColors( highlightColor, backgroundColor, 1, 40 );
|
|
||||||
|
|
||||||
caf::UiStyleSheet styleSheet;
|
caf::UiStyleSheet styleSheet;
|
||||||
styleSheet.set( "background-color", backgroundColor.name() );
|
styleSheet.set( "background-color", backgroundColor.name() );
|
||||||
|
@ -56,7 +56,6 @@ double RiuQwtScalePicker::axisValueAtPosition( const QwtScaleWidget* scale, cons
|
|||||||
// translate the position in a value on the scale
|
// translate the position in a value on the scale
|
||||||
|
|
||||||
double value = 0.0;
|
double value = 0.0;
|
||||||
int axis = -1;
|
|
||||||
|
|
||||||
const QwtScaleDraw* sd = scale->scaleDraw();
|
const QwtScaleDraw* sd = scale->scaleDraw();
|
||||||
switch ( scale->alignment() )
|
switch ( scale->alignment() )
|
||||||
@ -64,25 +63,21 @@ double RiuQwtScalePicker::axisValueAtPosition( const QwtScaleWidget* scale, cons
|
|||||||
case QwtScaleDraw::LeftScale:
|
case QwtScaleDraw::LeftScale:
|
||||||
{
|
{
|
||||||
value = sd->scaleMap().invTransform( pos.y() );
|
value = sd->scaleMap().invTransform( pos.y() );
|
||||||
axis = QwtPlot::yLeft;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QwtScaleDraw::RightScale:
|
case QwtScaleDraw::RightScale:
|
||||||
{
|
{
|
||||||
value = sd->scaleMap().invTransform( pos.y() );
|
value = sd->scaleMap().invTransform( pos.y() );
|
||||||
axis = QwtPlot::yRight;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QwtScaleDraw::BottomScale:
|
case QwtScaleDraw::BottomScale:
|
||||||
{
|
{
|
||||||
value = sd->scaleMap().invTransform( pos.x() );
|
value = sd->scaleMap().invTransform( pos.x() );
|
||||||
axis = QwtPlot::xBottom;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QwtScaleDraw::TopScale:
|
case QwtScaleDraw::TopScale:
|
||||||
{
|
{
|
||||||
value = sd->scaleMap().invTransform( pos.x() );
|
value = sd->scaleMap().invTransform( pos.x() );
|
||||||
axis = QwtPlot::xTop;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user