summaryrefslogtreecommitdiff
path: root/src/client/GameSave.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-12 21:32:57 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-12 21:32:57 (GMT)
commit8ca27520a437bf33fb374d5a88731605cd3739e7 (patch)
treef081511e0f26946016529382c68000d3c6ea5a3a /src/client/GameSave.cpp
parentca7c0e7370542a97dd03210e13ec2c56679d5ca4 (diff)
downloadpowder-8ca27520a437bf33fb374d5a88731605cd3739e7.zip
powder-8ca27520a437bf33fb374d5a88731605cd3739e7.tar.gz
Use forward declarations more to avoid excessive includes
Diffstat (limited to 'src/client/GameSave.cpp')
-rw-r--r--src/client/GameSave.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp
index f615c6f..3cb3c29 100644
--- a/src/client/GameSave.cpp
+++ b/src/client/GameSave.cpp
@@ -41,10 +41,10 @@ originalData(save.originalData)
{
setSize(save.blockWidth, save.blockHeight);
- copy(save.particles, save.particles+NPART, particles);
- copy(save.blockMapPtr, save.blockMapPtr+(blockHeight*blockWidth), blockMapPtr);
- copy(save.fanVelXPtr, save.fanVelXPtr+(blockHeight*blockWidth), fanVelXPtr);
- copy(save.fanVelYPtr, save.fanVelYPtr+(blockHeight*blockWidth), fanVelYPtr);
+ std::copy(save.particles, save.particles+NPART, particles);
+ std::copy(save.blockMapPtr, save.blockMapPtr+(blockHeight*blockWidth), blockMapPtr);
+ std::copy(save.fanVelXPtr, save.fanVelXPtr+(blockHeight*blockWidth), fanVelXPtr);
+ std::copy(save.fanVelYPtr, save.fanVelYPtr+(blockHeight*blockWidth), fanVelYPtr);
}
else
{
@@ -261,11 +261,11 @@ void GameSave::setSize(int newWidth, int newHeight)
particles = new Particle[NPART];
blockMapPtr = new unsigned char[blockHeight*blockWidth];
- fill(blockMapPtr, blockMapPtr+(blockHeight*blockWidth), 0);
+ std::fill(blockMapPtr, blockMapPtr+(blockHeight*blockWidth), 0);
fanVelXPtr = new float[(blockHeight)*(blockWidth)];
- fill(fanVelXPtr, fanVelXPtr+((blockHeight)*(blockWidth)), 0);
+ std::fill(fanVelXPtr, fanVelXPtr+((blockHeight)*(blockWidth)), 0);
fanVelYPtr = new float[(blockHeight)*(blockWidth)];
- fill(fanVelYPtr, fanVelYPtr+((blockHeight)*(blockWidth)), 0);
+ std::fill(fanVelYPtr, fanVelYPtr+((blockHeight)*(blockWidth)), 0);
blockMap = new unsigned char*[blockHeight];
for(int y = 0; y < blockHeight; y++)
@@ -330,11 +330,11 @@ void GameSave::Transform(matrix2d transform, vector2d translate)
unsigned char * blockMapPtrNew;
blockMapPtrNew = new unsigned char[newBlockHeight*newBlockWidth];
- fill(blockMapPtrNew, blockMapPtrNew+(newBlockHeight*newBlockWidth), 0);
+ std::fill(blockMapPtrNew, blockMapPtrNew+(newBlockHeight*newBlockWidth), 0);
fanVelXPtrNew = new float[newBlockHeight*newBlockWidth];
- fill(fanVelXPtrNew, fanVelXPtrNew+(newBlockHeight*newBlockWidth), 0);
+ std::fill(fanVelXPtrNew, fanVelXPtrNew+(newBlockHeight*newBlockWidth), 0);
fanVelYPtrNew = new float[(newBlockHeight)*(newBlockWidth)];
- fill(fanVelYPtrNew, fanVelYPtrNew+(newBlockHeight*newBlockWidth), 0);
+ std::fill(fanVelYPtrNew, fanVelYPtrNew+(newBlockHeight*newBlockWidth), 0);
blockMapNew = new unsigned char*[newBlockHeight];
for(int y = 0; y < newBlockHeight; y++)
@@ -992,7 +992,7 @@ void GameSave::readPSv(char * data, int dataLength)
memcpy(goltype, golTypesT, sizeof(int) * (golTypesCount));
free(golTypesT);
- vector<Element> elements = GetElements();
+ std::vector<Element> elements = GetElements();
try
{
@@ -1609,7 +1609,7 @@ char * GameSave::serialiseOPS(int & dataLength)
int posCount, signsCount;
bson b;
- fill(elementCount, elementCount+PT_NUM, 0);
+ std::fill(elementCount, elementCount+PT_NUM, 0);
//Get coords in blocks
blockX = 0;//orig_x0/CELL;