mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-28 18:37:57 +01:00
fix: MongoDB deleted copy constructor #4187
This commit is contained in:
parent
5e1904b5f8
commit
22379ff9c1
@ -117,19 +117,14 @@ public:
|
||||
}
|
||||
|
||||
// Disable copy to prevent unwanted release of resources: C++11 way
|
||||
PooledConnection(const PooledConnection&) = delete;
|
||||
PooledConnection& operator=(const PooledConnection&) = delete;
|
||||
PooledConnection(const PooledConnection&) = delete;
|
||||
PooledConnection& operator=(const PooledConnection&) = delete;
|
||||
|
||||
// Enable move semantics
|
||||
PooledConnection(PooledConnection&& other) = default;
|
||||
PooledConnection& operator=(PooledConnection&&) = default;
|
||||
// Enable move semantics
|
||||
PooledConnection(PooledConnection&& other) = default;
|
||||
PooledConnection& operator=(PooledConnection&&) = default;
|
||||
|
||||
private:
|
||||
|
||||
// Disable copy to prevent unwanted release of resources: pre C++11 way
|
||||
PooledConnection(const PooledConnection&);
|
||||
PooledConnection& operator=(const PooledConnection&);
|
||||
|
||||
Poco::ObjectPool<Connection, Connection::Ptr>& _pool;
|
||||
Connection::Ptr _connection;
|
||||
};
|
||||
|
@ -247,7 +247,7 @@ void OpMsgMessage::send(std::ostream& ostr)
|
||||
wdoc.flush();
|
||||
|
||||
const std::string& identifier = commandIdentifier(_commandName);
|
||||
const Poco::Int32 size = sizeof(size) + identifier.size() + 1 + ssdoc.tellp();
|
||||
const Poco::Int32 size = static_cast<Poco::Int32>(sizeof(size) + identifier.size() + 1 + ssdoc.tellp());
|
||||
writer << PAYLOAD_TYPE_1;
|
||||
writer << size;
|
||||
writer.writeCString(identifier.c_str());
|
||||
|
Loading…
x
Reference in New Issue
Block a user