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:
@@ -27,13 +27,14 @@
|
||||
#include <QStringList>
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifCaseRealizationReader::RifCaseRealizationReader( const QString& fileName )
|
||||
{
|
||||
m_parameters = std::shared_ptr<RigCaseRealizationParameters>( new RigCaseRealizationParameters() );
|
||||
m_parameters = std::make_shared<RigCaseRealizationParameters>();
|
||||
m_fileName = fileName;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <QDateTime>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <memory>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -56,7 +57,7 @@ bool RifColumnBasedUserData::parse( const QString& data, QString* errorText )
|
||||
m_mapFromAddressToTimeStepIndex.clear();
|
||||
m_mapFromAddressToResultIndex.clear();
|
||||
|
||||
m_parser = std::unique_ptr<RifColumnBasedUserDataParser>( new RifColumnBasedUserDataParser( data, errorText ) );
|
||||
m_parser = std::make_unique<RifColumnBasedUserDataParser>( data, errorText );
|
||||
if ( !m_parser )
|
||||
{
|
||||
RiaLogging::error( QString( "Failed to parse file" ) );
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <QDateTime>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <memory>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -54,7 +55,7 @@ bool RifCsvUserData::parse( const QString& fileName, const RifAsciiDataParseOpti
|
||||
m_allResultAddresses.clear();
|
||||
m_mapFromAddressToResultIndex.clear();
|
||||
|
||||
m_parser = std::unique_ptr<RifCsvUserDataFileParser>( new RifCsvUserDataFileParser( fileName, errorText ) );
|
||||
m_parser = std::make_unique<RifCsvUserDataFileParser>( fileName, errorText );
|
||||
if ( !m_parser->parse( parseOptions ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Failed to parse file" ) );
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <QFile>
|
||||
#include <QStringList>
|
||||
#include <QTextStream>
|
||||
#include <memory>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -54,7 +55,7 @@ bool RifKeywordVectorUserData::parse( const QString& data, const QString& custom
|
||||
m_allResultAddresses.clear();
|
||||
m_timeSteps.clear();
|
||||
|
||||
m_parser = std::unique_ptr<RifKeywordVectorParser>( new RifKeywordVectorParser( data ) );
|
||||
m_parser = std::make_unique<RifKeywordVectorParser>( data );
|
||||
if ( !m_parser )
|
||||
{
|
||||
RiaLogging::error( QString( "Failed to parse file" ) );
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <QDateTime>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <memory>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -68,7 +69,7 @@ bool RifRevealCsvSectionSummaryReader::parse( const QString&
|
||||
parseOptions.timeSeriesColumnName = "Date";
|
||||
parseOptions.defaultCategory = defaultCategory;
|
||||
|
||||
m_parser = std::unique_ptr<RifCsvUserDataPastedTextParser>( new RifCsvUserDataPastedTextParser( text, errorText ) );
|
||||
m_parser = std::make_unique<RifCsvUserDataPastedTextParser>( text, errorText );
|
||||
std::map<QString, std::pair<QString, double>> unitMapping = { { "Sm3", { "SM3", 1.0 } },
|
||||
{ "Sm3/day", { "SM3/DAY", 1.0 } },
|
||||
{ "Sm3/day/bar", { "SM3/DAY/BAR", 1.0 } },
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <QDateTime>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <memory>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -76,7 +77,7 @@ std::pair<bool, QString> RifStimPlanCsvSummaryReader::parse( const QString& file
|
||||
parseOptions.timeSeriesColumnName = "Time";
|
||||
parseOptions.startDateTime = startDateTime;
|
||||
|
||||
m_parser = std::unique_ptr<RifCsvUserDataPastedTextParser>( new RifCsvUserDataPastedTextParser( fileContents, errorText ) );
|
||||
m_parser = std::make_unique<RifCsvUserDataPastedTextParser>( fileContents, errorText );
|
||||
|
||||
if ( !m_parser->parse( parseOptions ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user