mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-14 05:03:51 +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
|
|
@ -24,7 +24,7 @@ ChangeStateConstraint::ChangeStateConstraint( Tutorial *tutorial, eTutorial_Stat
|
|||
m_tutorial = tutorial;
|
||||
m_targetState = targetState;
|
||||
m_sourceStatesCount = sourceStatesCount;
|
||||
|
||||
|
||||
m_bHasChanged = false;
|
||||
m_changedFromState = e_Tutorial_State_None;
|
||||
|
||||
|
|
@ -59,11 +59,11 @@ void ChangeStateConstraint::tick(int iPad)
|
|||
if(originalPrivileges != playerPrivs)
|
||||
{
|
||||
// Send update settings packet to server
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
|
||||
if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL)
|
||||
{
|
||||
player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
|
||||
player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -100,11 +100,11 @@ void ChangeStateConstraint::tick(int iPad)
|
|||
if(originalPrivileges != playerPrivs)
|
||||
{
|
||||
// Send update settings packet to server
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
|
||||
if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL)
|
||||
{
|
||||
player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
|
||||
player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -124,11 +124,11 @@ void ChangeStateConstraint::tick(int iPad)
|
|||
if(originalPrivileges != playerPrivs)
|
||||
{
|
||||
// Send update settings packet to server
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
std::shared_ptr<MultiplayerLocalPlayer> player = minecraft->localplayers[iPad];
|
||||
if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL)
|
||||
{
|
||||
player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
|
||||
player->connection->send( std::shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue