cleanup from cppcheck 1.62
This commit is contained in:
parent
7efb37b723
commit
9350b16c4a
|
@ -111,8 +111,6 @@ Config::Config() {
|
|||
fileName.second = "";
|
||||
fileNameParameter.first = "";
|
||||
fileNameParameter.second = "";
|
||||
fileLoaded.first = false;
|
||||
fileLoaded.second = false;
|
||||
}
|
||||
|
||||
bool Config::tryCustomPath(std::pair<ConfigType,ConfigType> &type, std::pair<string,string> &file, string custom_path) {
|
||||
|
|
|
@ -39,8 +39,6 @@ private:
|
|||
Stats stats;
|
||||
|
||||
GraphicButton buttonExit;
|
||||
int mouseX;
|
||||
int mouseY;
|
||||
int mouse2d;
|
||||
GraphicMessageBox mainMessageBox;
|
||||
Texture2D *renderToTexture;
|
||||
|
|
|
@ -87,8 +87,6 @@ private:
|
|||
private:
|
||||
vector<Text *> texts;
|
||||
int timer;
|
||||
int mouseX;
|
||||
int mouseY;
|
||||
int mouse2d;
|
||||
|
||||
//Model *mainModel;
|
||||
|
|
|
@ -269,7 +269,7 @@ static void cleanupProcessObjects() {
|
|||
|
||||
for(int i = 0; i < Thread::getThreadList().size(); ++i) {
|
||||
BaseThread *baseThread = dynamic_cast<BaseThread *>(Thread::getThreadList()[i]);
|
||||
printf("Thread index: %d ptr [%p] isBaseThread: %d, Name: [%s]\n",i,baseThread,(baseThread != NULL),(baseThread != NULL ? baseThread->getUniqueID().c_str() : "<na>"));
|
||||
printf("Thread index: %d ptr [%p] isBaseThread: %d, Name: [%s]\n",i,baseThread,(baseThread != NULL ? 1 : 0),(baseThread != NULL ? baseThread->getUniqueID().c_str() : "<na>"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -421,7 +421,7 @@ bool next_word_is_ASCII(const string &str_,int start_index) {
|
|||
int length = end_index-start_index+1;
|
||||
string word = str_.substr(start_index,length);
|
||||
//printf("Line: %d word [%s] length: %d\n",__LINE__,word.c_str(),length);
|
||||
int alphaCount = 0;
|
||||
//int alphaCount = 0;
|
||||
for(int index = 0; index < word.size(); ++index) {
|
||||
//printf("%c = %d,",word[index],isalnum(word[index]));
|
||||
if(isalnum(word[index]) != 0) {
|
||||
|
@ -644,7 +644,7 @@ void Font::bidi_cvt(string &str_) {
|
|||
vtol = new FriBidiStrIndex[size * 3];
|
||||
|
||||
FriBidiCharType base;
|
||||
size_t len, orig_len;
|
||||
size_t len;
|
||||
|
||||
//A bool type to see if conversion succeded
|
||||
fribidi_boolean log2vis;
|
||||
|
@ -657,7 +657,7 @@ void Font::bidi_cvt(string &str_) {
|
|||
strcpy(ip, str_.c_str());
|
||||
|
||||
//Find length of originall text
|
||||
orig_len = len = strlen( ip );
|
||||
len = strlen( ip );
|
||||
|
||||
//Insert ip to logical as unicode (and find it's size now)
|
||||
len = fribidi_charset_to_unicode (char_set_num, ip, (FriBidiStrIndex)len, logical);
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
CPPUNIT_ASSERT_EQUAL( 45,(int)IntroText1.size() );
|
||||
|
||||
std::vector<std::pair<char, int> > result = Font::extract_mixed_LTR_RTL_map(IntroText1);
|
||||
//CPPUNIT_ASSERT_EQUAL( 30, (int)result.size() );
|
||||
CPPUNIT_ASSERT_EQUAL( 30, (int)result.size() );
|
||||
|
||||
#ifdef HAVE_FRIBIDI
|
||||
IntroText1 = expected;
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
CPPUNIT_ASSERT_EQUAL( 44,(int)LuaDisableSecuritySandbox.size() );
|
||||
|
||||
result = Font::extract_mixed_LTR_RTL_map(LuaDisableSecuritySandbox);
|
||||
//CPPUNIT_ASSERT_EQUAL( 7, (int)result.size() );
|
||||
CPPUNIT_ASSERT_EQUAL( 4, (int)result.size() );
|
||||
|
||||
//printf("Result: [%s]\n",LuaDisableSecuritySandbox.c_str());
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
CPPUNIT_ASSERT_EQUAL( false, newInstance.isInitialized() );
|
||||
}
|
||||
void test_load_file_missing() {
|
||||
XmlNode *rootNode = XmlIo::getInstance().load("/some/path/that/does/not exist", std::map<string,string>());
|
||||
XmlIo::getInstance().load("/some/path/that/does/not exist", std::map<string,string>());
|
||||
}
|
||||
void test_load_file_valid() {
|
||||
const string test_filename = "xml_test_valid.xml";
|
||||
|
@ -121,7 +121,7 @@ public:
|
|||
createMalformedXMLTestFile(test_filename);
|
||||
SafeRemoveTestFile deleteFile(test_filename);
|
||||
|
||||
XmlNode *rootNode = XmlIo::getInstance().load(test_filename, std::map<string,string>());
|
||||
XmlIo::getInstance().load(test_filename, std::map<string,string>());
|
||||
}
|
||||
|
||||
void test_save_file_null_node() {
|
||||
|
@ -174,7 +174,7 @@ public:
|
|||
CPPUNIT_ASSERT_EQUAL( false, newInstance.isInitialized() );
|
||||
}
|
||||
void test_load_file_missing() {
|
||||
XmlNode *rootNode = XmlIoRapid::getInstance().load("/some/path/that/does/not exist", std::map<string,string>());
|
||||
XmlIoRapid::getInstance().load("/some/path/that/does/not exist", std::map<string,string>());
|
||||
}
|
||||
void test_load_file_valid() {
|
||||
const string test_filename = "xml_test_valid.xml";
|
||||
|
@ -190,7 +190,7 @@ public:
|
|||
const string test_filename = "xml_test_malformed.xml";
|
||||
createMalformedXMLTestFile(test_filename);
|
||||
SafeRemoveTestFile deleteFile(test_filename);
|
||||
XmlNode *rootNode = XmlIoRapid::getInstance().load(test_filename, std::map<string,string>());
|
||||
XmlIoRapid::getInstance().load(test_filename, std::map<string,string>());
|
||||
}
|
||||
|
||||
void test_save_file_null_node() {
|
||||
|
@ -548,7 +548,7 @@ public:
|
|||
CPPUNIT_ASSERT_EQUAL( string(""),attr.getValue() );
|
||||
|
||||
attr.setValue("-123456");
|
||||
int value = attr.getIntValue(1, 10);
|
||||
attr.getIntValue(1, 10);
|
||||
}
|
||||
void test_node_attributes_float_outofrange() {
|
||||
const string test_filename = "xml_test_valid.xml";
|
||||
|
@ -562,7 +562,7 @@ public:
|
|||
XmlAttribute attr(node, mapTagReplacementValues);
|
||||
|
||||
attr.setValue("-123456.01");
|
||||
float value = attr.getFloatValue(-123456.999f, -123456.123456f);
|
||||
attr.getFloatValue(-123456.999f, -123456.123456f);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -188,10 +188,10 @@ int g3d2xml(FILE *infile, FILE *outfile)
|
|||
|
||||
/* write out XML mesh header */
|
||||
fprintf(outfile, "\t<Mesh name=\"%s\" ", meshHeader.name);
|
||||
fprintf(outfile, "frameCount=\"%d\" ", meshHeader.frameCount);
|
||||
fprintf(outfile, "vertexCount=\"%d\" ",
|
||||
fprintf(outfile, "frameCount=\"%u\" ", meshHeader.frameCount);
|
||||
fprintf(outfile, "vertexCount=\"%u\" ",
|
||||
meshHeader.vertexCount);
|
||||
fprintf(outfile, "indexCount=\"%d\" ", meshHeader.indexCount);
|
||||
fprintf(outfile, "indexCount=\"%u\" ", meshHeader.indexCount);
|
||||
fprintf(outfile, "specularPower=\"%f\" ",
|
||||
meshHeader.specularPower);
|
||||
fprintf(outfile, "opacity=\"%f\" ", meshHeader.opacity);
|
||||
|
@ -352,7 +352,7 @@ int g3d2xml(FILE *infile, FILE *outfile)
|
|||
fprintf(outfile, "\t\t<Indices>\n");
|
||||
for (kk=0; kk < meshHeader.indexCount; kk++)
|
||||
{
|
||||
fprintf(outfile, "\t\t\t<Ix i=\"%d\"/>\n",
|
||||
fprintf(outfile, "\t\t\t<Ix i=\"%u\"/>\n",
|
||||
idata[kk]);
|
||||
}
|
||||
fprintf(outfile, "\t\t</Indices>\n");
|
||||
|
|
Loading…
Reference in New Issue