]> git.pld-linux.org Git - packages/ilixi.git/blame - c++98.patch
- more c++98 fixes
[packages/ilixi.git] / c++98.patch
CommitLineData
25fca757
JR
1diff --git a/ilixi/graphics/Surface.cpp b/ilixi/graphics/Surface.cpp
2index 7489725..84b789f 100644
3--- a/ilixi/graphics/Surface.cpp
4+++ b/ilixi/graphics/Surface.cpp
5@@ -175,7 +175,11 @@ void
6 Surface::setGeometry(int x, int y, int width, int height)
7 {
8 ILOG_TRACE(ILX_SURFACE);
9- DFBRectangle r = { x, y, width, height };
10+ DFBRectangle r;
11+ r.x = x;
12+ r.y = y;
13+ r.w = width;
14+ r.h = height;
15 if (_parentSurface)
16 {
17 DFBResult ret = _dfbSurface->MakeSubSurface(_dfbSurface, _parentSurface, &r);
18@@ -253,25 +253,41 @@ Surface::flip(const Rectangle& rect)
19
20 if (r.y1)
21 {
22- DFBRectangle rect = { 0, 0, w, r.y1 };
23+ DFBRectangle rect;
24+ rect.x = 0;
25+ rect.y = 0;
26+ rect.w = w;
27+ rect.h = r.y1;
28 _dfbSurface->Blit(_dfbSurface, _dfbSurface, &rect, rect.x, rect.y);
29 }
30
31 if (r.y2 < h - 1)
32 {
33- DFBRectangle rect = { 0, r.y2 + 1, w, h - r.y2 - 1 };
34+ DFBRectangle rect;
35+ rect.x = 0;
36+ rect.y = r.y2 + 1;
37+ rect.w = w;
38+ rect.h = h - r.y2 - 1;
39 _dfbSurface->Blit(_dfbSurface, _dfbSurface, &rect, rect.x, rect.y);
40 }
41
42 if (r.x1)
43 {
44- DFBRectangle rect = { 0, r.y1, r.x1, r.y2 - r.y1 + 1 };
45+ DFBRectangle rect;
46+ rect.x = 0;
47+ rect.y = r.y1;
48+ rect.w = r.x1;
49+ rect.h = r.y2 - r.y1 + 1;
50 _dfbSurface->Blit(_dfbSurface, _dfbSurface, &rect, rect.x, rect.y);
51 }
52
53 if (r.x2 < w - 1)
54 {
55- DFBRectangle rect = { r.x2 + 1, r.y1, w - r.x2 - 1, r.y2 - r.y1 + 1 };
56+ DFBRectangle rect;
57+ rect.x = r.x2 + 1;
58+ rect.y = r.y1;
59+ rect.w = w - r.x2 - 1;
60+ rect.h = r.y2 - r.y1 + 1;
61 _dfbSurface->Blit(_dfbSurface, _dfbSurface, &rect, rect.x, rect.y);
62 }
63
64@@ -520,7 +524,11 @@ Surface::setStereoGeometry(const Rectangle& geometry, int zIndex)
65 void
66 Surface::setStereoGeometry(int x, int y, int width, int height, int zIndex)
67 {
68- DFBRectangle r = { x, y, width, height };
69+ DFBRectangle r;
70+ r.x = x;
71+ r.y = y;
72+ r.w = width;
73+ r.h = height;
74 if (_parentSurface)
75 {
76 r.x += zIndex;
c1a4e61d
JR
77diff --git a/ilixi/types/Rectangle.cpp b/ilixi/types/Rectangle.cpp
78index 9aa5171..1de5b91 100644
79--- a/ilixi/types/Rectangle.cpp
80+++ b/ilixi/types/Rectangle.cpp
81@@ -341,14 +341,22 @@ DFBBox Rectangle::dfbBox() const
82 DFBRectangle
83 Rectangle::dfbRect() const
84 {
85- DFBRectangle r = { x(), y(), width(), height() };
86+ DFBRectangle r;
87+ r.x = x();
88+ r.y = y();
89+ r.w = width();
90+ r.h = height();
91 return r;
92 }
93
94 DFBRegion
95 Rectangle::dfbRegion() const
96 {
97- DFBRegion r = { x(), y(), right() - 1, bottom() - 1 };
98+ DFBRegion r;
99+ r.x1 = x();
100+ r.y1 = y();
101+ r.x2 = right() - 1;
102+ r.y2 = bottom() - 1;
103 return r;
104 }
105
This page took 0.07693 seconds and 4 git commands to generate.