From 9ff0752ad1cef32016a11bfc50b6361568340016 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sat, 22 Oct 2022 19:38:45 -0600 Subject: [PATCH] testqbsp: clean up clearing of data between tests --- qbsp/qbsp.cc | 3 --- tests/test_qbsp.cc | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index 8cbe2b1a..9839fcea 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -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); diff --git a/tests/test_qbsp.cc b/tests/test_qbsp.cc index ed219c77..78fd1d10 100644 --- a/tests/test_qbsp.cc +++ b/tests/test_qbsp.cc @@ -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();