| 63 | namespace { |
| 64 | |
| 65 | void checkTokenCount(const TokenList &tok, unsigned int expectedCount) { |
| 66 | ai_assert(expectedCount >= 2); |
| 67 | if (tok.size() < expectedCount) { |
| 68 | const std::string &s = ParseTokenAsString(*tok[1]); |
| 69 | if (tok[1]->IsBinary()) { |
| 70 | throw DeadlyImportError("Not enough tokens for property of type ", s, " at offset ", tok[1]->Offset()); |
| 71 | } else { |
| 72 | throw DeadlyImportError("Not enough tokens for property of type ", s, " at line ", tok[1]->Line()); |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | // ------------------------------------------------------------------------------------------------ |
| 78 | // read a typed property out of a FBX element. The return value is nullptr if the property cannot be read. |
no test coverage detected