testqbsp: clean up clearing of data between tests

This commit is contained in:
Eric Wasylishen 2022-10-22 19:38:45 -06:00
parent a950d2fcb7
commit 9ff0752ad1
2 changed files with 3 additions and 5 deletions

View File

@ -1215,9 +1215,6 @@ void InitQBSP(int argc, const char **argv)
// In case we're launched more than once, in testqbsp
map.reset();
qbsp_options.reset();
// fixme-brushbsp: clear any other members of qbsp_settings
qbsp_options.target_game = nullptr;
qbsp_options.target_version = nullptr;
qbsp_options.run(argc, argv);

View File

@ -39,11 +39,12 @@ const mapface_t *Mapbrush_FirstFaceWithTextureName(const mapbrush_t &brush, cons
mapentity_t &LoadMap(const char *map)
{
::map.reset();
qbsp_options.reset();
qbsp_options.target_version = &bspver_q1;
qbsp_options.target_game = qbsp_options.target_version->game;
::map.entities.clear();
parser_t parser(map, { doctest::getContextOptions()->currentTest->m_name });
mapentity_t &entity = ::map.entities.emplace_back();