mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
net: remove Sock default constructor, it's not necessary
This commit is contained in:
@@ -106,10 +106,10 @@ constexpr auto ALL_NETWORKS = std::array{
|
||||
class StaticContentsSock : public Sock
|
||||
{
|
||||
public:
|
||||
explicit StaticContentsSock(const std::string& contents) : m_contents{contents}
|
||||
explicit StaticContentsSock(const std::string& contents)
|
||||
: Sock{INVALID_SOCKET},
|
||||
m_contents{contents}
|
||||
{
|
||||
// Just a dummy number that is not INVALID_SOCKET.
|
||||
m_socket = INVALID_SOCKET - 1;
|
||||
}
|
||||
|
||||
~StaticContentsSock() override { m_socket = INVALID_SOCKET; }
|
||||
@@ -192,6 +192,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IsConnected(std::string&) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
const std::string m_contents;
|
||||
mutable size_t m_consumed{0};
|
||||
|
||||
Reference in New Issue
Block a user