Explorar o código

Update a bunch of files

taylor001 %!s(int64=13) %!d(string=hai) anos
pai
achega
9f321bc0c4
Modificáronse 4 ficheiros con 6 adicións e 10 borrados
  1. 2 2
      src/Mesh.cpp
  2. 0 6
      src/ResourceManager.cpp
  3. 1 0
      src/SpriteAnimator.cpp
  4. 3 2
      src/core/containers/Str.h

+ 2 - 2
src/Mesh.cpp

@@ -121,7 +121,7 @@ void Mesh::RecompileMesh()
 	for(int i=0; i<mMeshChunkList.GetSize(); i++)
 	{
 		uint size = mMeshChunkList[i]->mVertexList.GetSize() * sizeof(VertexData);
-		mVertexBuffer->SetVertexSubData((float*) mMeshChunkList[i]->mVertexList.GetData(), offset, mMeshChunkList[i]->mVertexList.GetSize());
+		mVertexBuffer->SetVertexSubData((float*) mMeshChunkList[i]->mVertexList.GetBegin(), offset, mMeshChunkList[i]->mVertexList.GetSize());
 
 		offset += size;
 	}
@@ -139,7 +139,7 @@ void Mesh::RecompileMesh()
 	for(int i=0; i<mMeshChunkList.GetSize(); i++)
 	{
 		uint size = mMeshChunkList[i]->mFaceList.GetSize() * sizeof(ushort) * 3;
-		mIndexBuffer->SetIndexSubData((ushort*) mMeshChunkList[i]->mFaceList.GetData(), offset, mMeshChunkList[i]->mFaceList.GetSize() * 3);
+		mIndexBuffer->SetIndexSubData((ushort*) mMeshChunkList[i]->mFaceList.GetBegin(), offset, mMeshChunkList[i]->mFaceList.GetSize() * 3);
 
 		offset += size;
 	}

+ 0 - 6
src/ResourceManager.cpp

@@ -36,12 +36,6 @@ ResourceManager::ResourceManager()
 
 ResourceManager::~ResourceManager()
 {
-	NameToResourceDict::Enumerator e = mNameToResourceDict.getBegin();
-	while (e.next())
-	{
-		e.current().value->Unload(NULL, false);
-		delete e.current().value;
-	}
 }
 
 Resource* ResourceManager::Create(const char* name, bool& created)

+ 1 - 0
src/SpriteAnimator.cpp

@@ -24,6 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 */
 
 #include "SpriteAnimator.h"
+#include <cstdlib>
 
 namespace Crown
 {

+ 3 - 2
src/core/containers/Str.h

@@ -26,7 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 
 #include <cassert>
-#include <stdio.h>
+#include <cstdio>
+#include <cstring>
 #include "List.h"
 #include "Types.h"
 
@@ -711,7 +712,7 @@ inline void Str::Replace(const Str& toFind, const Str& toReplace)
 		i++;
 	}
 
-	*this = tmp.GetData();
+	*this = tmp.GetBegin();
 }
 
 inline void Str::Split(char ch, List<Str>& split) const