mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixes by clang-tidy
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
#include <QMenu>
|
||||
#include <QResizeEvent>
|
||||
#include <QVBoxLayout>
|
||||
#include <memory>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -83,7 +84,7 @@ RiuGridCrossQwtPlot::RiuGridCrossQwtPlot( RimGridCrossPlot* plot, QWidget* paren
|
||||
SIGNAL( plotItemSelected( std::shared_ptr<RiuPlotItem>, bool, int ) ),
|
||||
SLOT( onPlotItemSelected( std::shared_ptr<RiuPlotItem>, bool, int ) ) );
|
||||
|
||||
m_annotationTool = std::unique_ptr<RiuPlotAnnotationTool>( new RiuPlotAnnotationTool() );
|
||||
m_annotationTool = std::make_unique<RiuPlotAnnotationTool>();
|
||||
m_selectedPointMarker = new QwtPlotMarker;
|
||||
|
||||
// QwtPlotMarker takes ownership of the symbol, it is deleted in destructor of QwtPlotMarker
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
#include <cafDisplayCoordTransform.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
@@ -206,24 +207,22 @@ void RiuSelectionChangedHandler::addResultCurveFromSelectionItem( const RiuGeoMe
|
||||
|
||||
if ( geomSelectionItem->m_hasIntersectionTriangle )
|
||||
{
|
||||
timeHistResultAccessor = std::unique_ptr<RiuFemTimeHistoryResultAccessor>(
|
||||
new RiuFemTimeHistoryResultAccessor( geomResDef->geoMechCase()->geoMechData(),
|
||||
geomResDef->resultAddress(),
|
||||
geomSelectionItem->m_gridIndex,
|
||||
static_cast<int>( geomSelectionItem->m_cellIndex ),
|
||||
geomSelectionItem->m_elementFace,
|
||||
intersectionPointInDomain,
|
||||
geomSelectionItem->m_intersectionTriangle ) );
|
||||
timeHistResultAccessor = std::make_unique<RiuFemTimeHistoryResultAccessor>( geomResDef->geoMechCase()->geoMechData(),
|
||||
geomResDef->resultAddress(),
|
||||
geomSelectionItem->m_gridIndex,
|
||||
static_cast<int>( geomSelectionItem->m_cellIndex ),
|
||||
geomSelectionItem->m_elementFace,
|
||||
intersectionPointInDomain,
|
||||
geomSelectionItem->m_intersectionTriangle );
|
||||
}
|
||||
else
|
||||
{
|
||||
timeHistResultAccessor = std::unique_ptr<RiuFemTimeHistoryResultAccessor>(
|
||||
new RiuFemTimeHistoryResultAccessor( geomResDef->geoMechCase()->geoMechData(),
|
||||
geomResDef->resultAddress(),
|
||||
geomSelectionItem->m_gridIndex,
|
||||
static_cast<int>( geomSelectionItem->m_cellIndex ),
|
||||
geomSelectionItem->m_elementFace,
|
||||
intersectionPointInDomain ) );
|
||||
timeHistResultAccessor = std::make_unique<RiuFemTimeHistoryResultAccessor>( geomResDef->geoMechCase()->geoMechData(),
|
||||
geomResDef->resultAddress(),
|
||||
geomSelectionItem->m_gridIndex,
|
||||
static_cast<int>( geomSelectionItem->m_cellIndex ),
|
||||
geomSelectionItem->m_elementFace,
|
||||
intersectionPointInDomain );
|
||||
}
|
||||
|
||||
QString curveName;
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
#include <QWheelEvent>
|
||||
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
static RimEnsembleCurveInfoTextProvider ensembleCurveInfoTextProvider;
|
||||
|
||||
@@ -105,7 +106,7 @@ RiuSummaryQwtPlot::RiuSummaryQwtPlot( RimSummaryPlot* plot, QWidget* parent /*=
|
||||
// Do not set internal legends visible, as this will cause a performance hit.
|
||||
m_plotWidget->clearLegend();
|
||||
|
||||
m_annotationTool = std::unique_ptr<RiuPlotAnnotationTool>( new RiuPlotAnnotationTool() );
|
||||
m_annotationTool = std::make_unique<RiuPlotAnnotationTool>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <memory>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -37,7 +38,7 @@
|
||||
RiuSummaryVectorSelectionDialog::RiuSummaryVectorSelectionDialog( QWidget* parent )
|
||||
: QDialog( parent, RiuTools::defaultDialogFlags() )
|
||||
{
|
||||
m_addrSelWidget = std::unique_ptr<RiuSummaryVectorSelectionWidgetCreator>( new RiuSummaryVectorSelectionWidgetCreator() );
|
||||
m_addrSelWidget = std::make_unique<RiuSummaryVectorSelectionWidgetCreator>();
|
||||
QWidget* addrWidget = m_addrSelWidget->getOrCreateWidget( this );
|
||||
|
||||
QVBoxLayout* mainLayout = new QVBoxLayout( this );
|
||||
|
||||
@@ -29,13 +29,14 @@
|
||||
#include <QBoxLayout>
|
||||
#include <QFrame>
|
||||
#include <QSplitter>
|
||||
#include <memory>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuSummaryVectorSelectionWidgetCreator::RiuSummaryVectorSelectionWidgetCreator()
|
||||
{
|
||||
m_summaryAddressSelection = std::unique_ptr<RiuSummaryVectorSelectionUi>( new RiuSummaryVectorSelectionUi() );
|
||||
m_summaryAddressSelection = std::make_unique<RiuSummaryVectorSelectionUi>();
|
||||
|
||||
setPdmObject( m_summaryAddressSelection.get() );
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <QLabel>
|
||||
#include <memory>
|
||||
|
||||
using cvf::ManipulatorTrackball;
|
||||
|
||||
@@ -1321,7 +1322,7 @@ void RiuViewer::showScaleLegend( bool show )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::setHoverCursor( const QCursor& cursor )
|
||||
{
|
||||
s_hoverCursor.reset( new QCursor( cursor ) );
|
||||
s_hoverCursor = std::make_unique<QCursor>( cursor );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user