| 197 | |
| 198 | template <typename T> |
| 199 | void EmitterState::_Set(Setting<T>& fmt, T value, FmtScope::value scope) { |
| 200 | switch (scope) { |
| 201 | case FmtScope::Local: |
| 202 | m_modifiedSettings.push(fmt.set(value)); |
| 203 | break; |
| 204 | case FmtScope::Global: |
| 205 | fmt.set(value); |
| 206 | m_globalModifiedSettings.push( |
| 207 | fmt.set(value)); // this pushes an identity set, so when we restore, |
| 208 | // it restores to the value here, and not the previous one |
| 209 | break; |
| 210 | default: |
| 211 | assert(false); |
| 212 | } |
| 213 | } |
| 214 | } // namespace YAML |
| 215 | |
| 216 | #endif // EMITTERSTATE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 |