Commit 4fd67d8c authored by Sergey Gorbunov's avatar Sergey Gorbunov Committed by Florian Uhlig
Browse files

L1: fix -Wdeprecated-copy warning in L1Vector

parent e906a614
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment