#2434 Eclipse input property: fix import for keywords without data

Keywords without data does not have a trailing '/'.
This commit is contained in:
Kristian Bendiksen
2022-05-25 13:55:13 +02:00
committed by Magne Sjaastad
parent a47edd4fa6
commit 53af120f39
2 changed files with 37 additions and 0 deletions

View File

@@ -88,6 +88,11 @@ std::pair<std::string, std::vector<float>>
{
std::vector<float> values;
auto isKeywordWithoutData = []( const std::string& keyword ) {
std::vector<std::string> keywords = { "ECHO", "NOECHO" };
return std::find( keywords.begin(), keywords.end(), keyword ) != keywords.end();
};
const auto commentChar = '-';
const auto commentString = "--";
@@ -133,7 +138,9 @@ std::pair<std::string, std::vector<float>>
{
keywordName = line;
if ( keywordName == "FAULTS" ) isFaultKeyword = true;
if ( isKeywordWithoutData( keywordName ) ) isEndTokenKeywordRead = true;
}
continue;
}