From 67ed1a8da999af762085a516833ba99523ccaf48 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Mon, 16 Sep 2013 20:25:14 +0000 Subject: [PATCH] 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 --- FL/Fl_Preferences.H | 1 + FL/Fl_Tree_Item.H | 2 +- src/Fl_Tree_Item.cxx | 9 ++++++--- test/unittests.cxx | 4 ++-- 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