summaryrefslogtreecommitdiff
path: root/src/Fl_Flex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Flex.cxx')
-rw-r--r--src/Fl_Flex.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Fl_Flex.cxx b/src/Fl_Flex.cxx
index 20437783c..ebcdea4e0 100644
--- a/src/Fl_Flex.cxx
+++ b/src/Fl_Flex.cxx
@@ -212,7 +212,8 @@ void Fl_Flex::layout() {
// Precalculate remaining space that can be distributed
- for (int i = 0; i < nc; i++) {
+ int i;
+ for (i = 0; i < nc; i++) {
Fl_Widget *c = child(i);
if (c->visible()) {
if (fixed(c)) {
@@ -239,7 +240,7 @@ void Fl_Flex::layout() {
sp++;
}
- for (int i = 0; i < nc; i++) {
+ for (i = 0; i < nc; i++) {
Fl_Widget *c = child(i);
if (!c->visible())
continue;
@@ -304,7 +305,8 @@ void Fl_Flex::fixed(Fl_Widget *child, int size) {
// find w in our fixed size list
int idx = -1;
- for (int i = 0; i < fixed_size_size_; i++) {
+ int i;
+ for (i = 0; i < fixed_size_size_; i++) {
if (fixed_size_[i] == child) {
idx = i;
break;
@@ -313,7 +315,7 @@ void Fl_Flex::fixed(Fl_Widget *child, int size) {
// remove from array, if we want the widget to be flexible, but an entry was found
if (size == 0 && idx >= 0) {
- for (int i = idx; i < fixed_size_size_ - 1; i++) {
+ for (i = idx; i < fixed_size_size_ - 1; i++) {
fixed_size_[i] = fixed_size_[i+1];
}
fixed_size_size_--;
@@ -352,7 +354,8 @@ void Fl_Flex::fixed(Fl_Widget *child, int size) {
\retval 0 the widget resizes dynamically
*/
int Fl_Flex::fixed(Fl_Widget *w) const {
- for (int i = 0; i < fixed_size_size_; i++) {
+ int i;
+ for (i = 0; i < fixed_size_size_; i++) {
if (w == fixed_size_[i]) {
return 1;
}