aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/LeafTile.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/LeafTile.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/LeafTile.cpp')
-rw-r--r--Minecraft.World/LeafTile.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Minecraft.World/LeafTile.cpp b/Minecraft.World/LeafTile.cpp
index 8b7d381c..bed4a7ca 100644
--- a/Minecraft.World/LeafTile.cpp
+++ b/Minecraft.World/LeafTile.cpp
@@ -241,17 +241,17 @@ void LeafTile::spawnResources(Level *level, int x, int y, int z, int data, float
if (level->random->nextInt(chance) == 0)
{
int type = getResource(data, level->random,playerBonusLevel);
- popResource(level, x, y, z, shared_ptr<ItemInstance>( new ItemInstance(type, 1, getSpawnResourcesAuxValue(data))));
+ popResource(level, x, y, z, std::shared_ptr<ItemInstance>( new ItemInstance(type, 1, getSpawnResourcesAuxValue(data))));
}
if ((data & LEAF_TYPE_MASK) == NORMAL_LEAF && level->random->nextInt(200) == 0)
{
- popResource(level, x, y, z, shared_ptr<ItemInstance>(new ItemInstance(Item::apple_Id, 1, 0)));
+ popResource(level, x, y, z, std::shared_ptr<ItemInstance>(new ItemInstance(Item::apple_Id, 1, 0)));
}
}
}
-void LeafTile::playerDestroy(Level *level, shared_ptr<Player> player, int x, int y, int z, int data)
+void LeafTile::playerDestroy(Level *level, std::shared_ptr<Player> player, int x, int y, int z, int data)
{
if (!level->isClientSide && player->getSelectedItem() != NULL && player->getSelectedItem()->id == Item::shears->id)
{
@@ -261,7 +261,7 @@ void LeafTile::playerDestroy(Level *level, shared_ptr<Player> player, int x, int
);
// drop leaf block instead of sapling
- popResource(level, x, y, z, shared_ptr<ItemInstance>(new ItemInstance(Tile::leaves_Id, 1, data & LEAF_TYPE_MASK)));
+ popResource(level, x, y, z, std::shared_ptr<ItemInstance>(new ItemInstance(Tile::leaves_Id, 1, data & LEAF_TYPE_MASK)));
}
else
{
@@ -301,12 +301,12 @@ void LeafTile::setFancy(bool fancyGraphics)
fancyTextureSet = (fancyGraphics ? 0 : 1);
}
-shared_ptr<ItemInstance> LeafTile::getSilkTouchItemInstance(int data)
+std::shared_ptr<ItemInstance> LeafTile::getSilkTouchItemInstance(int data)
{
- return shared_ptr<ItemInstance>( new ItemInstance(id, 1, data & LEAF_TYPE_MASK) );
+ return std::shared_ptr<ItemInstance>( new ItemInstance(id, 1, data & LEAF_TYPE_MASK) );
}
-void LeafTile::stepOn(Level *level, int x, int y, int z, shared_ptr<Entity> entity)
+void LeafTile::stepOn(Level *level, int x, int y, int z, std::shared_ptr<Entity> entity)
{
TransparentTile::stepOn(level, x, y, z, entity);
}