GridCtrl: fixed for C++11

git-svn-id: svn://ultimatepp.org/upp/trunk@7177 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-04-05 16:45:55 +00:00
parent e2263ed301
commit 34a6a0b443
4 changed files with 11 additions and 5 deletions

View file

@ -114,7 +114,13 @@ define interface contract using&]
[s7; -|struct Distribution : [* Moveable]<Distribution> `{&] [s7; -|struct Distribution : [* Moveable]<Distribution> `{&]
[s7; -|-|String text;&] [s7; -|-|String text;&]
[s7; -|-|Vector<int> data;&] [s7; -|-|Vector<int> data;&]
[s7; &]
[s7; -|-|rval`_default(Distribution);&]
[s7; -|-|Distribution() `{`}&]
[s7; -|`};&] [s7; -|`};&]
[s5; Note that rval`_default macro is helper to restore default deleted
r`-value constructor in C`+`+11 and default constructor is also
default deleted in C`+`+11.&]
[s5; Now to add Distribution elements you cannot use Add with parameter, [s5; Now to add Distribution elements you cannot use Add with parameter,
because it requires elements to have default deep`-copy constructor because it requires elements to have default deep`-copy constructor
`- and Distribution does not have one, as Vector<int> has default `- and Distribution does not have one, as Vector<int> has default
@ -667,7 +673,7 @@ and operators <, <`=, >, >`=:&]
[s7; -|&] [s7; -|&]
[s7; -|y.b `= `"a`";&] [s7; -|y.b `= `"a`";&]
[s7; -|&] [s7; -|&]
[s7; -|DUMP(SgnCompare(y));&] [s7; -|DUMP(SgnCompare(x, y));&]
[s7; -|DUMP(x < y);&] [s7; -|DUMP(x < y);&]
[s7; -|&] [s7; -|&]
[s7; &] [s7; &]

View file

@ -1826,8 +1826,6 @@ void GridCtrl::RemoveColumn(int n, int count)
r.Add(hitems[n + i].id); r.Add(hitems[n + i].id);
} }
int id = hitems[n].id;
hitems.Remove(n, count); hitems.Remove(n, count);
rowbkp.Remove(r); rowbkp.Remove(r);
summary.Remove(r); summary.Remove(r);

View file

@ -231,6 +231,9 @@ class CtrlsHolder : public Ctrl
class GridClipboard : Moveable<GridClipboard> class GridClipboard : Moveable<GridClipboard>
{ {
public: public:
rval_default(GridClipboard);
GridClipboard() {}
struct ClipboardData : Moveable<ClipboardData> struct ClipboardData : Moveable<ClipboardData>
{ {
int col, row; int col, row;
@ -1860,7 +1863,6 @@ class GridText : Ctrl
const Id* column; const Id* column;
Color fg, bg; Color fg, bg;
Font fnt; Font fnt;
int align;
public: public:

View file

@ -72,7 +72,7 @@ class GridDisplay
void SetDefault(); void SetDefault();
~GridDisplay() {}; virtual ~GridDisplay() {};
void SetLeftImage(const Image &img) { leftImg = img; } void SetLeftImage(const Image &img) { leftImg = img; }
void SetRightImage(const Image &img) { rightImg = img; } void SetRightImage(const Image &img) { rightImg = img; }