ENH: make token constructors explicit (issue #563)

- access tokenType enum values more consistently.
This commit is contained in:
Mark Olesen
2017-08-10 11:53:37 +02:00
parent c847d343af
commit 37e863521a
11 changed files with 284 additions and 198 deletions

View File

@ -89,11 +89,7 @@ int main(int argc, char *argv[])
break;
}
if
(
fieldName.type() != token::WORD
&& fieldName.wordToken() != "CELL"
)
if (!fieldName.isWord() || fieldName.wordToken() != "CELL")
{
FatalErrorInFunction
<< "Expected first CELL, found "
@ -103,7 +99,7 @@ int main(int argc, char *argv[])
label nCols = 0;
smapFile >> fieldName;
while (fieldName.type() == token::WORD)
while (fieldName.isWord())
{
starFieldNames[nCols++] = fieldName.wordToken();
smapFile >> fieldName;