mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4683 clang-format on all files in ApplicationCode
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017- Statoil ASA
|
||||
//
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -24,17 +24,16 @@
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifKeywordVectorParser::RifKeywordVectorParser(const QString& data)
|
||||
RifKeywordVectorParser::RifKeywordVectorParser( const QString& data )
|
||||
{
|
||||
parseData(data);
|
||||
parseData( data );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<KeywordBasedVector>& RifKeywordVectorParser::keywordBasedVectors() const
|
||||
{
|
||||
@@ -42,22 +41,22 @@ const std::vector<KeywordBasedVector>& RifKeywordVectorParser::keywordBasedVecto
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifKeywordVectorParser::canBeParsed(const QString& data)
|
||||
bool RifKeywordVectorParser::canBeParsed( const QString& data )
|
||||
{
|
||||
std::stringstream streamData;
|
||||
streamData.str(data.toStdString());
|
||||
streamData.str( data.toStdString() );
|
||||
std::string line;
|
||||
std::getline(streamData, line);
|
||||
std::getline( streamData, line );
|
||||
|
||||
while (streamData.good())
|
||||
while ( streamData.good() )
|
||||
{
|
||||
if (RifEclipseUserDataParserTools::isAComment(line))
|
||||
if ( RifEclipseUserDataParserTools::isAComment( line ) )
|
||||
{
|
||||
std::getline(streamData, line);
|
||||
std::getline( streamData, line );
|
||||
}
|
||||
else if (line.find("VECTOR") == 0)
|
||||
else if ( line.find( "VECTOR" ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -70,33 +69,33 @@ bool RifKeywordVectorParser::canBeParsed(const QString& data)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifKeywordVectorParser::parseData(const QString& data)
|
||||
void RifKeywordVectorParser::parseData( const QString& data )
|
||||
{
|
||||
std::stringstream streamData;
|
||||
streamData.str(data.toStdString());
|
||||
streamData.str( data.toStdString() );
|
||||
std::string line;
|
||||
std::getline(streamData, line);
|
||||
std::getline( streamData, line );
|
||||
|
||||
do
|
||||
do
|
||||
{
|
||||
while (RifEclipseUserDataParserTools::isLineSkippable(line) && !streamData.eof())
|
||||
while ( RifEclipseUserDataParserTools::isLineSkippable( line ) && !streamData.eof() )
|
||||
{
|
||||
std::getline(streamData, line);
|
||||
std::getline( streamData, line );
|
||||
}
|
||||
|
||||
KeywordBasedVector keywordBasedVector;
|
||||
keywordBasedVector.header = RifEclipseUserDataParserTools::headerReader(streamData, line);
|
||||
if (keywordBasedVector.header.empty()) break;
|
||||
keywordBasedVector.header = RifEclipseUserDataParserTools::headerReader( streamData, line );
|
||||
if ( keywordBasedVector.header.empty() ) break;
|
||||
|
||||
while (RifEclipseUserDataParserTools::isANumber(line))
|
||||
while ( RifEclipseUserDataParserTools::isANumber( line ) )
|
||||
{
|
||||
keywordBasedVector.values.push_back(RiaStdStringTools::toDouble(line));
|
||||
std::getline(streamData, line);
|
||||
keywordBasedVector.values.push_back( RiaStdStringTools::toDouble( line ) );
|
||||
std::getline( streamData, line );
|
||||
}
|
||||
|
||||
m_keywordBasedVectors.push_back(keywordBasedVector);
|
||||
m_keywordBasedVectors.push_back( keywordBasedVector );
|
||||
|
||||
} while (!streamData.eof());
|
||||
} while ( !streamData.eof() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user