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
2b4dc97c
Commit
2b4dc97c
authored
May 21, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
88 additions
and
88 deletions
+88
-88
binary_search_tree_kernel_c.h
dlib/binary_search_tree/binary_search_tree_kernel_c.h
+5
-5
cmd_line_parser_kernel_1.h
dlib/cmd_line_parser/cmd_line_parser_kernel_1.h
+9
-9
config_reader_kernel_1.h
dlib/config_reader/config_reader_kernel_1.h
+2
-2
config_reader_thread_safe_1.h
dlib/config_reader/config_reader_thread_safe_1.h
+3
-3
gui_core_kernel_1.cpp
dlib/gui_core/gui_core_kernel_1.cpp
+1
-1
drawable.cpp
dlib/gui_widgets/drawable.cpp
+1
-1
widgets.cpp
dlib/gui_widgets/widgets.cpp
+1
-1
hash_map_kernel_c.h
dlib/hash_map/hash_map_kernel_c.h
+13
-13
hash_set_kernel_c.h
dlib/hash_set/hash_set_kernel_c.h
+1
-1
hash_table_kernel_c.h
dlib/hash_table/hash_table_kernel_c.h
+5
-5
linker_kernel_1.cpp
dlib/linker/linker_kernel_1.cpp
+1
-1
map_kernel_c.h
dlib/map/map_kernel_c.h
+13
-13
memory_manager_kernel_1.h
dlib/memory_manager/memory_manager_kernel_1.h
+6
-6
memory_manager_kernel_2.h
dlib/memory_manager/memory_manager_kernel_2.h
+6
-6
memory_manager_kernel_3.h
dlib/memory_manager/memory_manager_kernel_3.h
+8
-8
server_kernel_1.h
dlib/server/server_kernel_1.h
+1
-1
set_kernel_c.h
dlib/set/set_kernel_c.h
+1
-1
pipe.cpp
dlib/test/pipe.cpp
+3
-3
sockstreambuf.cpp
dlib/test/sockstreambuf.cpp
+1
-1
create_new_thread_extension.h
dlib/threads/create_new_thread_extension.h
+1
-1
threads_kernel_1.cpp
dlib/threads/threads_kernel_1.cpp
+1
-1
threads_kernel_2.cpp
dlib/threads/threads_kernel_2.cpp
+1
-1
threads_kernel_shared.cpp
dlib/threads/threads_kernel_shared.cpp
+1
-1
type_safe_union_kernel.h
dlib/type_safe_union/type_safe_union_kernel.h
+3
-3
No files found.
dlib/binary_search_tree/binary_search_tree_kernel_c.h
View file @
2b4dc97c
...
@@ -86,7 +86,7 @@ namespace dlib
...
@@ -86,7 +86,7 @@ namespace dlib
range
&
r
range
&
r
)
)
{
{
DLIB_CASSERT
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
),
DLIB_CASSERT
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
),
"
\t
void binary_search_tree::add"
"
\t
void binary_search_tree::add"
<<
"
\n\t
you can't call add() and give the same object to both parameters."
<<
"
\n\t
you can't call add() and give the same object to both parameters."
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
...
@@ -131,9 +131,9 @@ namespace dlib
...
@@ -131,9 +131,9 @@ namespace dlib
)
)
{
{
DLIB_CASSERT
(
this
->
operator
[](
d
)
!=
0
&&
DLIB_CASSERT
(
this
->
operator
[](
d
)
!=
0
&&
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
d_copy
))
&&
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
d_copy
))
&&
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
))
&&
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
))
&&
(
reinterpret_cast
<
const
void
*>
(
&
r
)
!=
reinterpret
_cast
<
void
*>
(
&
d_copy
)),
(
static_cast
<
const
void
*>
(
&
r
)
!=
static
_cast
<
void
*>
(
&
d_copy
)),
"
\t
void binary_search_tree::remove"
"
\t
void binary_search_tree::remove"
<<
"
\n\t
the element must be in the tree for it to be removed"
<<
"
\n\t
the element must be in the tree for it to be removed"
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
...
@@ -157,7 +157,7 @@ namespace dlib
...
@@ -157,7 +157,7 @@ namespace dlib
)
)
{
{
DLIB_CASSERT
(
this
->
size
()
!=
0
&&
DLIB_CASSERT
(
this
->
size
()
!=
0
&&
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
)),
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
)),
"
\t
void binary_search_tree::remove_any"
"
\t
void binary_search_tree::remove_any"
<<
"
\n\t
tree must not be empty if something is going to be removed"
<<
"
\n\t
tree must not be empty if something is going to be removed"
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
...
...
dlib/cmd_line_parser/cmd_line_parser_kernel_1.h
View file @
2b4dc97c
...
@@ -284,10 +284,10 @@ namespace dlib
...
@@ -284,10 +284,10 @@ namespace dlib
)
const
{
return
options
.
current_element_valid
();
}
)
const
{
return
options
.
current_element_valid
();
}
const
cmd_line_parser_option
<
charT
>&
element
(
const
cmd_line_parser_option
<
charT
>&
element
(
)
const
{
return
*
reinterpret
_cast
<
cmd_line_parser_option
<
charT
>*>
(
options
.
element
().
value
());
}
)
const
{
return
*
static
_cast
<
cmd_line_parser_option
<
charT
>*>
(
options
.
element
().
value
());
}
cmd_line_parser_option
<
charT
>&
element
(
cmd_line_parser_option
<
charT
>&
element
(
)
{
return
*
reinterpret
_cast
<
cmd_line_parser_option
<
charT
>*>
(
options
.
element
().
value
());
}
)
{
return
*
static
_cast
<
cmd_line_parser_option
<
charT
>*>
(
options
.
element
().
value
());
}
bool
move_next
(
bool
move_next
(
)
const
{
return
options
.
move_next
();
}
)
const
{
return
options
.
move_next
();
}
...
@@ -356,7 +356,7 @@ namespace dlib
...
@@ -356,7 +356,7 @@ namespace dlib
options
.
reset
();
options
.
reset
();
while
(
options
.
move_next
())
while
(
options
.
move_next
())
{
{
delete
reinterpret
_cast
<
option_t
*>
(
options
.
element
().
value
());
delete
static
_cast
<
option_t
*>
(
options
.
element
().
value
());
}
}
}
}
...
@@ -380,7 +380,7 @@ namespace dlib
...
@@ -380,7 +380,7 @@ namespace dlib
options
.
reset
();
options
.
reset
();
while
(
options
.
move_next
())
while
(
options
.
move_next
())
{
{
delete
reinterpret
_cast
<
option_t
*>
(
options
.
element
().
value
());
delete
static
_cast
<
option_t
*>
(
options
.
element
().
value
());
}
}
options
.
clear
();
options
.
clear
();
reset
();
reset
();
...
@@ -413,7 +413,7 @@ namespace dlib
...
@@ -413,7 +413,7 @@ namespace dlib
options
.
reset
();
options
.
reset
();
while
(
options
.
move_next
())
while
(
options
.
move_next
())
{
{
reinterpret
_cast
<
option_t
*>
(
options
.
element
().
value
())
->
clear
();
static
_cast
<
option_t
*>
(
options
.
element
().
value
())
->
clear
();
}
}
options
.
reset
();
options
.
reset
();
}
}
...
@@ -469,7 +469,7 @@ namespace dlib
...
@@ -469,7 +469,7 @@ namespace dlib
}
}
option_t
*
o
=
reinterpret
_cast
<
option_t
*>
(
options
[
temp
]);
option_t
*
o
=
static
_cast
<
option_t
*>
(
options
[
temp
]);
// check the number of arguments after this option and make sure
// check the number of arguments after this option and make sure
// it is correct
// it is correct
...
@@ -560,7 +560,7 @@ namespace dlib
...
@@ -560,7 +560,7 @@ namespace dlib
throw
cmd_line_parse_error
(
EINVALID_OPTION
,
name
);
throw
cmd_line_parse_error
(
EINVALID_OPTION
,
name
);
}
}
option_t
*
o
=
reinterpret
_cast
<
option_t
*>
(
options
[
name
]);
option_t
*
o
=
static
_cast
<
option_t
*>
(
options
[
name
]);
// if there are chars immediately following this option
// if there are chars immediately following this option
int
delta
=
0
;
int
delta
=
0
;
...
@@ -629,7 +629,7 @@ namespace dlib
...
@@ -629,7 +629,7 @@ namespace dlib
options
.
reset
();
options
.
reset
();
while
(
options
.
move_next
())
while
(
options
.
move_next
())
{
{
reinterpret
_cast
<
option_t
*>
(
options
.
element
().
value
())
->
clear
();
static
_cast
<
option_t
*>
(
options
.
element
().
value
())
->
clear
();
}
}
options
.
reset
();
options
.
reset
();
...
@@ -708,7 +708,7 @@ namespace dlib
...
@@ -708,7 +708,7 @@ namespace dlib
const
string_type
&
name
const
string_type
&
name
)
const
)
const
{
{
return
*
reinterpret
_cast
<
cmd_line_parser_option
<
charT
>*>
(
options
[
name
]);
return
*
static
_cast
<
cmd_line_parser_option
<
charT
>*>
(
options
[
name
]);
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
dlib/config_reader/config_reader_kernel_1.h
View file @
2b4dc97c
...
@@ -263,7 +263,7 @@ namespace dlib
...
@@ -263,7 +263,7 @@ namespace dlib
block_table
.
reset
();
block_table
.
reset
();
while
(
block_table
.
move_next
())
while
(
block_table
.
move_next
())
{
{
delete
reinterpret
_cast
<
config_reader_kernel_1
*>
(
block_table
.
element
().
value
());
delete
static
_cast
<
config_reader_kernel_1
*>
(
block_table
.
element
().
value
());
}
}
block_table
.
clear
();
block_table
.
clear
();
key_table
.
clear
();
key_table
.
clear
();
...
@@ -565,7 +565,7 @@ namespace dlib
...
@@ -565,7 +565,7 @@ namespace dlib
throw
config_reader_access_error
(
name
,
""
);
throw
config_reader_access_error
(
name
,
""
);
}
}
return
*
reinterpret
_cast
<
config_reader_kernel_1
*>
(
block_table
[
name
]);
return
*
static
_cast
<
config_reader_kernel_1
*>
(
block_table
[
name
]);
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
dlib/config_reader/config_reader_thread_safe_1.h
View file @
2b4dc97c
...
@@ -293,7 +293,7 @@ namespace dlib
...
@@ -293,7 +293,7 @@ namespace dlib
block_table
.
reset
();
block_table
.
reset
();
while
(
block_table
.
move_next
())
while
(
block_table
.
move_next
())
{
{
delete
reinterpret
_cast
<
config_reader_thread_safe_1
*>
(
block_table
.
element
().
value
());
delete
static
_cast
<
config_reader_thread_safe_1
*>
(
block_table
.
element
().
value
());
}
}
block_table
.
clear
();
block_table
.
clear
();
}
}
...
@@ -345,7 +345,7 @@ namespace dlib
...
@@ -345,7 +345,7 @@ namespace dlib
throw
config_reader_access_error
(
name
,
""
);
throw
config_reader_access_error
(
name
,
""
);
}
}
return
*
reinterpret
_cast
<
config_reader_thread_safe_1
*>
(
block_table
[
name
]);
return
*
static
_cast
<
config_reader_thread_safe_1
*>
(
block_table
[
name
]);
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
@@ -431,7 +431,7 @@ namespace dlib
...
@@ -431,7 +431,7 @@ namespace dlib
block_table
.
reset
();
block_table
.
reset
();
while
(
block_table
.
move_next
())
while
(
block_table
.
move_next
())
{
{
delete
reinterpret
_cast
<
config_reader_thread_safe_1
*>
(
block_table
.
element
().
value
());
delete
static
_cast
<
config_reader_thread_safe_1
*>
(
block_table
.
element
().
value
());
}
}
block_table
.
clear
();
block_table
.
clear
();
...
...
dlib/gui_core/gui_core_kernel_1.cpp
View file @
2b4dc97c
...
@@ -305,7 +305,7 @@ namespace dlib
...
@@ -305,7 +305,7 @@ namespace dlib
static
void
error_box_helper
(
void
*
param
)
static
void
error_box_helper
(
void
*
param
)
{
{
ebh_param
&
p
=
*
reinterpret
_cast
<
ebh_param
*>
(
param
);
ebh_param
&
p
=
*
static
_cast
<
ebh_param
*>
(
param
);
#ifdef UNICODE
#ifdef UNICODE
MessageBox
(
NULL
,
convert_mbstring_to_wstring
(
p
.
text
).
c_str
(),
MessageBox
(
NULL
,
convert_mbstring_to_wstring
(
p
.
text
).
c_str
(),
convert_mbstring_to_wstring
(
p
.
title
).
c_str
(),
MB_OK
|
MB_ICONERROR
|
MB_SYSTEMMODAL
convert_mbstring_to_wstring
(
p
.
title
).
c_str
(),
MB_OK
|
MB_ICONERROR
|
MB_SYSTEMMODAL
...
...
dlib/gui_widgets/drawable.cpp
View file @
2b4dc97c
...
@@ -80,7 +80,7 @@ namespace dlib
...
@@ -80,7 +80,7 @@ namespace dlib
int
i
int
i
)
)
{
{
drawable
*
d
=
reinterpret
_cast
<
drawable
*>
(
p
);
drawable
*
d
=
static
_cast
<
drawable
*>
(
p
);
if
(
widget_set
.
is_member
(
d
))
if
(
widget_set
.
is_member
(
d
))
{
{
d
->
on_user_event
(
i
);
d
->
on_user_event
(
i
);
...
...
dlib/gui_widgets/widgets.cpp
View file @
2b4dc97c
...
@@ -2695,7 +2695,7 @@ namespace dlib
...
@@ -2695,7 +2695,7 @@ namespace dlib
// The point of this extra event_handler stuff is to allow the user
// The point of this extra event_handler stuff is to allow the user
// to end the program from within the callback. So we want to destroy the
// to end the program from within the callback. So we want to destroy the
// window *before* we call their callback.
// window *before* we call their callback.
box_win
&
w
=
*
reinterpret
_cast
<
box_win
*>
(
param
);
box_win
&
w
=
*
static
_cast
<
box_win
*>
(
param
);
w
.
close_window
();
w
.
close_window
();
any_function
<
void
()
>
event_handler
(
w
.
event_handler
);
any_function
<
void
()
>
event_handler
(
w
.
event_handler
);
delete
&
w
;
delete
&
w
;
...
...
dlib/hash_map/hash_map_kernel_c.h
View file @
2b4dc97c
...
@@ -82,14 +82,14 @@ namespace dlib
...
@@ -82,14 +82,14 @@ namespace dlib
// make sure requires clause is not broken
// make sure requires clause is not broken
DLIB_CASSERT
(
(
!
this
->
is_in_domain
(
d
))
&&
DLIB_CASSERT
(
(
!
this
->
is_in_domain
(
d
))
&&
(
reinterpret_cast
<
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
)),
(
static_cast
<
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
)),
"
\t
void hash_map::add"
"
\t
void hash_map::add"
<<
"
\n\t
domain element being added must not already be in the hash_map"
<<
"
\n\t
domain element being added must not already be in the hash_map"
<<
"
\n\t
and d and r must not be the same variable"
<<
"
\n\t
and d and r must not be the same variable"
<<
"
\n\t
is_in_domain(d): "
<<
(
this
->
is_in_domain
(
d
)
?
"true"
:
"false"
)
<<
"
\n\t
is_in_domain(d): "
<<
(
this
->
is_in_domain
(
d
)
?
"true"
:
"false"
)
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
&d: "
<<
reinterpret
_cast
<
void
*>
(
&
d
)
<<
"
\n\t
&d: "
<<
static
_cast
<
void
*>
(
&
d
)
<<
"
\n\t
&r: "
<<
reinterpret
_cast
<
void
*>
(
&
r
)
<<
"
\n\t
&r: "
<<
static
_cast
<
void
*>
(
&
r
)
);
);
...
@@ -112,14 +112,14 @@ namespace dlib
...
@@ -112,14 +112,14 @@ namespace dlib
// make sure requires clause is not broken
// make sure requires clause is not broken
DLIB_CASSERT
(
(
this
->
size
()
>
0
)
&&
DLIB_CASSERT
(
(
this
->
size
()
>
0
)
&&
(
reinterpret_cast
<
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
)),
(
static_cast
<
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
)),
"
\t
void hash_map::remove_any"
"
\t
void hash_map::remove_any"
<<
"
\n\t
size() must be greater than zero if something is going to be removed"
<<
"
\n\t
size() must be greater than zero if something is going to be removed"
<<
"
\n\t
and d and r must not be the same variable."
<<
"
\n\t
and d and r must not be the same variable."
<<
"
\n\t
size(): "
<<
this
->
size
()
<<
"
\n\t
size(): "
<<
this
->
size
()
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
&d: "
<<
reinterpret
_cast
<
void
*>
(
&
d
)
<<
"
\n\t
&d: "
<<
static
_cast
<
void
*>
(
&
d
)
<<
"
\n\t
&r: "
<<
reinterpret
_cast
<
void
*>
(
&
r
)
<<
"
\n\t
&r: "
<<
static
_cast
<
void
*>
(
&
r
)
);
);
...
@@ -143,17 +143,17 @@ namespace dlib
...
@@ -143,17 +143,17 @@ namespace dlib
// make sure requires clause is not broken
// make sure requires clause is not broken
DLIB_CASSERT
(
(
this
->
is_in_domain
(
d
))
&&
DLIB_CASSERT
(
(
this
->
is_in_domain
(
d
))
&&
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
))
&&
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
))
&&
(
reinterpret_cast
<
void
*>
(
&
r
)
!=
reinterpret
_cast
<
void
*>
(
&
d_copy
))
&&
(
static_cast
<
void
*>
(
&
r
)
!=
static
_cast
<
void
*>
(
&
d_copy
))
&&
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
d_copy
)),
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
d_copy
)),
"
\t
void hash_map::remove"
"
\t
void hash_map::remove"
<<
"
\n\t
can't remove something that isn't in the hash_map or if the paremeters"
<<
"
\n\t
can't remove something that isn't in the hash_map or if the paremeters"
<<
"
\n\t
are actually the same variable. Either way can't remove."
<<
"
\n\t
are actually the same variable. Either way can't remove."
<<
"
\n\t
is_in_domain(d): "
<<
(
this
->
is_in_domain
(
d
)
?
"true"
:
"false"
)
<<
"
\n\t
is_in_domain(d): "
<<
(
this
->
is_in_domain
(
d
)
?
"true"
:
"false"
)
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
&d: "
<<
reinterpret
_cast
<
const
void
*>
(
&
d
)
<<
"
\n\t
&d: "
<<
static
_cast
<
const
void
*>
(
&
d
)
<<
"
\n\t
&r: "
<<
reinterpret
_cast
<
void
*>
(
&
r
)
<<
"
\n\t
&r: "
<<
static
_cast
<
void
*>
(
&
r
)
<<
"
\n\t
&d_copy: "
<<
reinterpret
_cast
<
void
*>
(
&
d_copy
)
<<
"
\n\t
&d_copy: "
<<
static
_cast
<
void
*>
(
&
d_copy
)
);
);
...
@@ -178,7 +178,7 @@ namespace dlib
...
@@ -178,7 +178,7 @@ namespace dlib
"
\t
void hash_map::destroy"
"
\t
void hash_map::destroy"
<<
"
\n\t
can't remove something that isn't in the hash_map"
<<
"
\n\t
can't remove something that isn't in the hash_map"
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
&d: "
<<
reinterpret
_cast
<
const
void
*>
(
&
d
)
<<
"
\n\t
&d: "
<<
static
_cast
<
const
void
*>
(
&
d
)
);
);
...
...
dlib/hash_set/hash_set_kernel_c.h
View file @
2b4dc97c
...
@@ -91,7 +91,7 @@ namespace dlib
...
@@ -91,7 +91,7 @@ namespace dlib
{
{
// make sure requires clause is not broken
// make sure requires clause is not broken
DLIB_CASSERT
(
this
->
is_member
(
item
)
&&
DLIB_CASSERT
(
this
->
is_member
(
item
)
&&
(
reinterpret_cast
<
const
void
*>
(
&
item
)
!=
reinterpret
_cast
<
void
*>
(
&
item_copy
)),
(
static_cast
<
const
void
*>
(
&
item
)
!=
static
_cast
<
void
*>
(
&
item_copy
)),
"
\t
void hash_set::remove"
"
\t
void hash_set::remove"
<<
"
\n\t
item should be in the hash_set if it's going to be removed"
<<
"
\n\t
item should be in the hash_set if it's going to be removed"
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
...
...
dlib/hash_table/hash_table_kernel_c.h
View file @
2b4dc97c
...
@@ -88,9 +88,9 @@ namespace dlib
...
@@ -88,9 +88,9 @@ namespace dlib
)
)
{
{
DLIB_CASSERT
(
this
->
operator
[](
d
)
!=
0
&&
DLIB_CASSERT
(
this
->
operator
[](
d
)
!=
0
&&
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
d_copy
))
&&
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
d_copy
))
&&
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
))
&&
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
))
&&
(
reinterpret_cast
<
const
void
*>
(
&
r
)
!=
reinterpret
_cast
<
void
*>
(
&
d_copy
)),
(
static_cast
<
const
void
*>
(
&
r
)
!=
static
_cast
<
void
*>
(
&
d_copy
)),
"
\t
void binary_search_tree::remove"
"
\t
void binary_search_tree::remove"
<<
"
\n\t
the element must be in the table for it to be removed"
<<
"
\n\t
the element must be in the table for it to be removed"
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
...
@@ -113,7 +113,7 @@ namespace dlib
...
@@ -113,7 +113,7 @@ namespace dlib
range
&
r
range
&
r
)
)
{
{
DLIB_CASSERT
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
),
DLIB_CASSERT
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
),
"
\t
void binary_search_tree::add"
"
\t
void binary_search_tree::add"
<<
"
\n\t
you can't call add() and give the same object to both arguments."
<<
"
\n\t
you can't call add() and give the same object to both arguments."
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
...
@@ -157,7 +157,7 @@ namespace dlib
...
@@ -157,7 +157,7 @@ namespace dlib
)
)
{
{
DLIB_CASSERT
(
this
->
size
()
!=
0
&&
DLIB_CASSERT
(
this
->
size
()
!=
0
&&
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
)),
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
)),
"
\t
void hash_table::remove_any"
"
\t
void hash_table::remove_any"
<<
"
\n\t
table must not be empty if something is going to be removed"
<<
"
\n\t
table must not be empty if something is going to be removed"
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
...
...
dlib/linker/linker_kernel_1.cpp
View file @
2b4dc97c
...
@@ -238,7 +238,7 @@ namespace dlib
...
@@ -238,7 +238,7 @@ namespace dlib
void
*
param
void
*
param
)
)
{
{
linker_kernel_1
&
p
=
*
reinterpret
_cast
<
linker_kernel_1
*>
(
param
);
linker_kernel_1
&
p
=
*
static
_cast
<
linker_kernel_1
*>
(
param
);
p
.
cons_mutex
.
lock
();
p
.
cons_mutex
.
lock
();
// if the connections are gone for whatever reason then return
// if the connections are gone for whatever reason then return
...
...
dlib/map/map_kernel_c.h
View file @
2b4dc97c
...
@@ -82,14 +82,14 @@ namespace dlib
...
@@ -82,14 +82,14 @@ namespace dlib
{
{
// make sure requires clause is not broken
// make sure requires clause is not broken
DLIB_CASSERT
(
(
!
this
->
is_in_domain
(
d
))
&&
DLIB_CASSERT
(
(
!
this
->
is_in_domain
(
d
))
&&
(
reinterpret_cast
<
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
)),
(
static_cast
<
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
)),
"
\t
void map::add"
"
\t
void map::add"
<<
"
\n\t
domain element being added must not already be in the map"
<<
"
\n\t
domain element being added must not already be in the map"
<<
"
\n\t
and d and r must not be the same variable"
<<
"
\n\t
and d and r must not be the same variable"
<<
"
\n\t
is_in_domain(d): "
<<
(
this
->
is_in_domain
(
d
)
?
"true"
:
"false"
)
<<
"
\n\t
is_in_domain(d): "
<<
(
this
->
is_in_domain
(
d
)
?
"true"
:
"false"
)
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
&d: "
<<
reinterpret
_cast
<
void
*>
(
&
d
)
<<
"
\n\t
&d: "
<<
static
_cast
<
void
*>
(
&
d
)
<<
"
\n\t
&r: "
<<
reinterpret
_cast
<
void
*>
(
&
r
)
<<
"
\n\t
&r: "
<<
static
_cast
<
void
*>
(
&
r
)
);
);
// call the real function
// call the real function
...
@@ -109,14 +109,14 @@ namespace dlib
...
@@ -109,14 +109,14 @@ namespace dlib
{
{
// make sure requires clause is not broken
// make sure requires clause is not broken
DLIB_CASSERT
(
(
this
->
size
()
>
0
)
&&
DLIB_CASSERT
(
(
this
->
size
()
>
0
)
&&
(
reinterpret_cast
<
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
)),
(
static_cast
<
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
)),
"
\t
void map::remove_any"
"
\t
void map::remove_any"
<<
"
\n\t
size() must be greater than zero if something is going to be removed"
<<
"
\n\t
size() must be greater than zero if something is going to be removed"
<<
"
\n\t
and d and r must not be the same variable."
<<
"
\n\t
and d and r must not be the same variable."
<<
"
\n\t
size(): "
<<
this
->
size
()
<<
"
\n\t
size(): "
<<
this
->
size
()
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
&d: "
<<
reinterpret
_cast
<
void
*>
(
&
d
)
<<
"
\n\t
&d: "
<<
static
_cast
<
void
*>
(
&
d
)
<<
"
\n\t
&r: "
<<
reinterpret
_cast
<
void
*>
(
&
r
)
<<
"
\n\t
&r: "
<<
static
_cast
<
void
*>
(
&
r
)
);
);
// call the real function
// call the real function
...
@@ -137,17 +137,17 @@ namespace dlib
...
@@ -137,17 +137,17 @@ namespace dlib
{
{
// make sure requires clause is not broken
// make sure requires clause is not broken
DLIB_CASSERT
(
(
this
->
is_in_domain
(
d
))
&&
DLIB_CASSERT
(
(
this
->
is_in_domain
(
d
))
&&
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
r
))
&&
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
r
))
&&
(
reinterpret_cast
<
void
*>
(
&
r
)
!=
reinterpret
_cast
<
void
*>
(
&
d_copy
))
&&
(
static_cast
<
void
*>
(
&
r
)
!=
static
_cast
<
void
*>
(
&
d_copy
))
&&
(
reinterpret_cast
<
const
void
*>
(
&
d
)
!=
reinterpret
_cast
<
void
*>
(
&
d_copy
)),
(
static_cast
<
const
void
*>
(
&
d
)
!=
static
_cast
<
void
*>
(
&
d_copy
)),
"
\t
void map::remove"
"
\t
void map::remove"
<<
"
\n\t
can't remove something that isn't in the map or if the paremeters actually"
<<
"
\n\t
can't remove something that isn't in the map or if the paremeters actually"
<<
"
\n\t
are the same variable. Either way can't remove."
<<
"
\n\t
are the same variable. Either way can't remove."
<<
"
\n\t
is_in_domain(d): "
<<
(
this
->
is_in_domain
(
d
)
?
"true"
:
"false"
)
<<
"
\n\t
is_in_domain(d): "
<<
(
this
->
is_in_domain
(
d
)
?
"true"
:
"false"
)
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
&d: "
<<
reinterpret
_cast
<
const
void
*>
(
&
d
)
<<
"
\n\t
&d: "
<<
static
_cast
<
const
void
*>
(
&
d
)
<<
"
\n\t
&r: "
<<
reinterpret
_cast
<
void
*>
(
&
r
)
<<
"
\n\t
&r: "
<<
static
_cast
<
void
*>
(
&
r
)
<<
"
\n\t
&d_copy: "
<<
reinterpret
_cast
<
void
*>
(
&
d_copy
)
<<
"
\n\t
&d_copy: "
<<
static
_cast
<
void
*>
(
&
d_copy
)
);
);
// call the real function
// call the real function
...
@@ -169,7 +169,7 @@ namespace dlib
...
@@ -169,7 +169,7 @@ namespace dlib
"
\t
void map::destroy"
"
\t
void map::destroy"
<<
"
\n\t
can't remove something that isn't in the map"
<<
"
\n\t
can't remove something that isn't in the map"
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
&d: "
<<
reinterpret
_cast
<
const
void
*>
(
&
d
)
<<
"
\n\t
&d: "
<<
static
_cast
<
const
void
*>
(
&
d
)
);
);
// call the real function
// call the real function
...
...
dlib/memory_manager/memory_manager_kernel_1.h
View file @
2b4dc97c
...
@@ -82,7 +82,7 @@ namespace dlib
...
@@ -82,7 +82,7 @@ namespace dlib
{
{
node
*
temp
=
next
;
node
*
temp
=
next
;
next
=
next
->
next
;
next
=
next
->
next
;
::
operator
delete
(
reinterpret
_cast
<
void
*>
(
temp
));
::
operator
delete
(
static
_cast
<
void
*>
(
temp
));
}
}
}
}
...
@@ -119,7 +119,7 @@ namespace dlib
...
@@ -119,7 +119,7 @@ namespace dlib
try
try
{
{
// construct this new T object with placement new.
// construct this new T object with placement new.
new
(
reinterpret
_cast
<
void
*>
(
temp
))
T
();
new
(
static
_cast
<
void
*>
(
temp
))
T
();
}
}
catch
(...)
catch
(...)
{
{
...
@@ -133,16 +133,16 @@ namespace dlib
...
@@ -133,16 +133,16 @@ namespace dlib
}
}
else
else
{
{
temp
=
reinterpret
_cast
<
T
*>
(
::
operator
new
(
sizeof
(
node
)));
temp
=
static
_cast
<
T
*>
(
::
operator
new
(
sizeof
(
node
)));
try
try
{
{
// construct this new T object with placement new.
// construct this new T object with placement new.
new
(
reinterpret
_cast
<
void
*>
(
temp
))
T
();
new
(
static
_cast
<
void
*>
(
temp
))
T
();
}
}
catch
(...)
catch
(...)
{
{
// construction of the new object threw so delete the block of memory
// construction of the new object threw so delete the block of memory
::
operator
delete
(
reinterpret
_cast
<
void
*>
(
temp
));
::
operator
delete
(
static
_cast
<
void
*>
(
temp
));
throw
;
throw
;
}
}
}
}
...
@@ -160,7 +160,7 @@ namespace dlib
...
@@ -160,7 +160,7 @@ namespace dlib
if
(
pool_size
>=
max_pool_size
)
if
(
pool_size
>=
max_pool_size
)
{
{
::
operator
delete
(
reinterpret
_cast
<
void
*>
(
item
));
::
operator
delete
(
static
_cast
<
void
*>
(
item
));
return
;
return
;
}
}
...
...
dlib/memory_manager/memory_manager_kernel_2.h
View file @
2b4dc97c
...
@@ -96,7 +96,7 @@ namespace dlib
...
@@ -96,7 +96,7 @@ namespace dlib
chunk_node
*
temp
=
first_chunk
;
chunk_node
*
temp
=
first_chunk
;
first_chunk
=
first_chunk
->
next
;
first_chunk
=
first_chunk
->
next
;
// delete the memory chunk
// delete the memory chunk
::
operator
delete
(
reinterpret
_cast
<
void
*>
(
temp
->
chunk
));
::
operator
delete
(
static
_cast
<
void
*>
(
temp
->
chunk
));
// delete the chunk_node
// delete the chunk_node
delete
temp
;
delete
temp
;
}
}
...
@@ -135,7 +135,7 @@ namespace dlib
...
@@ -135,7 +135,7 @@ namespace dlib
try
try
{
{
// construct this new T object with placement new.
// construct this new T object with placement new.
new
(
reinterpret
_cast
<
void
*>
(
temp
))
T
();
new
(
static
_cast
<
void
*>
(
temp
))
T
();
}
}
catch
(...)
catch
(...)
{
{
...
@@ -149,7 +149,7 @@ namespace dlib
...
@@ -149,7 +149,7 @@ namespace dlib
{
{
// the linked list is empty so we need to allocate some more memory
// the linked list is empty so we need to allocate some more memory
node
*
block
=
0
;
node
*
block
=
0
;
block
=
reinterpret
_cast
<
node
*>
(
::
operator
new
(
sizeof
(
node
)
*
chunk_size
));
block
=
static
_cast
<
node
*>
(
::
operator
new
(
sizeof
(
node
)
*
chunk_size
));
// the first part of this block can be our new object
// the first part of this block can be our new object
temp
=
reinterpret_cast
<
T
*>
(
block
);
temp
=
reinterpret_cast
<
T
*>
(
block
);
...
@@ -157,12 +157,12 @@ namespace dlib
...
@@ -157,12 +157,12 @@ namespace dlib
try
try
{
{
// construct this new T object with placement new.
// construct this new T object with placement new.
new
(
reinterpret
_cast
<
void
*>
(
temp
))
T
();
new
(
static
_cast
<
void
*>
(
temp
))
T
();
}
}
catch
(...)
catch
(...)
{
{
// construction of the new object threw so delete the block of memory
// construction of the new object threw so delete the block of memory
::
operator
delete
(
reinterpret
_cast
<
void
*>
(
block
));
::
operator
delete
(
static
_cast
<
void
*>
(
block
));
throw
;
throw
;
}
}
...
@@ -172,7 +172,7 @@ namespace dlib
...
@@ -172,7 +172,7 @@ namespace dlib
catch
(...)
catch
(...)
{
{
temp
->~
T
();
temp
->~
T
();
::
operator
delete
(
reinterpret
_cast
<
void
*>
(
block
));
::
operator
delete
(
static
_cast
<
void
*>
(
block
));
throw
;
throw
;
}
}
...
...
dlib/memory_manager/memory_manager_kernel_3.h
View file @
2b4dc97c
...
@@ -109,7 +109,7 @@ namespace dlib
...
@@ -109,7 +109,7 @@ namespace dlib
chunk_node
*
temp
=
first_chunk
;
chunk_node
*
temp
=
first_chunk
;
first_chunk
=
first_chunk
->
next
;
first_chunk
=
first_chunk
->
next
;
// delete the memory chunk
// delete the memory chunk
::
operator
delete
(
reinterpret
_cast
<
void
*>
(
temp
->
chunk
));
::
operator
delete
(
static
_cast
<
void
*>
(
temp
->
chunk
));
// delete the chunk_node
// delete the chunk_node
delete
temp
;
delete
temp
;
}
}
...
@@ -152,7 +152,7 @@ namespace dlib
...
@@ -152,7 +152,7 @@ namespace dlib
}
}
else
else
{
{
temp
=
reinterpret
_cast
<
char
*>
(
::
operator
new
(
block_size
));
temp
=
static
_cast
<
char
*>
(
::
operator
new
(
block_size
));
}
}
reinterpret_cast
<
size_t
*>
(
temp
)[
0
]
=
block_size
;
reinterpret_cast
<
size_t
*>
(
temp
)[
0
]
=
block_size
;
...
@@ -204,7 +204,7 @@ namespace dlib
...
@@ -204,7 +204,7 @@ namespace dlib
try
try
{
{
// construct this new T object with placement new.
// construct this new T object with placement new.
new
(
reinterpret
_cast
<
void
*>
(
temp
))
T
();
new
(
static
_cast
<
void
*>
(
temp
))
T
();
}
}
catch
(...)
catch
(...)
{
{
...
@@ -217,7 +217,7 @@ namespace dlib
...
@@ -217,7 +217,7 @@ namespace dlib
else
else
{
{
// the linked list is empty so we need to allocate some more memory
// the linked list is empty so we need to allocate some more memory
node
*
block
=
reinterpret
_cast
<
node
*>
(
::
operator
new
(
sizeof
(
node
)
*
chunk_size
));
node
*
block
=
static
_cast
<
node
*>
(
::
operator
new
(
sizeof
(
node
)
*
chunk_size
));
// the first part of this block can be our new object
// the first part of this block can be our new object
temp
=
reinterpret_cast
<
T
*>
(
block
);
temp
=
reinterpret_cast
<
T
*>
(
block
);
...
@@ -225,12 +225,12 @@ namespace dlib
...
@@ -225,12 +225,12 @@ namespace dlib
try
try
{
{
// construct this new T object with placement new.
// construct this new T object with placement new.
new
(
reinterpret
_cast
<
void
*>
(
temp
))
T
();
new
(
static
_cast
<
void
*>
(
temp
))
T
();
}
}
catch
(...)
catch
(...)
{
{
// construction of the new object threw so delete the block of memory
// construction of the new object threw so delete the block of memory
::
operator
delete
(
reinterpret
_cast
<
void
*>
(
block
));
::
operator
delete
(
static
_cast
<
void
*>
(
block
));
throw
;
throw
;
}
}
...
@@ -240,7 +240,7 @@ namespace dlib
...
@@ -240,7 +240,7 @@ namespace dlib
catch
(...)
catch
(...)
{
{
temp
->~
T
();
temp
->~
T
();
::
operator
delete
(
reinterpret
_cast
<
void
*>
(
block
));
::
operator
delete
(
static
_cast
<
void
*>
(
block
));
throw
;
throw
;
}
}
...
@@ -310,7 +310,7 @@ namespace dlib
...
@@ -310,7 +310,7 @@ namespace dlib
for
(
i
=
0
;
i
<
size
;
++
i
)
for
(
i
=
0
;
i
<
size
;
++
i
)
{
{
// construct this new T object with placement new.
// construct this new T object with placement new.
new
(
reinterpret
_cast
<
void
*>
(
array
+
i
))
T
();
new
(
static
_cast
<
void
*>
(
array
+
i
))
T
();
}
}
}
}
catch
(...)
catch
(...)
...
...
dlib/server/server_kernel_1.h
View file @
2b4dc97c
...
@@ -661,7 +661,7 @@ namespace dlib
...
@@ -661,7 +661,7 @@ namespace dlib
void
*
item
void
*
item
)
)
{
{
param
&
p
=
*
reinterpret
_cast
<
param
*>
(
item
);
param
&
p
=
*
static
_cast
<
param
*>
(
item
);
p
.
server
.
on_connect
(
p
.
new_connection
);
p
.
server
.
on_connect
(
p
.
new_connection
);
...
...
dlib/set/set_kernel_c.h
View file @
2b4dc97c
...
@@ -89,7 +89,7 @@ namespace dlib
...
@@ -89,7 +89,7 @@ namespace dlib
{
{
// make sure requires clause is not broken
// make sure requires clause is not broken
DLIB_CASSERT
(
this
->
is_member
(
item
)
&&
DLIB_CASSERT
(
this
->
is_member
(
item
)
&&
(
reinterpret_cast
<
const
void
*>
(
&
item
)
!=
reinterpret
_cast
<
void
*>
(
&
item_copy
)),
(
static_cast
<
const
void
*>
(
&
item
)
!=
static
_cast
<
void
*>
(
&
item_copy
)),
"
\t
void set::remove"
"
\t
void set::remove"
<<
"
\n\t
item should be in the set if it's going to be removed"
<<
"
\n\t
item should be in the set if it's going to be removed"
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
this: "
<<
this
...
...
dlib/test/pipe.cpp
View file @
2b4dc97c
...
@@ -58,7 +58,7 @@ namespace
...
@@ -58,7 +58,7 @@ namespace
)
)
{
{
add_running_thread
();
add_running_thread
();
pipe
&
p
=
*
reinterpret
_cast
<
pipe
*>
(
param
);
pipe
&
p
=
*
static
_cast
<
pipe
*>
(
param
);
try
try
{
{
...
@@ -95,7 +95,7 @@ namespace
...
@@ -95,7 +95,7 @@ namespace
)
)
{
{
add_running_thread
();
add_running_thread
();
pipe
&
p
=
*
reinterpret
_cast
<
pipe
*>
(
param
);
pipe
&
p
=
*
static
_cast
<
pipe
*>
(
param
);
try
try
{
{
...
@@ -131,7 +131,7 @@ namespace
...
@@ -131,7 +131,7 @@ namespace
)
)
{
{
add_running_thread
();
add_running_thread
();
pipe
&
p
=
*
reinterpret
_cast
<
pipe
*>
(
param
);
pipe
&
p
=
*
static
_cast
<
pipe
*>
(
param
);
try
try
{
{
...
...
dlib/test/sockstreambuf.cpp
View file @
2b4dc97c
...
@@ -37,7 +37,7 @@ namespace
...
@@ -37,7 +37,7 @@ namespace
)
)
{
{
listener
&
list
=
*
reinterpret
_cast
<
listener
*>
(
param
);
listener
&
list
=
*
static
_cast
<
listener
*>
(
param
);
connection
*
con
;
connection
*
con
;
list
.
accept
(
con
);
list
.
accept
(
con
);
...
...
dlib/threads/create_new_thread_extension.h
View file @
2b4dc97c
...
@@ -20,7 +20,7 @@ namespace dlib
...
@@ -20,7 +20,7 @@ namespace dlib
void
*
obj
void
*
obj
)
)
{
{
T
*
o
=
reinterpret
_cast
<
T
*>
(
obj
);
T
*
o
=
static
_cast
<
T
*>
(
obj
);
(
o
->*
funct
)();
(
o
->*
funct
)();
}
}
...
...
dlib/threads/threads_kernel_1.cpp
View file @
2b4dc97c
...
@@ -31,7 +31,7 @@ namespace dlib
...
@@ -31,7 +31,7 @@ namespace dlib
void
*
param
void
*
param
)
)
{
{
info
*
alloc_p
=
reinterpret
_cast
<
info
*>
(
param
);
info
*
alloc_p
=
static
_cast
<
info
*>
(
param
);
info
p
=
*
alloc_p
;
info
p
=
*
alloc_p
;
delete
alloc_p
;
delete
alloc_p
;
...
...
dlib/threads/threads_kernel_2.cpp
View file @
2b4dc97c
...
@@ -29,7 +29,7 @@ namespace dlib
...
@@ -29,7 +29,7 @@ namespace dlib
void
*
param
void
*
param
)
)
{
{
info
*
alloc_p
=
reinterpret
_cast
<
info
*>
(
param
);
info
*
alloc_p
=
static
_cast
<
info
*>
(
param
);
info
p
=
*
alloc_p
;
info
p
=
*
alloc_p
;
delete
alloc_p
;
delete
alloc_p
;
...
...
dlib/threads/threads_kernel_shared.cpp
View file @
2b4dc97c
...
@@ -201,7 +201,7 @@ namespace dlib
...
@@ -201,7 +201,7 @@ namespace dlib
)
)
{
{
// get a reference to the calling threader object
// 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
...
@@ -195,7 +195,7 @@ namespace dlib
- returns a non-const reference to the T object
- returns a non-const reference to the T object
!*/
!*/
{
{
return
*
reinterpret
_cast
<
T
*>
(
mem
.
get
());
return
*
static
_cast
<
T
*>
(
mem
.
get
());
}
}
template
<
typename
T
>
template
<
typename
T
>
...
@@ -208,7 +208,7 @@ namespace dlib
...
@@ -208,7 +208,7 @@ namespace dlib
- returns a const reference to the T object
- 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
>
template
<
typename
T
>
...
@@ -518,7 +518,7 @@ namespace dlib
...
@@ -518,7 +518,7 @@ namespace dlib
{
{
validate_type
<
T
>
();
validate_type
<
T
>
();
construct
<
T
>
();
construct
<
T
>
();
return
*
reinterpret
_cast
<
T
*>
(
mem
.
get
());
return
*
static
_cast
<
T
*>
(
mem
.
get
());
}
}
template
<
typename
T
>
template
<
typename
T
>
...
...
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