| 153 | } |
| 154 | |
| 155 | void SetAnyValueS(reflection::BaseType type, uint8_t *data, const char *val) { |
| 156 | switch (type) { |
| 157 | case reflection::Float: |
| 158 | case reflection::Double: { |
| 159 | double d; |
| 160 | StringToNumber(val, &d); |
| 161 | SetAnyValueF(type, data, d); |
| 162 | break; |
| 163 | } |
| 164 | // TODO: support strings. |
| 165 | default: SetAnyValueI(type, data, StringToInt(val)); break; |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | // Resize a FlatBuffer in-place by iterating through all offsets in the buffer |
| 170 | // and adjusting them by "delta" if they straddle the start offset. |
no test coverage detected