mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-26 14:13:50 +00:00
shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
This commit is contained in:
parent
d63f79325f
commit
7074f35e4b
1373 changed files with 12054 additions and 12054 deletions
|
|
@ -13,7 +13,7 @@ Path::~Path()
|
|||
}
|
||||
}
|
||||
|
||||
Path::Path(NodeArray nodes)
|
||||
Path::Path(NodeArray nodes)
|
||||
{
|
||||
index = 0;
|
||||
|
||||
|
|
@ -30,26 +30,26 @@ Path::Path(NodeArray nodes)
|
|||
}
|
||||
}
|
||||
|
||||
void Path::next()
|
||||
void Path::next()
|
||||
{
|
||||
index++;
|
||||
}
|
||||
|
||||
bool Path::isDone()
|
||||
bool Path::isDone()
|
||||
{
|
||||
return index >= length;
|
||||
}
|
||||
|
||||
Node *Path::last()
|
||||
Node *Path::last()
|
||||
{
|
||||
if (length > 0)
|
||||
if (length > 0)
|
||||
{
|
||||
return nodes[length - 1];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Node *Path::get(int i)
|
||||
Node *Path::get(int i)
|
||||
{
|
||||
return nodes[i];
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ void Path::setIndex(int index)
|
|||
this->index = index;
|
||||
}
|
||||
|
||||
Vec3 *Path::getPos(shared_ptr<Entity> e, int index)
|
||||
Vec3 *Path::getPos(std::shared_ptr<Entity> e, int index)
|
||||
{
|
||||
double x = nodes[index]->x + (int) (e->bbWidth + 1) * 0.5;
|
||||
double y = nodes[index]->y;
|
||||
|
|
@ -82,7 +82,7 @@ Vec3 *Path::getPos(shared_ptr<Entity> e, int index)
|
|||
return Vec3::newTemp(x, y, z);
|
||||
}
|
||||
|
||||
Vec3 *Path::currentPos(shared_ptr<Entity> e)
|
||||
Vec3 *Path::currentPos(std::shared_ptr<Entity> e)
|
||||
{
|
||||
return getPos(e, index);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue