fixed some compiler warnings

This commit is contained in:
louis 2015-04-02 11:57:19 +02:00
parent 70ce62e353
commit 6d22edc2d8
8 changed files with 11 additions and 12 deletions

View File

@ -156,7 +156,7 @@ vector<string>& splitstring::split(char delim, int rep) {
string work = data(); string work = data();
string buf = ""; string buf = "";
int i = 0; int i = 0;
while (i < work.length()) { while (i < (int)work.length()) {
if (work[i] != delim) if (work[i] != delim)
buf += work[i]; buf += work[i];
else if (rep == 1) { else if (rep == 1) {

View File

@ -91,7 +91,7 @@ cImage *cImageCache::GetLogo(string channelID, int width, int height) {
return NULL; return NULL;
bool success = LoadLogo(channel); bool success = LoadLogo(channel);
if (success) { if (success) {
if (config.limitLogoCache && (channelLogoCache.size() >= config.numLogosMax)) { if (config.limitLogoCache && ((int)channelLogoCache.size() >= config.numLogosMax)) {
//logo cache is full, don't cache anymore //logo cache is full, don't cache anymore
if (tempStaticLogo) { if (tempStaticLogo) {
delete tempStaticLogo; delete tempStaticLogo;
@ -245,6 +245,8 @@ string cImageCache::GetIconName(string label, eMenuCategory cat) {
return "standardicons/Miscellaneous"; return "standardicons/Miscellaneous";
case mcCommand: case mcCommand:
return "standardicons/Commands"; return "standardicons/Commands";
default:
break;
} }
//check for standard menu entries //check for standard menu entries
for (int i=0; i<16; i++) { for (int i=0; i<16; i++) {

View File

@ -254,7 +254,7 @@ void cConditionalParameter::Tokenize(void) {
} }
} }
bool cConditionalParameter::Evaluate(map < string, int > *intTokens, map < string, string > *stringTokens) { void cConditionalParameter::Evaluate(map < string, int > *intTokens, map < string, string > *stringTokens) {
isTrue = false; isTrue = false;
bool first = true; bool first = true;
for (vector<sCondition>::iterator cond = conditions.begin(); cond != conditions.end(); cond++) { for (vector<sCondition>::iterator cond = conditions.begin(); cond != conditions.end(); cond++) {

View File

@ -134,7 +134,7 @@ public:
cConditionalParameter(cGlobals *globals, string value); cConditionalParameter(cGlobals *globals, string value);
virtual ~cConditionalParameter(void); virtual ~cConditionalParameter(void);
void Tokenize(void); void Tokenize(void);
bool Evaluate(map < string, int > *intTokens, map < string, string > *stringTokens); void Evaluate(map < string, int > *intTokens, map < string, string > *stringTokens);
bool IsTrue(void) { return isTrue; }; bool IsTrue(void) { return isTrue; };
void Debug(void); void Debug(void);
}; };

View File

@ -316,6 +316,8 @@ bool cTemplateFunction::ReCalculateParameters(void) {
case ptRowHeight: case ptRowHeight:
SetNumericParameter(type, value); SetNumericParameter(type, value);
break; break;
default:
break;
} }
if (!paramValid) { if (!paramValid) {
paramsValid = false; paramsValid = false;
@ -1356,7 +1358,7 @@ int cTemplateFunction::CalculateTextBoxHeight(void) {
stringstream sstrTextTall; stringstream sstrTextTall;
stringstream sstrTextFull; stringstream sstrTextFull;
for (int i=0; i<flds.size(); i++) { for (int i=0; i < (int)flds.size(); i++) {
if (!flds[i].size()) { if (!flds[i].size()) {
//empty line //empty line
linesDrawn++; linesDrawn++;

View File

@ -189,7 +189,6 @@ void cTemplatePixmap::ParseDynamicFunctionParameters(map <string,string> *string
InitIterator(); InitIterator();
cTemplateFunction *func = NULL; cTemplateFunction *func = NULL;
bool completelyParsed = true; bool completelyParsed = true;
bool updated = false;
while(func = GetNextFunction()) { while(func = GetNextFunction()) {
func->SetStringTokens(stringTokens); func->SetStringTokens(stringTokens);
func->SetIntTokens(intTokens); func->SetIntTokens(intTokens);
@ -340,7 +339,6 @@ cTemplateFunction *cTemplatePixmap::GetScrollFunction(void) {
return NULL; return NULL;
InitIterator(); InitIterator();
cTemplateFunction *f = NULL; cTemplateFunction *f = NULL;
bool foundElement = false;
while (f = GetNextFunction()) { while (f = GetNextFunction()) {
string funcName = f->GetParameter(ptName); string funcName = f->GetParameter(ptName);
if (!funcName.compare(scrollElement)) { if (!funcName.compare(scrollElement)) {

View File

@ -115,7 +115,6 @@ cFont *cTemplateViewList::GetTextAreaFont(void) {
if (!listElement) if (!listElement)
return NULL; return NULL;
int fontWidth = 0;
int numItems = GetNumericParameter(ptNumElements); int numItems = GetNumericParameter(ptNumElements);
int listHeight = GetNumericParameter(ptHeight); int listHeight = GetNumericParameter(ptHeight);
if (listHeight <= 0) if (listHeight <= 0)

View File

@ -360,8 +360,7 @@ void cView::DrawLoop(int numPixmap, cTemplateFunction *func, map < string, vecto
int columnWidth = loopFunc->GetNumericParameter(ptColumnWidth); int columnWidth = loopFunc->GetNumericParameter(ptColumnWidth);
int rowHeight = loopFunc->GetNumericParameter(ptRowHeight); int rowHeight = loopFunc->GetNumericParameter(ptRowHeight);
int overflow = loopFunc->GetNumericParameter(ptOverflow); int overflow = loopFunc->GetNumericParameter(ptOverflow);
int maxItems = loopFunc->GetNumericParameter(ptNumElements);
int x0 = loopX0; int x0 = loopX0;
int y0 = loopY0; int y0 = loopY0;
@ -515,7 +514,6 @@ void cView::DoDrawTextVertical(int num, cTemplateFunction *func, int x0, int y0)
int fontSize = func->GetNumericParameter(ptFontSize); int fontSize = func->GetNumericParameter(ptFontSize);
int direction = func->GetNumericParameter(ptDirection); int direction = func->GetNumericParameter(ptDirection);
tColor clr = func->GetColorParameter(ptColor); tColor clr = func->GetColorParameter(ptColor);
tColor clrBack = clrTransparent;
string text = func->GetText(false); string text = func->GetText(false);
cImage *textVertical = imgCache->GetVerticalText(text, clr, fontName, fontSize, direction); cImage *textVertical = imgCache->GetVerticalText(text, clr, fontName, fontSize, direction);
if (!textVertical) if (!textVertical)
@ -649,7 +647,7 @@ void cView::DoDrawFloatingTextBox(int num, cTemplateFunction *func) {
std::stringstream sstrTextTall; std::stringstream sstrTextTall;
std::stringstream sstrTextFull; std::stringstream sstrTextFull;
for (int i=0; i<flds.size(); i++) { for (int i=0; i < (int)flds.size(); i++) {
if (!flds[i].size()) { if (!flds[i].size()) {
//empty line //empty line
linesDrawn++; linesDrawn++;