Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
dae4a34f
Commit
dae4a34f
authored
Aug 02, 2010
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in rect::isIncluded(), and added constness.
parent
6de554ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
modules/gui/skins2/utils/pointer.hpp
modules/gui/skins2/utils/pointer.hpp
+6
-8
No files found.
modules/gui/skins2/utils/pointer.hpp
View file @
dae4a34f
...
...
@@ -105,7 +105,7 @@ public:
int
height
;
// rect2 fully included in rect1
static
bool
isIncluded
(
rect
&
rect2
,
rect
&
rect1
)
static
bool
isIncluded
(
const
rect
&
rect2
,
const
rect
&
rect1
)
{
int
x1
=
rect1
.
x
;
int
y1
=
rect1
.
y
;
...
...
@@ -117,13 +117,11 @@ public:
int
w2
=
rect2
.
width
;
int
h2
=
rect2
.
height
;
return
x2
>=
x1
&&
x2
<
x1
+
w1
&&
y2
>=
y1
&&
y2
<
y1
+
h1
&&
w2
<=
w1
&&
h2
<=
h1
;
return
x2
>=
x1
&&
x2
+
w2
<=
x1
+
w1
&&
y2
>=
y1
&&
y2
+
h2
<=
y1
+
h1
;
}
static
bool
areDisjunct
(
rect
&
rect2
,
rect
&
rect1
)
static
bool
areDisjunct
(
const
rect
&
rect2
,
const
rect
&
rect1
)
{
int
x1
=
rect1
.
x
;
int
y1
=
rect1
.
y
;
...
...
@@ -141,7 +139,7 @@ public:
||
x2
+
w2
-
1
<
x1
;
// rect2 left of rect1
}
static
bool
intersect
(
rect
&
rect1
,
rect
&
rect2
,
rect
*
pRect
)
static
bool
intersect
(
const
rect
&
rect1
,
const
rect
&
rect2
,
rect
*
pRect
)
{
int
x1
=
rect1
.
x
;
int
y1
=
rect1
.
y
;
...
...
@@ -170,7 +168,7 @@ public:
}
}
static
bool
join
(
rect
&
rect1
,
rect
&
rect2
,
rect
*
pRect
)
static
bool
join
(
const
rect
&
rect1
,
const
rect
&
rect2
,
rect
*
pRect
)
{
int
x1
=
rect1
.
x
;
int
y1
=
rect1
.
y
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment