| 188 | } |
| 189 | |
| 190 | void MigrateSetting(config_t *from, config_t *to, const char *section, const char *name) |
| 191 | { |
| 192 | if (!config_has_user_value(from, section, name)) |
| 193 | return; |
| 194 | |
| 195 | if (ConfigTypeMap.count(name) == 0) |
| 196 | return; |
| 197 | |
| 198 | const enum ObsConfigType type = ConfigTypeMap[name]; |
| 199 | |
| 200 | switch (type) { |
| 201 | case OBS_CONFIG_STRING: |
| 202 | config_set_string(to, section, name, config_get_string(from, section, name)); |
| 203 | |
| 204 | break; |
| 205 | case OBS_CONFIG_BOOL: |
| 206 | config_set_bool(to, section, name, config_get_bool(from, section, name)); |
| 207 | break; |
| 208 | } |
| 209 | config_remove_value(from, section, name); |
| 210 | obs_log(LOG_INFO, "config: migrated configuration setting %s", name); |
| 211 | } |
| 212 | |
| 213 | Config::Config() |
| 214 | : OutputEnabled(false), |
no outgoing calls
no test coverage detected