Project restructuring [PART.2]

This commit is contained in:
Yehonal
2016-08-23 12:11:46 +02:00
parent 54bd100573
commit 0355064321
141 changed files with 250 additions and 243 deletions

View File

@@ -0,0 +1,43 @@
/*
* Copyright (C)
*
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*/
#ifndef _TRINITY_AUTO_PTR_H
#define _TRINITY_AUTO_PTR_H
#include <ace/Bound_Ptr.h>
namespace Trinity
{
template <class Pointer, class Lock>
class AutoPtr : public ACE_Strong_Bound_Ptr<Pointer, Lock>
{
typedef ACE_Strong_Bound_Ptr<Pointer, Lock> Base;
public:
AutoPtr()
: Base()
{ }
AutoPtr(Pointer* x)
: Base(x)
{ }
operator bool() const
{
return !Base::null();
}
bool operator !() const
{
return Base::null();
}
};
} // namespace Trinity
#endif