MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / ParseAlignAttribute

Method ParseAlignAttribute

native/thirdpart/flatbuffers/idl_parser.cpp:1495–1510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1493}
1494
1495CheckedError Parser::ParseAlignAttribute(const std::string &align_constant,
1496 size_t min_align, size_t *align) {
1497 // Use uint8_t to avoid problems with size_t==`unsigned long` on LP64.
1498 uint8_t align_value;
1499 if (StringToNumber(align_constant.c_str(), &align_value) &&
1500 VerifyAlignmentRequirements(static_cast<size_t>(align_value),
1501 min_align)) {
1502 *align = align_value;
1503 return NoError();
1504 }
1505 return Error("unexpected force_align value '" + align_constant +
1506 "', alignment must be a power of two integer ranging from the "
1507 "type\'s natural alignment " +
1508 NumToString(min_align) + " to " +
1509 NumToString(FLATBUFFERS_MAX_ALIGNMENT));
1510}
1511
1512CheckedError Parser::ParseVector(const Type &type, uoffset_t *ovalue,
1513 FieldDef *field, size_t fieldn) {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected