| 1373 | } |
| 1374 | |
| 1375 | void WriteDouble(double f, uint8_t byte_width) { |
| 1376 | switch (byte_width) { |
| 1377 | case 8: Write(f, byte_width); break; |
| 1378 | case 4: Write(static_cast<float>(f), byte_width); break; |
| 1379 | // case 2: Write(static_cast<half>(f), byte_width); break; |
| 1380 | // case 1: Write(static_cast<quarter>(f), byte_width); break; |
| 1381 | default: FLATBUFFERS_ASSERT(0); |
| 1382 | } |
| 1383 | } |
| 1384 | |
| 1385 | void WriteOffset(uint64_t o, uint8_t byte_width) { |
| 1386 | auto reloff = buf_.size() - o; |