| 1363 | } |
| 1364 | |
| 1365 | void WriteDouble(double f, uint8_t byte_width) { |
| 1366 | switch (byte_width) { |
| 1367 | case 8: Write(f, byte_width); break; |
| 1368 | case 4: Write(static_cast<float>(f), byte_width); break; |
| 1369 | // case 2: Write(static_cast<half>(f), byte_width); break; |
| 1370 | // case 1: Write(static_cast<quarter>(f), byte_width); break; |
| 1371 | default: FLATBUFFERS_ASSERT(0); |
| 1372 | } |
| 1373 | } |
| 1374 | |
| 1375 | void WriteOffset(uint64_t o, uint8_t byte_width) { |
| 1376 | auto reloff = buf_.size() - o; |