| 53 | slice Leaf::keyString() const {return derefValue(_keyOffset).asString();} |
| 54 | |
| 55 | uint32_t Leaf::writeTo(Encoder &enc, bool writeKey) const { |
| 56 | if (enc.base().containsAddress(this)) { |
| 57 | auto pos = int32_t((char*)this - (char*)enc.base().end()); |
| 58 | return pos - (writeKey ? _keyOffset : _valueOffset); |
| 59 | } else { |
| 60 | if (writeKey) |
| 61 | enc.writeValue(key()); |
| 62 | else |
| 63 | enc.writeValue(value()); |
| 64 | return (uint32_t)enc.finishItem(); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | void Leaf::dump(std::ostream &out, unsigned indent) const { |
| 69 | char hashStr[30]; |
nothing calls this directly
no test coverage detected