mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-20 15:13:45 +00:00
Improve Engine API export, robust Default Value logic and allow _ in arg
This commit is contained in:
parent
8bede52d3b
commit
d567bc9735
3 changed files with 86 additions and 43 deletions
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#ifndef _FIXEDTUPLE_H_
|
||||
#define _FIXEDTUPLE_H_
|
||||
|
||||
#include "engineTypes.h"
|
||||
|
||||
/// @name Fixed-layout tuple definition
|
||||
/// These structs and templates serve as a way to pass arguments from external
|
||||
/// applications and into the T3D console system.
|
||||
|
|
@ -113,6 +116,21 @@ struct fixed_tuple_accessor<0>
|
|||
}
|
||||
};
|
||||
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4267 )
|
||||
template <size_t I, class... Ts>
|
||||
static U32 fixed_tuple_offset(fixed_tuple<Ts...>& t)
|
||||
{
|
||||
return (U32)((size_t)& fixed_tuple_accessor<I>::get(t)) - ((size_t)& t);
|
||||
}
|
||||
|
||||
template <size_t I, class... Ts>
|
||||
static U32 fixed_tuple_offset(const fixed_tuple<Ts...>& t)
|
||||
{
|
||||
return (U32)((size_t)& fixed_tuple_accessor<I>::get(t)) - ((size_t)& t);
|
||||
}
|
||||
#pragma warning(pop)
|
||||
|
||||
template< typename T1, typename T2 >
|
||||
struct fixed_tuple_mutator {};
|
||||
|
||||
|
|
@ -150,4 +168,4 @@ struct fixed_tuple_mutator<void(Tdest...), void(Tsrc...)>
|
|||
/// @}
|
||||
|
||||
|
||||
#endif // !_FIXEDTUPLE_H_
|
||||
#endif // !_FIXEDTUPLE_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue