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

Method writeFloat

Fleece/Core/Encoder.cc:283–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281 }
282
283 void Encoder::writeFloat(float n) {
284 throwIf(std::isnan(n), InvalidData, "Can't write NaN");
285#if 0 // Perhaps an option in the future?
286 if (isIntRepresentable(n))
287 writeInt((int32_t)n);
288 else
289#endif
290 _writeFloat(n);
291 }
292
293 void Encoder::_writeFloat(float n) {
294 endian::littleEndianFloat swapped = n;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected