From 7074f35e4ba831e358117842b99ee35b87f85ae5 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 15:58:20 +0700 Subject: 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. --- Minecraft.Client/LevelRenderer.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Minecraft.Client/LevelRenderer.h') diff --git a/Minecraft.Client/LevelRenderer.h b/Minecraft.Client/LevelRenderer.h index b2bd5eb2..7db67d08 100644 --- a/Minecraft.Client/LevelRenderer.h +++ b/Minecraft.Client/LevelRenderer.h @@ -71,7 +71,7 @@ public: private: void resortChunks(int xc, int yc, int zc); public: - int render(shared_ptr player, int layer, double alpha, bool updateChunks); + int render(std::shared_ptr player, int layer, double alpha, bool updateChunks); private: int renderChunks(int from, int to, int layer, double alpha); public: @@ -87,9 +87,9 @@ public: bool updateDirtyChunks(); public: - void renderHit(shared_ptr player, HitResult *h, int mode, shared_ptr inventoryItem, float a); - void renderDestroyAnimation(Tesselator *t, shared_ptr player, float a); - void renderHitOutline(shared_ptr player, HitResult *h, int mode, shared_ptr inventoryItem, float a); + void renderHit(std::shared_ptr player, HitResult *h, int mode, std::shared_ptr inventoryItem, float a); + void renderDestroyAnimation(Tesselator *t, std::shared_ptr player, float a); + void renderHitOutline(std::shared_ptr player, HitResult *h, int mode, std::shared_ptr inventoryItem, float a); void render(AABB *b); void setDirty(int x0, int y0, int z0, int x1, int y1, int z1, Level *level); // 4J - added level param void tileChanged(int x, int y, int z); @@ -106,26 +106,26 @@ public: void cull(Culler *culler, float a); void playStreamingMusic(const wstring& name, int x, int y, int z); void playSound(int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist=16.0f); - void playSound(shared_ptr entity,int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist=16.0f); + void playSound(std::shared_ptr entity,int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist=16.0f); void addParticle(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za); // 4J added - shared_ptr addParticleInternal(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za); // 4J added - void entityAdded(shared_ptr entity); - void entityRemoved(shared_ptr entity); - void playerRemoved(shared_ptr entity) {} // 4J added - for when a player is removed from the level's player array, not just the entity storage + std::shared_ptr addParticleInternal(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za); // 4J added + void entityAdded(std::shared_ptr entity); + void entityRemoved(std::shared_ptr entity); + void playerRemoved(std::shared_ptr entity) {} // 4J added - for when a player is removed from the level's player array, not just the entity storage void skyColorChanged(); void clear(); - void levelEvent(shared_ptr source, int type, int x, int y, int z, int data); + void levelEvent(std::shared_ptr source, int type, int x, int y, int z, int data); void destroyTileProgress(int id, int x, int y, int z, int progress); void registerTextures(IconRegister *iconRegister); - typedef unordered_map >, IntKeyHash, IntKeyEq> rteMap; + typedef unordered_map >, IntKeyHash, IntKeyEq> rteMap; private: // debug int m_freezeticks; // used to freeze the clouds // 4J - this block of declarations was scattered round the code but have gathered everything into one place - rteMap renderableTileEntities; // 4J - changed - was vector, now hashed by chunk so we can find them + rteMap renderableTileEntities; // 4J - changed - was vector, now hashed by chunk so we can find them CRITICAL_SECTION m_csRenderableTileEntities; MultiPlayerLevel *level[4]; // 4J - now one per player Textures *textures; -- cgit v1.2.3