diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 15:58:20 +0700 |
| commit | 7074f35e4ba831e358117842b99ee35b87f85ae5 (patch) | |
| tree | 7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.Client/SquidRenderer.cpp | |
| parent | d63f79325f85e014361eb8cf1e41eaebedb1ae71 (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.Client/SquidRenderer.cpp')
| -rw-r--r-- | Minecraft.Client/SquidRenderer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.Client/SquidRenderer.cpp b/Minecraft.Client/SquidRenderer.cpp index 135f6d9b..3ee79eb1 100644 --- a/Minecraft.Client/SquidRenderer.cpp +++ b/Minecraft.Client/SquidRenderer.cpp @@ -6,15 +6,15 @@ SquidRenderer::SquidRenderer(Model *model, float shadow) : MobRenderer(model, sh { } -void SquidRenderer::render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) +void SquidRenderer::render(std::shared_ptr<Entity> mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); } -void SquidRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRot, float a) +void SquidRenderer::setupRotations(std::shared_ptr<Mob> _mob, float bob, float bodyRot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Squid> mob = dynamic_pointer_cast<Squid>(_mob); + std::shared_ptr<Squid> mob = dynamic_pointer_cast<Squid>(_mob); float bodyXRot = (mob->xBodyRotO + (mob->xBodyRot - mob->xBodyRotO) * a); float bodyZRot = (mob->zBodyRotO + (mob->zBodyRot - mob->zBodyRotO) * a); @@ -26,10 +26,10 @@ void SquidRenderer::setupRotations(shared_ptr<Mob> _mob, float bob, float bodyRo glTranslatef(0, -1.2f, 0); } -float SquidRenderer::getBob(shared_ptr<Mob> _mob, float a) +float SquidRenderer::getBob(std::shared_ptr<Mob> _mob, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - shared_ptr<Squid> mob = dynamic_pointer_cast<Squid>(_mob); + std::shared_ptr<Squid> mob = dynamic_pointer_cast<Squid>(_mob); return mob->oldTentacleAngle + (mob->tentacleAngle - mob->oldTentacleAngle) * a; }
\ No newline at end of file |
