"docs/vscode:/vscode.git/clone" did not exist on "fe8b3bc5e704ca5f0a11e72b1c479ac00d227a67"
Commit 2b4dc97c authored by Davis King's avatar 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
...@@ -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;
......
...@@ -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;
......
...@@ -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);
{ {
......
...@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment