Explicitly set copy & move constructors to default for Printer

This commit is contained in:
2023-09-25 18:27:02 +02:00
parent 68283a6295
commit ccea502734
2 changed files with 5 additions and 5 deletions

View File

@@ -41,8 +41,6 @@
namespace ptprnt::printer { namespace ptprnt::printer {
P700Printer::P700Printer() {}
P700Printer::~P700Printer() { P700Printer::~P700Printer() {
detachUsbDevice(); detachUsbDevice();
if (mUsbHndl) { if (mUsbHndl) {

View File

@@ -33,12 +33,14 @@ namespace ptprnt::printer {
class P700Printer : public ::ptprnt::IPrinterDriver { class P700Printer : public ::ptprnt::IPrinterDriver {
public: public:
P700Printer(); P700Printer() = default;
~P700Printer(); ~P700Printer();
// delete copy ctor and assignment // delete copy ctor and assignment
P700Printer(const P700Printer&) = delete; P700Printer(const P700Printer&) = default;
P700Printer& operator=(P700Printer&) = delete; P700Printer& operator=(const P700Printer&) = default;
P700Printer(P700Printer&&) = default;
P700Printer& operator=(P700Printer&&) = default;
// IPrinterDriver // IPrinterDriver
const std::string_view getDriverName() override; const std::string_view getDriverName() override;