From ccea5027341fac8fd65f563f2e36b83c46528843 Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Mon, 25 Sep 2023 18:27:02 +0200 Subject: [PATCH] Explicitly set copy & move constructors to default for Printer --- src/P700Printer.cpp | 2 -- src/P700Printer.hpp | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/P700Printer.cpp b/src/P700Printer.cpp index f7f6bf9..7944375 100644 --- a/src/P700Printer.cpp +++ b/src/P700Printer.cpp @@ -41,8 +41,6 @@ namespace ptprnt::printer { -P700Printer::P700Printer() {} - P700Printer::~P700Printer() { detachUsbDevice(); if (mUsbHndl) { diff --git a/src/P700Printer.hpp b/src/P700Printer.hpp index 4154638..b7d74d2 100644 --- a/src/P700Printer.hpp +++ b/src/P700Printer.hpp @@ -33,12 +33,14 @@ namespace ptprnt::printer { class P700Printer : public ::ptprnt::IPrinterDriver { public: - P700Printer(); + P700Printer() = default; ~P700Printer(); // delete copy ctor and assignment - P700Printer(const P700Printer&) = delete; - P700Printer& operator=(P700Printer&) = delete; + P700Printer(const P700Printer&) = default; + P700Printer& operator=(const P700Printer&) = default; + P700Printer(P700Printer&&) = default; + P700Printer& operator=(P700Printer&&) = default; // IPrinterDriver const std::string_view getDriverName() override;