MCPcopy Create free account
hub / github.com/apache/fory / read_float

Method read_float

cpp/fory/util/buffer.h:963–970  ·  view source on GitHub ↗

Read float value from buffer. Sets error on bounds violation.

Source from the content-addressed store, hash-verified

961
962 /// Read float value from buffer. Sets error on bounds violation.
963 FORY_ALWAYS_INLINE float read_float(Error &error) {
964 if (FORY_PREDICT_FALSE(!ensure_readable(4, error))) {
965 return 0.0f;
966 }
967 float value = load_unaligned<float>(data_ + reader_index_);
968 reader_index_ += 4;
969 return value;
970 }
971
972 /// Read double value from buffer. Sets error on bounds violation.
973 FORY_ALWAYS_INLINE double read_double(Error &error) {

Callers 2

test_bufferFunction · 0.95
test_bufferFunction · 0.95

Calls

no outgoing calls

Tested by 2

test_bufferFunction · 0.76
test_bufferFunction · 0.76