diff --git a/reco/L1/L1Algo/L1Vector.h b/reco/L1/L1Algo/L1Vector.h index e286b1a6d4033a6005fd5f125c15d7278ea92d6f..10a28b7a7ebc6249df67603bd611669d039c5a7d 100644 --- a/reco/L1/L1Algo/L1Vector.h +++ b/reco/L1/L1Algo/L1Vector.h @@ -42,13 +42,16 @@ public: { } - L1Vector(const L1Vector& v) : Tbase(), fName(v.fName) + L1Vector(const L1Vector& v) : Tbase() { *this = v; } + + L1Vector& operator=(const L1Vector& v) { - Tbase::reserve(v.capacity()); + fName = v.fName; + Tbase::reserve(v.capacity()); // make sure that the capacity is transmitted Tbase::assign(v.begin(), v.end()); + return *this; } - void SetName(const std::string& s) { fName = s; } void SetName(const std::basic_ostream<char>& s)