fixed compiler warnings

This commit is contained in:
2011-06-13 13:46:19 +02:00
parent 40a11244dd
commit 99f3a4dfff
6 changed files with 17 additions and 16 deletions
+1 -1
View File
@@ -186,7 +186,7 @@ void CommandSetErrorString (const std::string &error_str){
std::string CommandGetErrorString (){
if (!CommandsInitialized ())
return false;
return std::string("");
return CommandsInstance->GetErrorString();
}
+9 -3
View File
@@ -34,7 +34,7 @@ bool regionhit (int x, int y, int w, int h) {
void DrawBlock (int x, int y, int w, int h) {
const float shading_dark = 0.5f;
const float shading_light = 1.3f;
// const float shading_light = 1.3f;
float color[4];
glGetFloatv (GL_CURRENT_COLOR, color);
@@ -297,6 +297,8 @@ bool Button (int id, const char* caption, int x, int y, int w, int h) {
controller->uistate.kbditem = 0;
return true;
break;
default:
break;
}
}
@@ -418,6 +420,8 @@ bool CheckButton (int id, const char* caption, bool checked, int x, int y, int w
return true;
break;
default:
break;
}
}
@@ -541,7 +545,7 @@ bool LineEdit (int id, int x, int y, std::string &text_value, const int &maxleng
break;
default:
// The raw input processing
if (maxlength > 0 && text_value.size() < maxlength) {
if (maxlength > 0 && static_cast<int>(text_value.size()) < maxlength) {
if (controller->uistate.last_unicode) {
if ((controller->uistate.last_unicode & 0xFF80) == 0) {
// we do not want to add special characters such as backspaces
@@ -681,7 +685,7 @@ bool LineEditMasked (int id, int x, int y, std::string &text_value, const int &m
break;
default:
// The raw input processing
if (maxlength > 0 && text_value.size() < maxlength) {
if (maxlength > 0 && static_cast<int>(text_value.size()) < maxlength) {
if (controller->uistate.last_unicode) {
if ((controller->uistate.last_unicode & 0xFF80) == 0) {
char c = controller->uistate.last_unicode & 0x7F;
@@ -789,6 +793,8 @@ float VerticalSlider (int id, int x, int y, int w, int h, float min_value, float
controller->uistate.last_keysym = SDLK_CLEAR;
return true;
break;
default:
break;
}
}
+2 -2
View File
@@ -11,8 +11,8 @@ class Module;
class SoundSample {
public:
SoundSample() :
mMixChunk (NULL),
mChannel (-1) {
mChannel (-1),
mMixChunk (NULL) {
}
~SoundSample();