From 119bff351450ea16ffda550b6e0f67379b29f708 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 17:37:16 +0700 Subject: Revert "shared_ptr -> std::shared_ptr" This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5. --- Minecraft.World/OldChunkStorage.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Minecraft.World/OldChunkStorage.cpp') diff --git a/Minecraft.World/OldChunkStorage.cpp b/Minecraft.World/OldChunkStorage.cpp index ca085cbe..c1515c12 100644 --- a/Minecraft.World/OldChunkStorage.cpp +++ b/Minecraft.World/OldChunkStorage.cpp @@ -211,9 +211,9 @@ bool OldChunkStorage::saveEntities(LevelChunk *lc, Level *level, CompoundTag *ta for (int i = 0; i < lc->ENTITY_BLOCKS_LENGTH; i++) { AUTO_VAR(itEnd, lc->entityBlocks[i]->end()); - for( vector >::iterator it = lc->entityBlocks[i]->begin(); it != itEnd; it++ ) + for( vector >::iterator it = lc->entityBlocks[i]->begin(); it != itEnd; it++ ) { - std::shared_ptr e = *it; + shared_ptr e = *it; lc->lastSaveHadEntities = true; CompoundTag *teTag = new CompoundTag(); if (e->save(teTag)) @@ -268,10 +268,10 @@ void OldChunkStorage::save(LevelChunk *lc, Level *level, DataOutputStream *dos) ListTag *tileEntityTags = new ListTag(); AUTO_VAR(itEnd, lc->tileEntities.end()); - for( unordered_map, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin(); + for( unordered_map, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin(); it != itEnd; it++) { - std::shared_ptr te = it->second; + shared_ptr te = it->second; CompoundTag *teTag = new CompoundTag(); te->save(teTag); tileEntityTags->add(teTag); @@ -357,10 +357,10 @@ void OldChunkStorage::save(LevelChunk *lc, Level *level, CompoundTag *tag) ListTag *tileEntityTags = new ListTag(); AUTO_VAR(itEnd, lc->tileEntities.end()); - for( unordered_map, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin(); + for( unordered_map, TilePosKeyHash, TilePosKeyEq>::iterator it = lc->tileEntities.begin(); it != itEnd; it++) { - std::shared_ptr te = it->second; + shared_ptr te = it->second; CompoundTag *teTag = new CompoundTag(); te->save(teTag); tileEntityTags->add(teTag); @@ -402,7 +402,7 @@ void OldChunkStorage::loadEntities(LevelChunk *lc, Level *level, CompoundTag *ta for (int i = 0; i < entityTags->size(); i++) { CompoundTag *teTag = entityTags->get(i); - std::shared_ptr te = EntityIO::loadStatic(teTag, level); + shared_ptr te = EntityIO::loadStatic(teTag, level); lc->lastSaveHadEntities = true; if (te != NULL) { @@ -417,7 +417,7 @@ void OldChunkStorage::loadEntities(LevelChunk *lc, Level *level, CompoundTag *ta for (int i = 0; i < tileEntityTags->size(); i++) { CompoundTag *teTag = tileEntityTags->get(i); - std::shared_ptr te = TileEntity::loadStatic(teTag); + shared_ptr te = TileEntity::loadStatic(teTag); if (te != NULL) { lc->addTileEntity(te); -- cgit v1.2.3