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:
void_17
2026-03-02 15:58:20 +07:00
parent d63f79325f
commit 7074f35e4b
1373 changed files with 12054 additions and 12054 deletions

View File

@@ -48,7 +48,7 @@ bool EnderChestTile::isSilkTouchable()
return true;
}
void EnderChestTile::setPlacedBy(Level *level, int x, int y, int z, shared_ptr<Mob> by)
void EnderChestTile::setPlacedBy(Level *level, int x, int y, int z, std::shared_ptr<Mob> by)
{
int facing = 0;
int dir = (Mth::floor(by->yRot * 4 / (360) + 0.5f)) & 3;
@@ -61,10 +61,10 @@ void EnderChestTile::setPlacedBy(Level *level, int x, int y, int z, shared_ptr<M
level->setData(x, y, z, facing);
}
bool EnderChestTile::use(Level *level, int x, int y, int z, shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly)
bool EnderChestTile::use(Level *level, int x, int y, int z, std::shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly)
{
shared_ptr<PlayerEnderChestContainer> container = player->getEnderChestInventory();
shared_ptr<EnderChestTileEntity> enderChest = dynamic_pointer_cast<EnderChestTileEntity>(level->getTileEntity(x, y, z));
std::shared_ptr<PlayerEnderChestContainer> container = player->getEnderChestInventory();
std::shared_ptr<EnderChestTileEntity> enderChest = dynamic_pointer_cast<EnderChestTileEntity>(level->getTileEntity(x, y, z));
if (container == NULL || enderChest == NULL) return true;
if (level->isSolidBlockingTile(x, y + 1, z)) return true;
@@ -80,9 +80,9 @@ bool EnderChestTile::use(Level *level, int x, int y, int z, shared_ptr<Player> p
return true;
}
shared_ptr<TileEntity> EnderChestTile::newTileEntity(Level *level)
std::shared_ptr<TileEntity> EnderChestTile::newTileEntity(Level *level)
{
return shared_ptr<EnderChestTileEntity>(new EnderChestTileEntity());
return std::shared_ptr<EnderChestTileEntity>(new EnderChestTileEntity());
}
void EnderChestTile::animateTick(Level *level, int xt, int yt, int zt, Random *random)