From 5f607119fc676454e7e3419af56227a4c1aa6169 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Tue, 28 Nov 2023 06:10:46 -0500 Subject: [PATCH] Move memory referencing around --- source/Irrlicht/CB3DJSONMeshFileLoader.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp index 99150d52..ec2a62d9 100644 --- a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp @@ -181,13 +181,17 @@ std::tuple CB3DJSONMeshFileLoader::readChunkTEXS() { json textureArray = texs["textures"]; - // t stands for texture. :D Come back next week for more knowledge. - for (auto t = textureArray.begin(); t != textureArray.end(); ++t) { - + for (auto reference = textureArray.begin(); reference != textureArray.end(); ++reference) { + + // t stands for texture. :D Come back next week for more knowledge. + json t = *reference; + // This is a very strange way to do this but I won't complain. Textures.push_back(SB3dTexture()); SB3dTexture& B3DTexture = Textures.getLast(); + // This should probably be it's own function. +