Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
2b4dc97c
Commit
2b4dc97c
authored
May 20, 2012
by
Davis King
Browse files
All I did in this change was rename a bunch of reinterpret_casts
to static_casts whenever it was possilbe to do so.
parent
5a166a6d
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
dlib/threads/threads_kernel_1.cpp
dlib/threads/threads_kernel_1.cpp
+1
-1
dlib/threads/threads_kernel_2.cpp
dlib/threads/threads_kernel_2.cpp
+1
-1
dlib/threads/threads_kernel_shared.cpp
dlib/threads/threads_kernel_shared.cpp
+1
-1
dlib/type_safe_union/type_safe_union_kernel.h
dlib/type_safe_union/type_safe_union_kernel.h
+3
-3
No files found.
dlib/threads/threads_kernel_1.cpp
View file @
2b4dc97c
...
...
@@ -31,7 +31,7 @@ namespace dlib
void
*
param
)
{
info
*
alloc_p
=
reinterpret
_cast
<
info
*>
(
param
);
info
*
alloc_p
=
static
_cast
<
info
*>
(
param
);
info
p
=
*
alloc_p
;
delete
alloc_p
;
...
...
dlib/threads/threads_kernel_2.cpp
View file @
2b4dc97c
...
...
@@ -29,7 +29,7 @@ namespace dlib
void
*
param
)
{
info
*
alloc_p
=
reinterpret
_cast
<
info
*>
(
param
);
info
*
alloc_p
=
static
_cast
<
info
*>
(
param
);
info
p
=
*
alloc_p
;
delete
alloc_p
;
...
...
dlib/threads/threads_kernel_shared.cpp
View file @
2b4dc97c
...
...
@@ -201,7 +201,7 @@ namespace dlib
)
{
// get a reference to the calling threader object
threader
&
self
=
*
reinterpret
_cast
<
threader
*>
(
object
);
threader
&
self
=
*
static
_cast
<
threader
*>
(
object
);
{
...
...
dlib/type_safe_union/type_safe_union_kernel.h
View file @
2b4dc97c
...
...
@@ -195,7 +195,7 @@ namespace dlib
- returns a non-const reference to the T object
!*/
{
return
*
reinterpret
_cast
<
T
*>
(
mem
.
get
());
return
*
static
_cast
<
T
*>
(
mem
.
get
());
}
template
<
typename
T
>
...
...
@@ -208,7 +208,7 @@ namespace dlib
- returns a const reference to the T object
!*/
{
return
*
reinterpret
_cast
<
const
T
*>
(
mem
.
get
());
return
*
static
_cast
<
const
T
*>
(
mem
.
get
());
}
template
<
typename
T
>
...
...
@@ -518,7 +518,7 @@ namespace dlib
{
validate_type
<
T
>
();
construct
<
T
>
();
return
*
reinterpret
_cast
<
T
*>
(
mem
.
get
());
return
*
static
_cast
<
T
*>
(
mem
.
get
());
}
template
<
typename
T
>
...
...
Prev
1
2
Next
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