| 1006 | } |
| 1007 | |
| 1008 | void Value::releasePayload() { |
| 1009 | switch (type()) { |
| 1010 | case nullValue: |
| 1011 | case intValue: |
| 1012 | case uintValue: |
| 1013 | case realValue: |
| 1014 | case booleanValue: |
| 1015 | break; |
| 1016 | case stringValue: |
| 1017 | if (isAllocated()) |
| 1018 | releasePrefixedStringValue(value_.string_); |
| 1019 | break; |
| 1020 | case arrayValue: |
| 1021 | case objectValue: |
| 1022 | delete value_.map_; |
| 1023 | break; |
| 1024 | default: |
| 1025 | JSON_ASSERT_UNREACHABLE; |
| 1026 | } |
| 1027 | } |
| 1028 | |
| 1029 | void Value::dupMeta(const Value& other) { |
| 1030 | comments_ = other.comments_; |
nothing calls this directly
no test coverage detected