Added cast to Fl_Color in all Fluid code (STR #2206)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6801 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2009-06-28 22:09:25 +00:00
parent 12c9c933fc
commit 378494cefe
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
CHANGES IN FLTK 1.1.10
- Added cast to Fl_Color in all Fluid code (STR #2206)
- Fixed wrong identifier for special keys combined with
modifier (STR #2196)
- Fixed documentation for Fl_Progress (STR #2209)

View File

@ -2124,7 +2124,8 @@ void Fl_Widget_Type::write_color(const char* field, Fl_Color color) {
}
const char *var = is_class() ? "this" : name() ? name() : "o";
if (color_name) {
write_c("%s%s->%s(%s);\n", indent(), var, field, color_name);
write_c("%s%s->%s((Fl_Color)%s);\n", indent(), var, field, color_name);
// we still must cast ^^^^^ here because a few widgets have the wrong argument type. Ouch!
} else {
write_c("%s%s->%s((Fl_Color)%d);\n", indent(), var, field, color);
}