1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Add missing move assignment operator

This commit is contained in:
Carles Fernandez 2019-08-25 02:20:51 +02:00
parent 134fc9d7b1
commit 57de35d92e
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 40 additions and 2 deletions

View File

@ -242,5 +242,38 @@ Acquisition_Dump_Reader::Acquisition_Dump_Reader(const std::string& basename,
} }
} }
// Copy constructor
Acquisition_Dump_Reader::Acquisition_Dump_Reader(Acquisition_Dump_Reader&& other) noexcept
{
*this = other;
}
Acquisition_Dump_Reader::~Acquisition_Dump_Reader() = default;
// Copy assignment operator
Acquisition_Dump_Reader& Acquisition_Dump_Reader::operator=(const Acquisition_Dump_Reader& rhs)
{
// Only do assignment if RHS is a different object from this.
if (this != &rhs)
{
*this = rhs;
}
return *this;
}
// Move constructor
Acquisition_Dump_Reader::Acquisition_Dump_Reader(const Acquisition_Dump_Reader& other) noexcept
{
*this = other;
}
// Move assignment operator
Acquisition_Dump_Reader& Acquisition_Dump_Reader::operator=(Acquisition_Dump_Reader&& other) noexcept
{
if (this != &other)
{
*this = other;
}
return *this;
}

View File

@ -51,7 +51,12 @@ public:
int channel = 0, int channel = 0,
int execution = 1); int execution = 1);
~Acquisition_Dump_Reader(); ~Acquisition_Dump_Reader() = default;
Acquisition_Dump_Reader(Acquisition_Dump_Reader&& other) noexcept; //!< Copy constructor
Acquisition_Dump_Reader& operator=(const Acquisition_Dump_Reader&); //!< Copy assignment operator
Acquisition_Dump_Reader(const Acquisition_Dump_Reader& other) noexcept; //!< Move constructor
Acquisition_Dump_Reader& operator=(Acquisition_Dump_Reader&& other) noexcept; //!< Move assignment operator
bool read_binary_acq(); bool read_binary_acq();