refactor(Core/Game): restyle game lib with astyle (#3466)

This commit is contained in:
Kargatum
2020-10-12 15:08:15 +07:00
committed by GitHub
parent e99b526e17
commit a2b26272d2
338 changed files with 52196 additions and 50944 deletions

View File

@@ -15,27 +15,27 @@ class GridRefManager;
template<class OBJECT>
class GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
{
protected:
void targetObjectBuildLink()
{
// called from link()
this->getTarget()->insertFirst(this);
this->getTarget()->incSize();
}
void targetObjectDestroyLink()
{
// called from unlink()
if (this->isValid()) this->getTarget()->decSize();
}
void sourceObjectDestroyLink()
{
// called from invalidate()
this->getTarget()->decSize();
}
public:
GridReference() : Reference<GridRefManager<OBJECT>, OBJECT>() {}
~GridReference() { this->unlink(); }
GridReference* next() { return (GridReference*)Reference<GridRefManager<OBJECT>, OBJECT>::next(); }
protected:
void targetObjectBuildLink()
{
// called from link()
this->getTarget()->insertFirst(this);
this->getTarget()->incSize();
}
void targetObjectDestroyLink()
{
// called from unlink()
if (this->isValid()) this->getTarget()->decSize();
}
void sourceObjectDestroyLink()
{
// called from invalidate()
this->getTarget()->decSize();
}
public:
GridReference() : Reference<GridRefManager<OBJECT>, OBJECT>() {}
~GridReference() { this->unlink(); }
GridReference* next() { return (GridReference*)Reference<GridRefManager<OBJECT>, OBJECT>::next(); }
};
#endif