============ idCVarSystemLocal::Restart_f ============ */
| 1235 | ============ |
| 1236 | */ |
| 1237 | void idCVarSystemLocal::Restart_f( const idCmdArgs &args ) { |
| 1238 | int i, hash; |
| 1239 | idInternalCVar *cvar; |
| 1240 | |
| 1241 | for ( i = 0; i < localCVarSystem.cvars.Num(); i++ ) { |
| 1242 | cvar = localCVarSystem.cvars[i]; |
| 1243 | |
| 1244 | // don't mess with rom values |
| 1245 | if ( cvar->flags & ( CVAR_ROM | CVAR_INIT ) ) { |
| 1246 | continue; |
| 1247 | } |
| 1248 | |
| 1249 | // throw out any variables the user created |
| 1250 | if ( !( cvar->flags & CVAR_STATIC ) ) { |
| 1251 | hash = localCVarSystem.cvarHash.GenerateKey( cvar->nameString, false ); |
| 1252 | delete cvar; |
| 1253 | localCVarSystem.cvars.RemoveIndex( i ); |
| 1254 | localCVarSystem.cvarHash.RemoveIndex( hash, i ); |
| 1255 | i--; |
| 1256 | continue; |
| 1257 | } |
| 1258 | |
| 1259 | cvar->Reset(); |
| 1260 | } |
| 1261 | } |
nothing calls this directly
no test coverage detected