| 432 | // Convenient helper function to get the length of any vector, regardless |
| 433 | // of whether it is null or not (the field is not set). |
| 434 | template<typename T> static inline size_t VectorLength(const Vector<T> *v) { |
| 435 | return v ? v->size() : 0; |
| 436 | } |
| 437 | |
| 438 | // This is used as a helper type for accessing arrays. |
| 439 | template<typename T, uint16_t length> class Array { |