code improvement

This commit is contained in:
Markus Gans 2016-01-10 06:47:40 +01:00
parent 9bc6ec6f96
commit df5e7e7ccf
2 changed files with 4 additions and 2 deletions

View File

@ -849,7 +849,7 @@ short FOptiAttr::vga2ansi (register short color)
// 1 1 1 0 | 1 0 1 1 // 1 1 1 0 | 1 0 1 1
// 1 1 1 1 | 1 1 1 1 // 1 1 1 1 | 1 1 1 1
if ( color < 16 ) if ( ! color < 0 && color < 16 )
{ {
static const short lookup_table[] = static const short lookup_table[] =
{ {

View File

@ -169,7 +169,9 @@ class AttribDemo : public FWidget
{ } { }
void onWheel (FWheelEvent* ev) void onWheel (FWheelEvent* ev)
{ {
dynamic_cast<AttribDlg*>(parentWidget())->onWheel(ev); AttribDlg* p = dynamic_cast<AttribDlg*>(parentWidget());
if ( p )
p->onWheel(ev);
} }
}; };
#pragma pack(pop) #pragma pack(pop)