aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ButtonTile.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
commit7074f35e4ba831e358117842b99ee35b87f85ae5 (patch)
tree7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.World/ButtonTile.cpp
parentd63f79325f85e014361eb8cf1e41eaebedb1ae71 (diff)
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.
Diffstat (limited to 'Minecraft.World/ButtonTile.cpp')
-rw-r--r--Minecraft.World/ButtonTile.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.World/ButtonTile.cpp b/Minecraft.World/ButtonTile.cpp
index 16055a7e..d6192650 100644
--- a/Minecraft.World/ButtonTile.cpp
+++ b/Minecraft.World/ButtonTile.cpp
@@ -141,7 +141,7 @@ bool ButtonTile::checkCanSurvive(Level *level, int x, int y, int z)
return true;
}
-void ButtonTile::updateShape(LevelSource *level, int x, int y, int z, int forceData, shared_ptr<TileEntity> forceEntity) // 4J added forceData, forceEntity param
+void ButtonTile::updateShape(LevelSource *level, int x, int y, int z, int forceData, std::shared_ptr<TileEntity> forceEntity) // 4J added forceData, forceEntity param
{
int data = level->getData(x, y, z);
updateShape(data);
@@ -176,7 +176,7 @@ void ButtonTile::updateShape(int data)
}
}
-void ButtonTile::attack(Level *level, int x, int y, int z, shared_ptr<Player> player)
+void ButtonTile::attack(Level *level, int x, int y, int z, std::shared_ptr<Player> player)
{
//use(level, x, y, z, player, 0, 0, 0, 0);
}
@@ -187,7 +187,7 @@ bool ButtonTile::TestUse()
return true;
}
-bool ButtonTile::use(Level *level, int x, int y, int z, shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param
+bool ButtonTile::use(Level *level, int x, int y, int z, std::shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param
{
if( soundOnly)
{
@@ -279,7 +279,7 @@ void ButtonTile::updateDefaultShape()
setShape(0.5f - x, 0.5f - y, 0.5f - z, 0.5f + x, 0.5f + y, 0.5f + z);
}
-void ButtonTile::entityInside(Level *level, int x, int y, int z, shared_ptr<Entity> entity)
+void ButtonTile::entityInside(Level *level, int x, int y, int z, std::shared_ptr<Entity> entity)
{
if (level->isClientSide) return;
if (!sensitive) return;
@@ -301,7 +301,7 @@ void ButtonTile::checkPressed(Level *level, int x, int y, int z)
updateShape(data);
Tile::ThreadStorage *tls = (Tile::ThreadStorage *)TlsGetValue(Tile::tlsIdxShape);
- vector<shared_ptr<Entity> > *entities = level->getEntitiesOfClass(typeid(Arrow), AABB::newTemp(x + tls->xx0, y + tls->yy0, z + tls->zz0, x + tls->xx1, y + tls->yy1, z + tls->zz1));
+ vector<std::shared_ptr<Entity> > *entities = level->getEntitiesOfClass(typeid(Arrow), AABB::newTemp(x + tls->xx0, y + tls->yy0, z + tls->zz0, x + tls->xx1, y + tls->yy1, z + tls->zz1));
shouldBePressed = !entities->empty();
delete entities;