[12062] Cleanup MaNGOS sources

This commit is contained in:
Schmoozerd 2012-07-19 22:03:32 +02:00
parent a4cbed3199
commit aeff8f9d1a
46 changed files with 1982 additions and 1864 deletions

View file

@ -28,16 +28,16 @@
namespace ACE_Based
{
template <class T, class LockType, typename StorageType=std::deque<T> >
class LockedQueue
class LockedQueue
{
//! Lock access to the queue.
LockType _lock;
//! Lock access to the queue.
LockType _lock;
//! Storage backing the queue.
StorageType _queue;
//! Storage backing the queue.
StorageType _queue;
//! Cancellation flag.
/*volatile*/ bool _canceled;
//! Cancellation flag.
/*volatile*/ bool _canceled;
public:
@ -62,7 +62,7 @@ namespace ACE_Based
//! Gets the next result in the queue, if any.
bool next(T& result)
{
ACE_GUARD_RETURN (LockType, g, this->_lock, false);
ACE_GUARD_RETURN(LockType, g, this->_lock, false);
if (_queue.empty())
return false;
@ -76,13 +76,13 @@ namespace ACE_Based
template<class Checker>
bool next(T& result, Checker& check)
{
ACE_GUARD_RETURN (LockType, g, this->_lock, false);
ACE_GUARD_RETURN(LockType, g, this->_lock, false);
if (_queue.empty())
return false;
result = _queue.front();
if(!check.Process(result))
if (!check.Process(result))
return false;
_queue.pop_front();