From 82ab656fd18ab07d09af9e25aacf192aa53a6da6 Mon Sep 17 00:00:00 2001
From: Dominik Smith <d.smith@gsi.de>
Date: Thu, 29 Aug 2024 16:33:08 +0200
Subject: [PATCH] Replaced ca::Vector::erase() by ca::Vector::reduce() in
 ca::TripletConstructor.

---
 algo/ca/core/tracking/CaTripletConstructor.cxx | 2 +-
 algo/ca/core/utils/CaVector.h                  | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/algo/ca/core/tracking/CaTripletConstructor.cxx b/algo/ca/core/tracking/CaTripletConstructor.cxx
index 63d42c0532..9685e7e76a 100644
--- a/algo/ca/core/tracking/CaTripletConstructor.cxx
+++ b/algo/ca/core/tracking/CaTripletConstructor.cxx
@@ -278,7 +278,7 @@ void TripletConstructor::FindDoublets(ca::TrackFit<fvec>& fit)
     *it2 = indM;
     it2++;
   }  // it
-  hitsM.erase(it2, hitsM.end());
+  hitsM.reduce(std::distance(hitsM.begin(), it2));
 }
 
 
diff --git a/algo/ca/core/utils/CaVector.h b/algo/ca/core/utils/CaVector.h
index aabed81edf..16fee44c40 100644
--- a/algo/ca/core/utils/CaVector.h
+++ b/algo/ca/core/utils/CaVector.h
@@ -265,7 +265,6 @@ namespace cbm::algo::ca
     using Tbase::cend;
     using Tbase::clear;
     using Tbase::end;
-    using Tbase::erase;
     using Tbase::insert;  //TODO:: make it private
     using Tbase::pop_back;
     using Tbase::rbegin;
-- 
GitLab