MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / Read

Method Read

modules/engine/runtime/serde/binary/reader.cpp:219–230  ·  view source on GitHub ↗

primitive types

Source from the content-addressed store, hash-verified

217{
218// primitive types
219int ReadTrait<bool>::Read(skr_binary_reader_t* reader, bool& value)
220{
221 uint32_t v;
222 int ret = ReadTrait<uint32_t>::Read(reader, v);
223 if (ret != 0)
224 {
225 SKR_LOG_FATAL(u8"failed to read boolean value! ret code: %d", ret);
226 return ret;
227 }
228 value = v != 0;
229 return ret;
230}
231int ReadTrait<int8_t>::Read(skr_binary_reader_t* reader, int8_t& value)
232{
233 return reader->read(&value, sizeof(value));

Callers

nothing calls this directly

Calls 13

ReadBitpackedFunction · 0.85
ReadBytesFunction · 0.85
ReadBlobFunction · 0.85
set_guidMethod · 0.80
ReadFunction · 0.50
StringClass · 0.50
readMethod · 0.45
getMethod · 0.45
add_refcountMethod · 0.45
resize_defaultMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected