From bb7129dae2be48affa0a19292122e5ce988c0719 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 6 Nov 2022 15:03:19 +0100 Subject: Use the new Fl_Int_Vector class in Fl_Table Replace local IntVector with Fl_Int_Vector --- FL/Fl_Table.H | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) (limited to 'FL') diff --git a/FL/Fl_Table.H b/FL/Fl_Table.H index 62bc28be5..15e7836bb 100644 --- a/FL/Fl_Table.H +++ b/FL/Fl_Table.H @@ -20,6 +20,7 @@ #include #include +#include /** A table of widgets or other content. @@ -154,35 +155,8 @@ private: }; unsigned int flags_; - // An STL-ish vector without templates - class FL_EXPORT IntVector { - int *arr; - unsigned int _size; - void init() { - arr = 0; - _size = 0; - } - void copy(int *newarr, unsigned int newsize); - public: - IntVector() { init(); } // CTOR - ~IntVector(); // DTOR - IntVector(IntVector&o) { init(); copy(o.arr, o._size); } // COPY CTOR - IntVector& operator=(IntVector&o) { // ASSIGN - init(); - copy(o.arr, o._size); - return(*this); - } - int operator[](int x) const { return(arr[x]); } - int& operator[](int x) { return(arr[x]); } - unsigned int size() { return(_size); } - void size(unsigned int count); - int pop_back() { int tmp = arr[_size-1]; _size--; return(tmp); } - void push_back(int val) { unsigned int x = _size; size(_size+1); arr[x] = val; } - int back() { return(arr[_size-1]); } - }; - - IntVector _colwidths; // column widths in pixels - IntVector _rowheights; // row heights in pixels + Fl_Int_Vector _colwidths; // column widths in pixels + Fl_Int_Vector _rowheights; // row heights in pixels Fl_Cursor _last_cursor; // last mouse cursor before changed to 'resize' cursor -- cgit v1.2.3