635 if (tokens.size() != N) \ |
635 if (tokens.size() != N) \ |
636 return new LDError (line, "Bad amount of tokens"); |
636 return new LDError (line, "Bad amount of tokens"); |
637 |
637 |
638 #define CHECK_TOKEN_NUMBERS(MIN, MAX) \ |
638 #define CHECK_TOKEN_NUMBERS(MIN, MAX) \ |
639 for (int i = MIN; i <= MAX; ++i) \ |
639 for (int i = MIN; i <= MAX; ++i) \ |
640 if (!isNumber (tokens[i])) \ |
640 if (!numeric (tokens[i])) \ |
641 return new LDError (line, fmt ("Token #%1 was `%2`, expected a number", (i + 1), tokens[i])); |
641 return new LDError (line, fmt ("Token #%1 was `%2`, expected a number", (i + 1), tokens[i])); |
642 |
642 |
643 // ============================================================================= |
643 // ============================================================================= |
644 // ----------------------------------------------------------------------------- |
644 // ----------------------------------------------------------------------------- |
645 static vertex parseVertex (QStringList& s, const int n) |
645 static vertex parseVertex (QStringList& s, const int n) |
646 { vertex v; |
646 { vertex v; |
647 |
647 |
648 for (const Axis ax : g_Axes) |
648 for (const Axis ax : g_Axes) |
649 v[ax] = atof (s[n + ax]); |
649 v[ax] = s[n + ax].toDouble(); |
650 |
650 |
651 return v; |
651 return v; |
652 } |
652 } |
653 |
653 |
654 // ============================================================================= |
654 // ============================================================================= |