mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-12 22:01:54 +00:00
refactor: begin unglobbing std::vector
This commit is contained in:
@@ -10,7 +10,7 @@ NbtSlotFile::NbtSlotFile(File file)
|
||||
{
|
||||
totalFileSlots = 0;
|
||||
fileSlotMapLength = ZonedChunkStorage::CHUNKS_PER_ZONE * ZonedChunkStorage::CHUNKS_PER_ZONE;
|
||||
fileSlotMap = new vector<int> *[fileSlotMapLength];
|
||||
fileSlotMap = new std::vector<int> *[fileSlotMapLength];
|
||||
|
||||
if ( !file.exists() || file.length() )
|
||||
{
|
||||
@@ -26,7 +26,7 @@ NbtSlotFile::NbtSlotFile(File file)
|
||||
|
||||
for (int i = 0; i < fileSlotMapLength; i++)
|
||||
{
|
||||
fileSlotMap[i] = new vector<int>;
|
||||
fileSlotMap[i] = new std::vector<int>;
|
||||
}
|
||||
|
||||
DWORD numberofBytesRead;
|
||||
@@ -82,11 +82,11 @@ void NbtSlotFile::seekSlot(int fileSlot)
|
||||
SetFilePointer(raf,target+FILE_SLOT_HEADER_SIZE,0,FILE_BEGIN);
|
||||
}
|
||||
|
||||
vector<CompoundTag *> *NbtSlotFile::readAll(int slot)
|
||||
std::vector<CompoundTag *> *NbtSlotFile::readAll(int slot)
|
||||
{
|
||||
DWORD numberOfBytesRead;
|
||||
vector<CompoundTag *> *tags = new vector<CompoundTag *>;
|
||||
vector<int> *fileSlots = fileSlotMap[slot];
|
||||
std::vector<CompoundTag *> *tags = new std::vector<CompoundTag *>;
|
||||
std::vector<int> *fileSlots = fileSlotMap[slot];
|
||||
int skipped = 0;
|
||||
|
||||
AUTO_VAR(itEnd, fileSlots->end());
|
||||
@@ -159,11 +159,11 @@ int NbtSlotFile::getFreeSlot()
|
||||
return fileSlot;
|
||||
|
||||
}
|
||||
void NbtSlotFile::replaceSlot(int slot, vector<CompoundTag *> *tags)
|
||||
void NbtSlotFile::replaceSlot(int slot, std::vector<CompoundTag *> *tags)
|
||||
{
|
||||
DWORD numberOfBytesWritten;
|
||||
toReplace = fileSlotMap[slot];
|
||||
fileSlotMap[slot] = new vector<int>();
|
||||
fileSlotMap[slot] = new std::vector<int>();
|
||||
|
||||
AUTO_VAR(itEndTags, tags->end());
|
||||
for (AUTO_VAR(it, tags->begin()); it != itEndTags; it++)
|
||||
|
||||
Reference in New Issue
Block a user