diff --git a/src/clientmon.cpp b/src/clientmon.cpp index c1cb9ae..8bf249d 100644 --- a/src/clientmon.cpp +++ b/src/clientmon.cpp @@ -26,8 +26,8 @@ struct Entry { Value val; std::exception_ptr exc; Entry() = default; - Entry(Value&& v) :val(std::move(v)) {} - Entry(const std::exception_ptr& e) :exc(e) {} + explicit Entry(Value&& v) :val(std::move(v)) {} + explicit Entry(const std::exception_ptr& e) :exc(e) {} }; } @@ -75,7 +75,7 @@ struct SubscriptionImpl final : public OperationBase, public Subscription INST_COUNTER(SubscriptionImpl); - SubscriptionImpl(const evbase& loop) + explicit SubscriptionImpl(const evbase& loop) :OperationBase (Operation::Monitor, loop) ,ackTick(__FILE__, __LINE__, event_new(loop.base, -1, EV_TIMEOUT, &tickAckS, this)) diff --git a/src/dataimpl.h b/src/dataimpl.h index 6c7e16d..1e6c71c 100644 --- a/src/dataimpl.h +++ b/src/dataimpl.h @@ -118,6 +118,9 @@ struct FieldStorage { void init(StoreType code); void deinit(); + FieldStorage() = default; + FieldStorage(const FieldStorage&) = delete; + FieldStorage& operator=(const FieldStorage&) = delete; ~FieldStorage(); size_t index() const; diff --git a/src/evhelper.h b/src/evhelper.h index d1a3917..3509165 100644 --- a/src/evhelper.h +++ b/src/evhelper.h @@ -88,14 +88,16 @@ struct owned_ptr : public std::unique_ptr */ namespace mdetail { struct PVXS_API VFunctor0 { + VFunctor0() = default; + VFunctor0(VFunctor0&) = delete; + VFunctor0(const VFunctor0&) = delete; + VFunctor0& operator=(const VFunctor0&) = delete; virtual ~VFunctor0() =0; virtual void invoke() =0; }; template struct Functor0 : public VFunctor0 { Functor0() = default; - Functor0(const Functor0&) = delete; - Functor0(Functor0&&) = default; Functor0(Fn&& fn) : fn(std::move(fn)) {} virtual ~Functor0() {} diff --git a/src/pvaproto.h b/src/pvaproto.h index 17f0dcc..f090d7e 100644 --- a/src/pvaproto.h +++ b/src/pvaproto.h @@ -47,6 +47,8 @@ protected: constexpr Buffer(bool be, uint8_t* buf, size_t n) :pos(buf), limit(buf+n), be(be) {} virtual ~Buffer() {} public: + Buffer(const Buffer&) = delete; + Buffer& operator=(const Buffer&) = delete; bool be; // all sub-classes define diff --git a/src/pvxs/client.h b/src/pvxs/client.h index c449fac..2a5383e 100644 --- a/src/pvxs/client.h +++ b/src/pvxs/client.h @@ -174,6 +174,9 @@ struct SubscriptionStat { //! Handle for monitor subscription struct PVXS_API Subscription { + Subscription() = default; + Subscription(const Subscription&) = delete; + Subscription& operator=(const Subscription&) = delete; virtual ~Subscription() =0; protected: diff --git a/src/pvxs/netcommon.h b/src/pvxs/netcommon.h index 367d330..4492af2 100644 --- a/src/pvxs/netcommon.h +++ b/src/pvxs/netcommon.h @@ -63,6 +63,9 @@ struct Report { }; struct PVXS_API ReportInfo { + ReportInfo() = default; + ReportInfo(const ReportInfo&) = delete; + ReportInfo& operator=(const ReportInfo&) = delete; virtual ~ReportInfo(); }; diff --git a/src/pvxs/srvcommon.h b/src/pvxs/srvcommon.h index a13ffd2..4f11e38 100644 --- a/src/pvxs/srvcommon.h +++ b/src/pvxs/srvcommon.h @@ -82,6 +82,8 @@ public: ,_cred(cred) ,_op(op) {} + OpBase(const OpBase&) = delete; + OpBase& operator=(const OpBase&) = delete; virtual ~OpBase() =0; }; @@ -110,6 +112,8 @@ public: :OpBase(name, cred, op) ,_pvRequest(pvRequest) {} + ExecOp(const ExecOp&) = delete; + ExecOp& operator=(const ExecOp&) = delete; virtual ~ExecOp(); #ifdef PVXS_EXPERT_API_ENABLED diff --git a/src/udp_collector.h b/src/udp_collector.h index 6fcb8fd..df8a89b 100644 --- a/src/udp_collector.h +++ b/src/udp_collector.h @@ -66,6 +66,9 @@ struct PVXS_API UDPManager decltype (names)::const_iterator end() const { return names.end(); } virtual bool reply(const void *msg, size_t msglen) const =0; + Search() = default; + Search(const Search&) = delete; + Search& operator=(const Search&) = delete; virtual ~Search(); }; //! Create subscription for Search messages. diff --git a/src/util.cpp b/src/util.cpp index 43ba7c6..038c470 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -269,6 +269,8 @@ struct SocketPair { SocketPair() { compat_socketpair(s); } + SocketPair(const SocketPair&) = delete; + SocketPair& operator=(const SocketPair&) = delete; ~SocketPair() { epicsSocketDestroy(s[0]); epicsSocketDestroy(s[1]); diff --git a/src/utilpvt.h b/src/utilpvt.h index bc23323..5809c95 100644 --- a/src/utilpvt.h +++ b/src/utilpvt.h @@ -260,6 +260,8 @@ struct Restore { ,pfill(strm.fill()) ,pwidth(strm.width()) {} + Restore(const Restore&) = delete; + Restore& operator=(const Restore&) = delete; ~Restore() { strm.flags(pflags); strm.fill(pfill); @@ -278,6 +280,8 @@ struct InstCounter { registerICount(Name, Cnt); } } + InstCounter(const InstCounter&) = delete; + InstCounter& operator=(const InstCounter&) = delete; ~InstCounter() { Cnt.fetch_sub(1u, std::memory_order_relaxed); }