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

@@ -33,7 +33,7 @@ FoodItem::FoodItem(int id, int nutrition, bool isMeat)
_init();
}
shared_ptr<ItemInstance> FoodItem::useTimeDepleted(shared_ptr<ItemInstance> instance, Level *level, shared_ptr<Player> player)
std::shared_ptr<ItemInstance> FoodItem::useTimeDepleted(std::shared_ptr<ItemInstance> instance, Level *level, std::shared_ptr<Player> player)
{
instance->count--;
player->getFoodData()->eat(this);
@@ -45,7 +45,7 @@ shared_ptr<ItemInstance> FoodItem::useTimeDepleted(shared_ptr<ItemInstance> inst
return instance;
}
void FoodItem::addEatEffect(shared_ptr<ItemInstance> instance, Level *level, shared_ptr<Player> player)
void FoodItem::addEatEffect(std::shared_ptr<ItemInstance> instance, Level *level, std::shared_ptr<Player> player)
{
if (!level->isClientSide && effectId > 0 && level->random->nextFloat() < effectProbability)
{
@@ -54,17 +54,17 @@ void FoodItem::addEatEffect(shared_ptr<ItemInstance> instance, Level *level, sha
}
int FoodItem::getUseDuration(shared_ptr<ItemInstance> itemInstance)
int FoodItem::getUseDuration(std::shared_ptr<ItemInstance> itemInstance)
{
return EAT_DURATION;
}
UseAnim FoodItem::getUseAnimation(shared_ptr<ItemInstance> itemInstance)
UseAnim FoodItem::getUseAnimation(std::shared_ptr<ItemInstance> itemInstance)
{
return UseAnim_eat;
}
shared_ptr<ItemInstance> FoodItem::use(shared_ptr<ItemInstance> instance, Level *level, shared_ptr<Player> player)
std::shared_ptr<ItemInstance> FoodItem::use(std::shared_ptr<ItemInstance> instance, Level *level, std::shared_ptr<Player> player)
{
if (player->canEat(canAlwaysEat))
{
@@ -73,7 +73,7 @@ shared_ptr<ItemInstance> FoodItem::use(shared_ptr<ItemInstance> instance, Level
// 4J : WESTY : Other award ... eating cooked pork chop.
// 4J-JEV: This is just for an avatar award on the xbox.
#ifdef _XBOX
#ifdef _XBOX
if ( instance->getItem() == Item::porkChop_cooked )
{
player->awardStat(GenericStats::eatPorkChop(),GenericStats::param_eatPorkChop());
@@ -114,7 +114,7 @@ FoodItem *FoodItem::setCanAlwaysEat()
}
// 4J Added
bool FoodItem::canEat(shared_ptr<Player> player)
bool FoodItem::canEat(std::shared_ptr<Player> player)
{
return player->canEat(canAlwaysEat);
}