mirror of https://github.com/fltk/fltk
Fix remaining VS compiler warnings in example programs
This commit is contained in:
parent
5810edaf84
commit
55f3df268c
|
@ -31,7 +31,7 @@ Fl_Choice *G_choice = 0;
|
|||
// Fl_Choice callback for changing chart type()
|
||||
static void chart_type_cb(Fl_Widget *w, void*) {
|
||||
const Fl_Menu_Item *item = G_choice->mvalue(); // item picked
|
||||
G_chart->type( item->argument() ); // apply change
|
||||
G_chart->type( (uchar)item->argument() ); // apply change
|
||||
G_chart->redraw();
|
||||
// printf("Choice: '%s', argument=%ld\n", G_choice->text(), item->argument());
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
switch ( event ) {
|
||||
case FL_PUSH: { // do 'copy/dnd' when someone clicks on box
|
||||
const char *msg = "It works!";
|
||||
Fl::copy(msg,strlen(msg),0);
|
||||
Fl::copy(msg, (int)strlen(msg), 0);
|
||||
Fl::dnd();
|
||||
ret = 1;
|
||||
break;
|
||||
|
|
|
@ -48,7 +48,7 @@ void butt_cb(Fl_Widget *butt, void *data) {
|
|||
w->end(); // end adding to window
|
||||
// Computation loop..
|
||||
for ( int t=1; t<=500; t++ ) {
|
||||
progress->value(t/500.0); // update progress bar with 0.0 ~ 1.0 value
|
||||
progress->value(float(t/500.0)); // update progress bar with 0.0 ~ 1.0 value
|
||||
char percent[10];
|
||||
sprintf(percent, "%d%%", int((t/500.0)*100.0));
|
||||
progress->label(percent); // update progress bar's label
|
||||
|
|
Loading…
Reference in New Issue