mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
merge fixes from develop
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
// from a DLL simpler. All files within this DLL are compiled with the MongoDB_EXPORTS
|
||||
// symbol defined on the command line. this symbol should not be defined on any project
|
||||
// that uses this DLL. This way any other project whose source files include this file see
|
||||
// MongoDB_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||
// MongoDB_API functions as being imported from a DLL, whereas this DLL sees symbols
|
||||
// defined with this macro as being exported.
|
||||
//
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
explicit ObjectId(const std::string& id);
|
||||
/// Creates an ObjectId from a string.
|
||||
///
|
||||
/// The string must contain a hexidecimal representation
|
||||
/// The string must contain a hexadecimal representation
|
||||
/// of an object ID. This means a string of 24 characters.
|
||||
|
||||
ObjectId(const ObjectId& copy);
|
||||
|
||||
@@ -100,7 +100,10 @@ public:
|
||||
{
|
||||
try
|
||||
{
|
||||
_pool.returnObject(_connection);
|
||||
if (_connection)
|
||||
{
|
||||
_pool.returnObject(_connection);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // MongoDB_ReplicaSet_INCLUDED
|
||||
|
||||
|
||||
} } // namespace Poco::MongoDB
|
||||
|
||||
|
||||
#endif // MongoDB_ReplicaSet_INCLUDED
|
||||
|
||||
@@ -57,7 +57,7 @@ Int64 Document::getInteger(const std::string& name) const
|
||||
if (ElementTraits<double>::TypeId == element->type())
|
||||
{
|
||||
ConcreteElement<double>* concrete = dynamic_cast<ConcreteElement<double>*>(element.get());
|
||||
if (concrete) return concrete->value();
|
||||
if (concrete) return static_cast<Int64>(concrete->value());
|
||||
}
|
||||
else if (ElementTraits<Int32>::TypeId == element->type())
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ KillCursorsRequest::~KillCursorsRequest()
|
||||
void KillCursorsRequest::buildRequest(BinaryWriter& writer)
|
||||
{
|
||||
writer << 0; // 0 - reserved for future use
|
||||
writer << _cursors.size();
|
||||
writer << static_cast<Poco::UInt64>(_cursors.size());
|
||||
for (std::vector<Int64>::iterator it = _cursors.begin(); it != _cursors.end(); ++it)
|
||||
{
|
||||
writer << *it;
|
||||
|
||||
@@ -243,7 +243,7 @@ void MongoDBTest::testCursorRequest()
|
||||
Poco::MongoDB::ResponseMessage& response = cursor.next(*_mongo);
|
||||
while(1)
|
||||
{
|
||||
n += response.documents().size();
|
||||
n += static_cast<int>(response.documents().size());
|
||||
if ( response.cursorID() == 0 )
|
||||
break;
|
||||
response = cursor.next(*_mongo);
|
||||
|
||||
Reference in New Issue
Block a user