- a few more fixes found using cppcheck
This commit is contained in:
parent
9286130138
commit
433f4e84ce
|
@ -4,7 +4,7 @@
|
||||||
# Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
|
# Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
|
||||||
# Copyright (c) 2011 Mark Vejvoda under GNU GPL v3.0+
|
# Copyright (c) 2011 Mark Vejvoda under GNU GPL v3.0+
|
||||||
|
|
||||||
cppcheck ../../source/ -i ../../source/win32_deps -i ../../source/configurator -j 5 --enable=all 2> cppcheck.log
|
cppcheck ../../source/ -i ../../source/win32_deps -i ../../source/configurator -j 5 --enable=all --force --verbose 2> cppcheck.log
|
||||||
|
|
||||||
echo "Results from cppcheck were written to cppcheck.log"
|
echo "Results from cppcheck were written to cppcheck.log"
|
||||||
|
|
||||||
|
|
|
@ -1963,7 +1963,7 @@ void Map::loadGame(const XmlNode *rootNode, World *world) {
|
||||||
//XmlNode *surfaceCellNode = mapNode->getChild("SurfaceCell");
|
//XmlNode *surfaceCellNode = mapNode->getChild("SurfaceCell");
|
||||||
string exploredList = surfaceCellNode->getAttribute("exploredList")->getValue();
|
string exploredList = surfaceCellNode->getAttribute("exploredList")->getValue();
|
||||||
string visibleList = surfaceCellNode->getAttribute("visibleList")->getValue();
|
string visibleList = surfaceCellNode->getAttribute("visibleList")->getValue();
|
||||||
int batchIndex = surfaceCellNode->getAttribute("batchIndex")->getIntValue();
|
//int batchIndex = surfaceCellNode->getAttribute("batchIndex")->getIntValue();
|
||||||
|
|
||||||
vector<string> tokensExplored;
|
vector<string> tokensExplored;
|
||||||
Tokenize(exploredList,tokensExplored,",");
|
Tokenize(exploredList,tokensExplored,",");
|
||||||
|
|
|
@ -617,7 +617,7 @@ pair<bool,time_t> hasCachedFileCRCValue(string crcCacheFile, int32 &value) {
|
||||||
time_t refreshDate = 0;
|
time_t refreshDate = 0;
|
||||||
int32 crcValue = 0;
|
int32 crcValue = 0;
|
||||||
time_t lastUpdateDate = 0;
|
time_t lastUpdateDate = 0;
|
||||||
int readbytes = fscanf(fp,"%ld,%d,%ld",&refreshDate,&crcValue,&lastUpdateDate);
|
int readbytes = fscanf(fp,"%20ld,%20d,%20ld",&refreshDate,&crcValue,&lastUpdateDate);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
result.second = lastUpdateDate;
|
result.second = lastUpdateDate;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user