Skip to content

Commit

Permalink
Explicitly marks "deleted" copy ctors as deleted as in C++11 standard.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimi1010 committed May 12, 2024
1 parent a8e97b0 commit 6436b01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Pcap++/header/PcapLiveDeviceList.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ namespace pcpp

// private c'tor
PcapLiveDeviceList();
// private copy c'tor
PcapLiveDeviceList( const PcapLiveDeviceList& other );
PcapLiveDeviceList& operator=(const PcapLiveDeviceList& other);

void init();

void setDnsServers();

void updateLiveDeviceListView() const;
public:
PcapLiveDeviceList(const PcapLiveDeviceList& other) = delete;
PcapLiveDeviceList& operator=(const PcapLiveDeviceList& other) = delete;

/*
* @class SmartPtrApiTag
* Helper tag to disambiguate smart pointer API.
Expand Down
6 changes: 3 additions & 3 deletions Pcap++/header/PcapRemoteDeviceList.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ namespace pcpp

// private c'tor. User should create the list via static methods PcapRemoteDeviceList::getRemoteDeviceList()
PcapRemoteDeviceList(const IPAddress& ipAddress, uint16_t port, std::shared_ptr<PcapRemoteAuthentication> remoteAuth, std::vector<std::shared_ptr<PcapRemoteDevice>> deviceList);
// private copy c'tor
PcapRemoteDeviceList(const PcapRemoteDeviceList& other);
PcapRemoteDeviceList& operator=(const PcapRemoteDeviceList& other);

void updateDeviceListView();

// Implementation that uses a shared ptr is private to guarantee that the remote auth object is not shared externally. It is used by the other overloads.
static std::unique_ptr<PcapRemoteDeviceList> getRemoteDeviceList(const IPAddress& ipAddress, uint16_t port, std::shared_ptr<PcapRemoteAuthentication> remoteAuth);
public:
PcapRemoteDeviceList(const PcapRemoteDeviceList& other) = delete;
PcapRemoteDeviceList& operator=(const PcapRemoteDeviceList& other) = delete;

/**
* Iterator object that can be used for iterating all PcapRemoteDevice in list
*/
Expand Down

0 comments on commit 6436b01

Please sign in to comment.