| 1682 | } |
| 1683 | |
| 1684 | CheckedError Parser::ParseAlignAttribute(const std::string &align_constant, |
| 1685 | size_t min_align, size_t *align) { |
| 1686 | // Use uint8_t to avoid problems with size_t==`unsigned long` on LP64. |
| 1687 | uint8_t align_value; |
| 1688 | if (StringToNumber(align_constant.c_str(), &align_value) && |
| 1689 | VerifyAlignmentRequirements(static_cast<size_t>(align_value), |
| 1690 | min_align)) { |
| 1691 | *align = align_value; |
| 1692 | return NoError(); |
| 1693 | } |
| 1694 | return Error("unexpected force_align value '" + align_constant + |
| 1695 | "', alignment must be a power of two integer ranging from the " |
| 1696 | "type\'s natural alignment " + |
| 1697 | NumToString(min_align) + " to " + |
| 1698 | NumToString(FLATBUFFERS_MAX_ALIGNMENT)); |
| 1699 | } |
| 1700 | |
| 1701 | CheckedError Parser::ParseVector(const Type &vector_type, uoffset_t *ovalue, |
| 1702 | FieldDef *field, size_t fieldn) { |
nothing calls this directly
no test coverage detected