RawKeyword::isTerminator uses is_separator
This commit is contained in:
@@ -103,16 +103,13 @@ namespace Opm {
|
||||
}
|
||||
}
|
||||
|
||||
bool RawKeyword::isTerminator(std::string line) {
|
||||
boost::algorithm::trim_left( line );
|
||||
if (line[0] == RawConsts::slash) {
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
bool RawKeyword::isTerminator( const std::string& line ) {
|
||||
auto fst = std::find_if_not( line.begin(), line.end(),
|
||||
RawConsts::is_separator );
|
||||
return fst != line.end() && *fst == RawConsts::slash;
|
||||
}
|
||||
|
||||
|
||||
|
||||
RawRecordPtr RawKeyword::getRecord(size_t index) const {
|
||||
if (index < m_records.size()) {
|
||||
return m_records[index];
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Opm {
|
||||
std::shared_ptr< RawRecord > getRecord(size_t index) const;
|
||||
|
||||
static bool isKeywordPrefix(const std::string& line, std::string& keywordName);
|
||||
static bool isTerminator(std::string line);
|
||||
static bool isTerminator( const std::string& line );
|
||||
|
||||
|
||||
bool isPartialRecordStringEmpty() const;
|
||||
|
||||
Reference in New Issue
Block a user