summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2013-09-16 20:25:14 +0000
committerGreg Ercolano <erco@seriss.com>2013-09-16 20:25:14 +0000
commit67ed1a8da999af762085a516833ba99523ccaf48 (patch)
tree9d4404ba8e44f501da9e87296292187302afc6dd
parent578310dd0f74e755ff3311d3826bbfa9ba0b2bcf (diff)
STR# #2973: applied patch str_2973_r9958_sun-fix-errors-5.patch verbatim.
src/Fl_Tree_Item.cxx -- solve: "Fl_Tree_Item.cxx", line 614: Error: Initializing int& requires an lvalue. FL/Fl_Preferences.H -- solve: "FL/Fl_Preferences.H", line 196: Error: Fl_Preferences::RootNode is not accessible from 0 FL/Fl_Tree_Item.H -- solve: "Fl_Tree_Item.cxx", line 614: Error: Initializing int& requires an lvalue. test/unittests.cxx -- solve: "unittests.cxx", line 95: Error: The type "UnitTest*[]" is incomplete. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9978 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/Fl_Preferences.H1
-rw-r--r--FL/Fl_Tree_Item.H2
-rw-r--r--src/Fl_Tree_Item.cxx9
-rw-r--r--test/unittests.cxx4
4 files changed, 10 insertions, 6 deletions
diff --git a/FL/Fl_Preferences.H b/FL/Fl_Preferences.H
index 9659e10a4..f7d193e52 100644
--- a/FL/Fl_Preferences.H
+++ b/FL/Fl_Preferences.H
@@ -185,6 +185,7 @@ private:
static char uuidBuffer[40];
static Fl_Preferences *runtimePrefs;
+public: // older Sun compilers need this (public definition of the following classes)
class RootNode;
class FL_EXPORT Node { // a node contains a list to all its entries
diff --git a/FL/Fl_Tree_Item.H b/FL/Fl_Tree_Item.H
index 13a77502a..5a3a8d6db 100644
--- a/FL/Fl_Tree_Item.H
+++ b/FL/Fl_Tree_Item.H
@@ -61,7 +61,7 @@ class FL_EXPORT Fl_Tree_Item {
OPEN = 1<<0, ///> item is open
VISIBLE = 1<<1, ///> item is visible
ACTIVE = 1<<2, ///> item is active
- SELECTED = 1<<3, ///> item is selected
+ SELECTED = 1<<3 ///> item is selected
};
#if FLTK_ABI_VERSION >= 10301
// NEW
diff --git a/src/Fl_Tree_Item.cxx b/src/Fl_Tree_Item.cxx
index 20070c12b..307f1e9c3 100644
--- a/src/Fl_Tree_Item.cxx
+++ b/src/Fl_Tree_Item.cxx
@@ -611,9 +611,12 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
// We don't care about items clipped off the viewport; they won't get mouse events.
//
int item_y_center = Y+(H/2);
- int &icon_w = _collapse_xywh[2] = prefs.openicon()->w();
- int &icon_x = _collapse_xywh[0] = X + (icon_w + prefs.connectorwidth())/2 - 3;
- int &icon_y = _collapse_xywh[1] = item_y_center - (prefs.openicon()->h()/2);
+ _collapse_xywh[2] = prefs.openicon()->w();
+ int &icon_w = _collapse_xywh[2];
+ _collapse_xywh[0] = X + (icon_w + prefs.connectorwidth())/2 - 3;
+ int &icon_x = _collapse_xywh[0];
+ _collapse_xywh[1] = item_y_center - (prefs.openicon()->h()/2);
+ int &icon_y = _collapse_xywh[1];
_collapse_xywh[3] = prefs.openicon()->h();
// Horizontal connector values
diff --git a/test/unittests.cxx b/test/unittests.cxx
index c5dbc3a87..d07cd8edf 100644
--- a/test/unittests.cxx
+++ b/test/unittests.cxx
@@ -88,11 +88,11 @@ private:
nTest++;
}
static int nTest;
- static UnitTest *fTest[200];
+ static UnitTest *fTest[];
};
int UnitTest::nTest = 0;
-UnitTest *UnitTest::fTest[];
+UnitTest *UnitTest::fTest[200];
// The main window needs an additional drawing feature in order to support