From c4596605dfba62ff1bd9b1c72684d1c487ef9542 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 2 Mar 2009 15:32:59 -0500 Subject: BUG: Fix coverage handler initialization This resets coverage handler internal state on initialization so that multiple coverage runs are independent. --- Source/CTest/cmCTestCoverageHandler.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 678ec75..751457f 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -152,7 +152,10 @@ cmCTestCoverageHandler::cmCTestCoverageHandler() void cmCTestCoverageHandler::Initialize() { this->Superclass::Initialize(); - this->CustomCoverageExclude.empty(); + this->CustomCoverageExclude.clear(); + this->SourceLabels.clear(); + this->LabelIdMap.clear(); + this->Labels.clear(); } //---------------------------------------------------------------------- @@ -346,7 +349,7 @@ int cmCTestCoverageHandler::ProcessHandler() cont.OFS = &ofs; // setup the regex exclude stuff - this->CustomCoverageExcludeRegex.empty(); + this->CustomCoverageExcludeRegex.clear(); std::vector::iterator rexIt; for ( rexIt = this->CustomCoverageExclude.begin(); rexIt != this->CustomCoverageExclude.end(); -- cgit v0.12