MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / deserialize

Method deserialize

proto/enums_final_models.cpp:1295–1308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1293}
1294
1295size_t EnumsFinalModel::deserialize(::enums::Enums& value) const noexcept
1296{
1297 assert(((this->buffer().offset() + _model.fbe_offset()) <= this->buffer().size()) && "Model is broken!");
1298 if ((this->buffer().offset() + _model.fbe_offset()) > this->buffer().size())
1299 return 0;
1300
1301 size_t fbe_struct_size = *((const uint32_t*)(this->buffer().data() + this->buffer().offset() + _model.fbe_offset() - 8));
1302 size_t fbe_struct_type = *((const uint32_t*)(this->buffer().data() + this->buffer().offset() + _model.fbe_offset() - 4));
1303 assert(((fbe_struct_size > 0) && (fbe_struct_type == fbe_type())) && "Model is broken!");
1304 if ((fbe_struct_size == 0) || (fbe_struct_type != fbe_type()))
1305 return 8;
1306
1307 return 8 + _model.get(value);
1308}
1309
1310} // namespace enums
1311

Callers

nothing calls this directly

Calls 6

offsetMethod · 0.45
bufferMethod · 0.45
fbe_offsetMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected