summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/shapedwindow.cxx8
-rw-r--r--examples/table-spreadsheet-with-keyboard-nav.cxx2
-rw-r--r--examples/table-spreadsheet.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/shapedwindow.cxx b/examples/shapedwindow.cxx
index cbc80f212..b06a6c0fb 100644
--- a/examples/shapedwindow.cxx
+++ b/examples/shapedwindow.cxx
@@ -52,13 +52,13 @@ public:
}
};
-const float factor = 1.3;
+const float factor = 1.3f;
void shrink(Fl_Widget *wdgt, void *data)
{
Fl_Window *win = wdgt->window();
int old = win->w();
- win->size(old/factor, old/factor);
+ win->size(int(old/factor), int(old/factor));
if (win->w() <= *(int*)data) wdgt->deactivate();
}
@@ -66,7 +66,7 @@ void enlarge(Fl_Widget *wdgt, void *data)
{
Fl_Window *win = wdgt->window();
int old = win->w();
- win->size(old*factor, old*factor);
+ win->size(int(old*factor), int(old*factor));
((Fl_Widget*)data)->activate();
}
@@ -80,7 +80,7 @@ Fl_RGB_Image* prepare_shape(int w)
fl_color(FL_WHITE);
fl_pie(2,2,w-4,w-4,0,360);
fl_color(FL_BLACK);
- fl_pie(0.7*w,w/2,w/4,w/4,0,360);
+ fl_pie(int(0.7*w),w/2,w/4,w/4,0,360);
Fl_RGB_Image* img = surf->image();
delete surf;
Fl_Surface_Device::pop_current();
diff --git a/examples/table-spreadsheet-with-keyboard-nav.cxx b/examples/table-spreadsheet-with-keyboard-nav.cxx
index 66273ceb9..ec8714df3 100644
--- a/examples/table-spreadsheet-with-keyboard-nav.cxx
+++ b/examples/table-spreadsheet-with-keyboard-nav.cxx
@@ -102,7 +102,7 @@ public:
input->resize(X,Y,W,H); // Move Fl_Input widget there
char s[30]; sprintf(s, "%d", values[R][C]); // Load input widget with cell's current value
input->value(s);
- input->position(0,strlen(s)); // Select entire input field
+ input->position(0,int(strlen(s))); // Select entire input field
input->show(); // Show the input widget, now that we've positioned it
input->take_focus();
}
diff --git a/examples/table-spreadsheet.cxx b/examples/table-spreadsheet.cxx
index 94a41124d..ac7c334e0 100644
--- a/examples/table-spreadsheet.cxx
+++ b/examples/table-spreadsheet.cxx
@@ -79,7 +79,7 @@ public:
input->resize(X,Y,W,H); // Move Fl_Input widget there
char s[30]; sprintf(s, "%d", values[R][C]); // Load input widget with cell's current value
input->value(s);
- input->position(0,strlen(s)); // Select entire input field
+ input->position(0, int(strlen(s))); // Select entire input field
input->show(); // Show the input widget, now that we've positioned it
input->take_focus(); // Put keyboard focus into the input widget
}