Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
9848699f
Commit
9848699f
authored
Jul 09, 2018
by
YuriiOlenych
Committed by
Davis E. King
Jul 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added static_cast and additional braces to fix compilation warnings. (#1405)
parent
975b6e88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
tensor_tools.cpp
dlib/cuda/tensor_tools.cpp
+2
-2
line.h
dlib/geometry/line.h
+14
-14
interpolation.h
dlib/image_transforms/interpolation.h
+2
-2
No files found.
dlib/cuda/tensor_tools.cpp
View file @
9848699f
...
...
@@ -118,7 +118,7 @@ namespace dlib { namespace tt
if
(
m
.
size
()
==
0
&&
v
.
size
()
==
0
)
return
;
DLIB_CASSERT
(
m
.
size
()
!=
0
);
DLIB_CASSERT
(
m
.
num_samples
()
==
v
.
size
(
));
DLIB_CASSERT
(
m
.
num_samples
()
==
static_cast
<
long
long
>
(
v
.
size
()
));
#ifdef DLIB_USE_CUDA
cuda
::
scale_rows
(
out
,
m
,
v
);
...
...
@@ -140,7 +140,7 @@ namespace dlib { namespace tt
DLIB_CASSERT
(
have_same_dimensions
(
out
,
m2
));
DLIB_CASSERT
(
have_same_dimensions
(
v1
,
v2
));
DLIB_CASSERT
(
is_vector
(
mat
(
v1
)));
DLIB_CASSERT
(
v1
.
size
(
)
==
m1
.
num_samples
());
DLIB_CASSERT
(
static_cast
<
long
long
>
(
v1
.
size
()
)
==
m1
.
num_samples
());
#ifdef DLIB_USE_CUDA
cuda
::
scale_rows2
(
beta
,
out
,
m1
,
m2
,
v1
,
v2
);
...
...
dlib/geometry/line.h
View file @
9848699f
...
...
@@ -210,20 +210,20 @@ namespace dlib
const
auto
&
v31
=
v13
;
const
auto
&
v32
=
v23
;
if
(
is_convex_quadrilateral
({
v01
,
v12
,
v23
,
v30
}))
return
{
v01
,
v12
,
v23
,
v30
};
if
(
is_convex_quadrilateral
({
v01
,
v13
,
v32
,
v20
}))
return
{
v01
,
v13
,
v32
,
v20
};
if
(
is_convex_quadrilateral
({
v02
,
v23
,
v31
,
v10
}))
return
{
v02
,
v23
,
v31
,
v10
};
if
(
is_convex_quadrilateral
({
v02
,
v21
,
v13
,
v30
}))
return
{
v02
,
v21
,
v13
,
v30
};
if
(
is_convex_quadrilateral
({
v03
,
v32
,
v21
,
v10
}))
return
{
v03
,
v32
,
v21
,
v10
};
if
(
is_convex_quadrilateral
({
v03
,
v31
,
v12
,
v20
}))
return
{
v03
,
v31
,
v12
,
v20
};
if
(
is_convex_quadrilateral
({
{
v01
,
v12
,
v23
,
v30
}
}))
return
{
{
v01
,
v12
,
v23
,
v30
}
};
if
(
is_convex_quadrilateral
({
{
v01
,
v13
,
v32
,
v20
}
}))
return
{
{
v01
,
v13
,
v32
,
v20
}
};
if
(
is_convex_quadrilateral
({
{
v02
,
v23
,
v31
,
v10
}
}))
return
{
{
v02
,
v23
,
v31
,
v10
}
};
if
(
is_convex_quadrilateral
({
{
v02
,
v21
,
v13
,
v30
}
}))
return
{
{
v02
,
v21
,
v13
,
v30
}
};
if
(
is_convex_quadrilateral
({
{
v03
,
v32
,
v21
,
v10
}
}))
return
{
{
v03
,
v32
,
v21
,
v10
}
};
if
(
is_convex_quadrilateral
({
{
v03
,
v31
,
v12
,
v20
}
}))
return
{
{
v03
,
v31
,
v12
,
v20
}
};
throw
no_convex_quadrilateral
();
}
...
...
dlib/image_transforms/interpolation.h
View file @
9848699f
...
...
@@ -2169,8 +2169,8 @@ namespace dlib
for
(
auto
&
p
:
pts
)
bounding_box
+=
p
;
const
std
::
array
<
dpoint
,
4
>
corners
=
{
bounding_box
.
tl_corner
(),
bounding_box
.
tr_corner
(),
bounding_box
.
bl_corner
(),
bounding_box
.
br_corner
()
};
const
std
::
array
<
dpoint
,
4
>
corners
=
{
{
bounding_box
.
tl_corner
(),
bounding_box
.
tr_corner
(),
bounding_box
.
bl_corner
(),
bounding_box
.
br_corner
()}
};
matrix
<
double
>
dists
(
4
,
4
);
for
(
long
r
=
0
;
r
<
dists
.
nr
();
++
r
)
...
...
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