| 474 | // Convenient helper function to get the length of any vector, regardless |
| 475 | // of whether it is null or not (the field is not set). |
| 476 | template<typename T> static inline size_t VectorLength(const Vector<T> *v) { |
| 477 | return v ? v->size() : 0; |
| 478 | } |
| 479 | |
| 480 | // This is used as a helper type for accessing arrays. |
| 481 | template<typename T, uint16_t length> class Array { |