MCPcopy Create free account
hub / github.com/couchbase/fleece / _writeFloat

Method _writeFloat

Fleece/Core/Encoder.cc:293–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291 }
292
293 void Encoder::_writeFloat(float n) {
294 endian::littleEndianFloat swapped = n;
295 auto buf = placeValue<false>(kFloatTag, 0, 2 + sizeof(swapped));
296 buf[1] = 0;
297 memcpy(&buf[2], &swapped, sizeof(swapped));
298 }
299
300#if 0
301 bool Encoder::isIntRepresentable(float n) noexcept {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected