mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Delete operator=(Self&) when copy constructor is deleted (#8535)
This commit is contained in:
parent
684156d211
commit
27827c8c6d
@ -58,6 +58,7 @@ class PublicKey {
|
||||
|
||||
// Disable the copy constructor, we're pointer based
|
||||
PublicKey(const PublicKey& that) = delete;
|
||||
PublicKey& operator=(const PublicKey& that) = delete;
|
||||
|
||||
private:
|
||||
brssl::public_key *_key;
|
||||
@ -86,6 +87,7 @@ class PrivateKey {
|
||||
|
||||
// Disable the copy constructor, we're pointer based
|
||||
PrivateKey(const PrivateKey& that) = delete;
|
||||
PrivateKey& operator=(const PrivateKey& that) = delete;
|
||||
|
||||
private:
|
||||
brssl::private_key *_key;
|
||||
@ -122,6 +124,7 @@ class X509List {
|
||||
|
||||
// Disable the copy constructor, we're pointer based
|
||||
X509List(const X509List& that) = delete;
|
||||
X509List& operator=(const X509List& that) = delete;
|
||||
|
||||
private:
|
||||
size_t _count;
|
||||
|
@ -34,7 +34,7 @@ namespace BearSSL {
|
||||
class WiFiClientSecureCtx : public WiFiClient {
|
||||
public:
|
||||
WiFiClientSecureCtx();
|
||||
WiFiClientSecureCtx(const WiFiClientSecure &rhs) = delete;
|
||||
WiFiClientSecureCtx(const WiFiClientSecureCtx &rhs) = delete;
|
||||
~WiFiClientSecureCtx() override;
|
||||
|
||||
WiFiClientSecureCtx& operator=(const WiFiClientSecureCtx&) = delete;
|
||||
@ -43,7 +43,7 @@ class WiFiClientSecureCtx : public WiFiClient {
|
||||
// TODO: don't remove just yet to avoid including the WiFiClient default implementation and unintentionally causing
|
||||
// a 'slice' that this method tries to avoid in the first place
|
||||
std::unique_ptr<WiFiClient> clone() const override {
|
||||
return std::unique_ptr<WiFiClient>(new WiFiClientSecureCtx(*this));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int connect(IPAddress ip, uint16_t port) override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user