| 1491 | } |
| 1492 | |
| 1493 | void NotNested() { |
| 1494 | // If you hit this, you're trying to construct a Table/Vector/String |
| 1495 | // during the construction of its parent table (between the MyTableBuilder |
| 1496 | // and table.Finish(). |
| 1497 | // Move the creation of these sub-objects to above the MyTableBuilder to |
| 1498 | // not get this assert. |
| 1499 | // Ignoring this assert may appear to work in simple cases, but the reason |
| 1500 | // it is here is that storing objects in-line may cause vtable offsets |
| 1501 | // to not fit anymore. It also leads to vtable duplication. |
| 1502 | FLATBUFFERS_ASSERT(!nested); |
| 1503 | // If you hit this, fields were added outside the scope of a table. |
| 1504 | FLATBUFFERS_ASSERT(!num_field_loc); |
| 1505 | } |
| 1506 | |
| 1507 | // From generated code (or from the parser), we call StartTable/EndTable |
| 1508 | // with a sequence of AddElement calls in between. |
no outgoing calls
no test coverage detected