mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
[libc] Mark cast_to as always_inline
I've seen the compiler emit a call to cast_to, which it should never do.
This commit is contained in:
@@ -31,6 +31,7 @@ inline T cast_to(S p) { return reinterpret_cast<T>(p); }
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
template <typename T, typename S>
|
template <typename T, typename S>
|
||||||
|
__attribute__ ((always_inline))
|
||||||
inline T cast_to(S p) {
|
inline T cast_to(S p) {
|
||||||
return reinterpret_cast<T>(const_cast<typename non_const<S>::type>(p));
|
return reinterpret_cast<T>(const_cast<typename non_const<S>::type>(p));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user