MCPcopy Create free account
hub / github.com/catboost/catboost / ParseAlignAttribute

Method ParseAlignAttribute

contrib/libs/flatbuffers/src/idl_parser.cpp:1684–1699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1682}
1683
1684CheckedError 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
1701CheckedError Parser::ParseVector(const Type &vector_type, uoffset_t *ovalue,
1702 FieldDef *field, size_t fieldn) {

Callers

nothing calls this directly

Calls 6

StringToNumberFunction · 0.85
NoErrorFunction · 0.85
NumToStringFunction · 0.85
ErrorFunction · 0.70
c_strMethod · 0.45

Tested by

no test coverage detected