fix some compiler warnings

This commit is contained in:
Christopher Mosher 2013-12-16 22:20:11 -05:00
parent 500be66a0b
commit 6a231c3812
3 changed files with 4 additions and 5 deletions

View File

@ -67,6 +67,8 @@ static int HSVtoRGB(const int h, const float s, const float v)
g = v * (1 - s);
b = v * (1 - s * f);
break;
default:
r = g = b = 0;
}
return (tobyt(r) << 16) | (tobyt(g) << 8) | (tobyt(b));

View File

@ -26,6 +26,8 @@
class Cassette
{
private:
ScreenImage& gui;
unsigned int t;
unsigned int prevT;
@ -41,8 +43,6 @@ private:
unsigned int pos;
bool modified;
ScreenImage& gui;
void checkForWriteProtection();
unsigned char getHalfCycleTime(); // in 10-microsecond units

View File

@ -184,7 +184,6 @@ int Emulator::run() {
void Emulator::dispatchKeyUp(const SDL_KeyboardEvent& keyEvent) {
SDL_Keycode sym = keyEvent.keysym.sym;
SDL_Keymod mod = (SDL_Keymod) keyEvent.keysym.mod;
unsigned char key = (unsigned char) (sym & 0x7F);
if ((sym < 0x7F || sym == SDLK_LEFT || sym == SDLK_RIGHT) &&
!(sym == SDLK_TAB || sym == SDLK_BACKQUOTE || sym == '[' || sym == '\\' || sym == SDLK_DELETE) &&
@ -289,7 +288,6 @@ void Emulator::dispatchKeypress(const SDL_KeyboardEvent& keyEvent) {
SDL_Keycode sym = keyEvent.keysym.sym;
SDL_Keymod mod = (SDL_Keymod) keyEvent.keysym.mod;
SDL_Scancode scan = keyEvent.keysym.scancode;
//printf("keydown: mod: %04X sym: %08X scan:%04X name:%s\n", mod, sym, scan, SDL_GetKeyName(sym));
@ -394,7 +392,6 @@ void Emulator::dispatchKeypress(const SDL_KeyboardEvent& keyEvent) {
void Emulator::cmdKey(const SDL_KeyboardEvent& keyEvent) {
SDL_Keycode sym = keyEvent.keysym.sym;
SDL_Keymod mod = (SDL_Keymod) keyEvent.keysym.mod;
unsigned char key = (unsigned char) (sym & 0x7F);
if (sym == SDLK_RETURN) {