1
0
Fork 0

fix/work around some gcc Wall warnings

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3192
This commit is contained in:
Sebastian Strohhäcker 2008-08-06 18:34:21 +00:00
parent 3d40069e4a
commit c78a9f6c03
41 changed files with 280 additions and 219 deletions

View file

@ -19,7 +19,7 @@
/* TODO:
- make menu a bufferedwindow with shadow
*/
/* $Id: gui_tk.cpp,v 1.2 2007-10-28 17:05:28 c2woody Exp $ */
/* $Id: gui_tk.cpp,v 1.3 2008-08-06 18:33:47 c2woody Exp $ */
/** \file
* \brief Implementation file for gui_tk.
@ -146,7 +146,7 @@ void Drawable::drawText(const String& text, bool interpret, Size start, Size len
switch (param) {
case 0: setColor(Color::Black); break;
case 1: setColor(color | 0x00808080); break;
case 30: setColor(Color::Black|bright & intensity); break;
case 30: setColor((Color::Black|bright) & intensity); break;
case 31: setColor(Color::Red & intensity); break;
case 32: setColor(Color::Green & intensity); break;
case 33: setColor(Color::Yellow & intensity); break;
@ -426,7 +426,7 @@ void BitmapFont::drawChar(Drawable *d, const Char c) const {
ptr = char_position[c];
bit = 0;
} else {
move(character_step*c);
move(character_step*((int)c));
}
int rs = row_step;
@ -1380,7 +1380,7 @@ void ScreenRGB32le::paint(Drawable &d) const
test(d);
}
static const MouseButton SDL_to_GUI(const int button)
static MouseButton SDL_to_GUI(const int button)
{
switch (button) {
case SDL_BUTTON_LEFT: return GUI::Left;

View file

@ -102,7 +102,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/* $Id: gui_tk.h,v 1.2 2007-11-06 20:26:27 qbix79 Exp $ */
/* $Id: gui_tk.h,v 1.3 2008-08-06 18:33:47 c2woody Exp $ */
#ifndef GUI__TOOLKIT_H
#define GUI__TOOLKIT_H
@ -1988,7 +1988,7 @@ public:
if (selected >= 0 && !menus[selected]->isVisible()) oldselected = -1;
if (selected >= 0) menus[selected]->setVisible(false);
if (x < 0 || x >= lastx) return true;
for (selected = menus.size()-1; menus[selected]->getX() > x; selected--);
for (selected = menus.size()-1; menus[selected]->getX() > x; selected--) {};
if (oldselected == selected) selected = -1;
else menus[selected]->setVisible(true);
return true;