reformatting code according to guidelines defined at
http://wololo.net/forum/viewtopic.php?f=35&t=2235&start=10
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
#include "DamagerDamaged.h"
|
||||
#include "Trash.h"
|
||||
|
||||
template <class T>
|
||||
template<class T>
|
||||
void TrashBin<T>::put_out()
|
||||
{
|
||||
for (typename std::vector<T*>::iterator it = bin.begin(); it != bin.end(); ++it)
|
||||
SAFE_DELETE(*it);
|
||||
bin.clear();
|
||||
for (typename std::vector<T*>::iterator it = bin.begin(); it != bin.end(); ++it)
|
||||
SAFE_DELETE(*it);
|
||||
bin.clear();
|
||||
}
|
||||
|
||||
static TrashBin<CardView> CardViewTrash;
|
||||
@@ -20,20 +20,20 @@ static TrashBin<AttackerDamaged> AttackerDamagedTrash;
|
||||
|
||||
void Trash::cleanup()
|
||||
{
|
||||
CardViewTrash.put_out();
|
||||
DefenserDamagedTrash.put_out();
|
||||
AttackerDamagedTrash.put_out();
|
||||
CardViewTrash.put_out();
|
||||
DefenserDamagedTrash.put_out();
|
||||
AttackerDamagedTrash.put_out();
|
||||
}
|
||||
|
||||
template<> void trash(CardView* garbage)
|
||||
{
|
||||
CardViewTrash.bin.push_back(garbage);
|
||||
CardViewTrash.bin.push_back(garbage);
|
||||
}
|
||||
template<> void trash(DefenserDamaged* garbage)
|
||||
{
|
||||
DefenserDamagedTrash.bin.push_back(garbage);
|
||||
DefenserDamagedTrash.bin.push_back(garbage);
|
||||
}
|
||||
template<> void trash(AttackerDamaged* garbage)
|
||||
{
|
||||
AttackerDamagedTrash.bin.push_back(garbage);
|
||||
AttackerDamagedTrash.bin.push_back(garbage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user