mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-01 20:12:50 +02:00
fix compiling warnings / error
This commit is contained in:
@@ -1612,7 +1612,7 @@ std::vector<std::pair<std::string, int> > * Client::GetTags(int start, int count
|
|||||||
{
|
{
|
||||||
json::Number tagCount = tagsArray[j]["Count"];
|
json::Number tagCount = tagsArray[j]["Count"];
|
||||||
json::String tag = tagsArray[j]["Tag"];
|
json::String tag = tagsArray[j]["Tag"];
|
||||||
tagArray->push_back(std::pair<std::string, int>(tag.Value(), tagCount.Value()));
|
tagArray->push_back(std::pair<std::string, int>(tag.Value(), (int)tagCount.Value()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (json::Exception &e)
|
catch (json::Exception &e)
|
||||||
|
@@ -259,9 +259,9 @@ void GameSave::setSize(int newWidth, int newHeight)
|
|||||||
blockMapPtr = new unsigned char[blockHeight*blockWidth];
|
blockMapPtr = new unsigned char[blockHeight*blockWidth];
|
||||||
std::fill(blockMapPtr, blockMapPtr+(blockHeight*blockWidth), 0);
|
std::fill(blockMapPtr, blockMapPtr+(blockHeight*blockWidth), 0);
|
||||||
fanVelXPtr = new float[(blockHeight)*(blockWidth)];
|
fanVelXPtr = new float[(blockHeight)*(blockWidth)];
|
||||||
std::fill(fanVelXPtr, fanVelXPtr+((blockHeight)*(blockWidth)), 0);
|
std::fill(fanVelXPtr, fanVelXPtr+((blockHeight)*(blockWidth)), 0.0f);
|
||||||
fanVelYPtr = new float[(blockHeight)*(blockWidth)];
|
fanVelYPtr = new float[(blockHeight)*(blockWidth)];
|
||||||
std::fill(fanVelYPtr, fanVelYPtr+((blockHeight)*(blockWidth)), 0);
|
std::fill(fanVelYPtr, fanVelYPtr+((blockHeight)*(blockWidth)), 0.0f);
|
||||||
|
|
||||||
blockMap = new unsigned char*[blockHeight];
|
blockMap = new unsigned char*[blockHeight];
|
||||||
for(int y = 0; y < blockHeight; y++)
|
for(int y = 0; y < blockHeight; y++)
|
||||||
@@ -330,9 +330,9 @@ void GameSave::Transform(matrix2d transform, vector2d translate)
|
|||||||
blockMapPtrNew = new unsigned char[newBlockHeight*newBlockWidth];
|
blockMapPtrNew = new unsigned char[newBlockHeight*newBlockWidth];
|
||||||
std::fill(blockMapPtrNew, blockMapPtrNew+(newBlockHeight*newBlockWidth), 0);
|
std::fill(blockMapPtrNew, blockMapPtrNew+(newBlockHeight*newBlockWidth), 0);
|
||||||
fanVelXPtrNew = new float[newBlockHeight*newBlockWidth];
|
fanVelXPtrNew = new float[newBlockHeight*newBlockWidth];
|
||||||
std::fill(fanVelXPtrNew, fanVelXPtrNew+(newBlockHeight*newBlockWidth), 0);
|
std::fill(fanVelXPtrNew, fanVelXPtrNew+(newBlockHeight*newBlockWidth), 0.0f);
|
||||||
fanVelYPtrNew = new float[(newBlockHeight)*(newBlockWidth)];
|
fanVelYPtrNew = new float[(newBlockHeight)*(newBlockWidth)];
|
||||||
std::fill(fanVelYPtrNew, fanVelYPtrNew+(newBlockHeight*newBlockWidth), 0);
|
std::fill(fanVelYPtrNew, fanVelYPtrNew+(newBlockHeight*newBlockWidth), 0.0f);
|
||||||
|
|
||||||
blockMapNew = new unsigned char*[newBlockHeight];
|
blockMapNew = new unsigned char*[newBlockHeight];
|
||||||
for(int y = 0; y < newBlockHeight; y++)
|
for(int y = 0; y < newBlockHeight; y++)
|
||||||
|
@@ -321,7 +321,7 @@ void GameModel::BuildMenus()
|
|||||||
std::cout << "Brushes: Skipping " << brushFiles[i] << ". Could not open" << std::endl;
|
std::cout << "Brushes: Skipping " << brushFiles[i] << ". Could not open" << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int dimension = std::sqrt(brushData.size());
|
int dimension = std::sqrt((float)brushData.size());
|
||||||
if(dimension * dimension != brushData.size())
|
if(dimension * dimension != brushData.size())
|
||||||
{
|
{
|
||||||
std::cout << "Brushes: Skipping " << brushFiles[i] << ". Invalid bitmap size" << std::endl;
|
std::cout << "Brushes: Skipping " << brushFiles[i] << ". Invalid bitmap size" << std::endl;
|
||||||
|
Reference in New Issue
Block a user