mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 18:22:59 +02:00
merge some changes from develop branch; modernize and clean-up code; remove support for compiling without POCO_WIN32_UTF8
This commit is contained in:
@@ -90,7 +90,7 @@ public:
|
||||
|
||||
|
||||
template <class C>
|
||||
class PoolableObjectFactory <C, Poco::AutoPtr<C> >
|
||||
class PoolableObjectFactory <C, Poco::AutoPtr<C>>
|
||||
{
|
||||
public:
|
||||
Poco::AutoPtr<C> createObject()
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
|
||||
|
||||
template <class C>
|
||||
class PoolableObjectFactory <C, Poco::SharedPtr<C> >
|
||||
class PoolableObjectFactory <C, Poco::SharedPtr<C>>
|
||||
{
|
||||
public:
|
||||
Poco::SharedPtr<C> createObject()
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
template <class C, class P = C*, class F = PoolableObjectFactory<C, P> >
|
||||
template <class C, class P = C*, class F = PoolableObjectFactory<C, P>>
|
||||
class ObjectPool
|
||||
/// An ObjectPool manages a pool of objects of a certain class.
|
||||
///
|
||||
@@ -195,9 +195,9 @@ public:
|
||||
{
|
||||
try
|
||||
{
|
||||
for (typename std::vector<P>::iterator it = _pool.begin(); it != _pool.end(); ++it)
|
||||
for (auto& p: _pool)
|
||||
{
|
||||
_factory.destroyObject(*it);
|
||||
_factory.destroyObject(p);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
|
||||
Reference in New Issue
Block a user