mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Removed constexpr use to support VS2013
This commit is contained in:
parent
1c2b096a72
commit
d64e2a7019
|
|
@ -39,7 +39,7 @@
|
|||
#include "console/engineStructs.h"
|
||||
#endif
|
||||
|
||||
template<typename T> constexpr T nullAsType(){ return nullptr; }
|
||||
template<typename T> inline const T nullAsType(){ return nullptr; }
|
||||
|
||||
/// @file
|
||||
/// Legacy TS-based console type definitions.
|
||||
|
|
|
|||
|
|
@ -542,7 +542,7 @@ namespace engineAPI{
|
|||
template<size_t ...I> struct Gens<0, I...>{ typedef Seq<I...> type; };
|
||||
|
||||
typedef typename _EngineConsoleThunkType< R >::ReturnType ReturnType;
|
||||
static constexpr S32 NUM_ARGS = sizeof...(ArgTs) + startArgc;
|
||||
static const S32 NUM_ARGS = sizeof...(ArgTs) + startArgc;
|
||||
|
||||
template<size_t index, size_t method_offset = 0, typename ...RealArgTs>
|
||||
static IthArgType<index> getRealArgValue(S32 argc, ConsoleValueRef *argv, const _EngineFunctionDefaultArguments< void(RealArgTs...) >& defaultArgs)
|
||||
|
|
@ -599,7 +599,7 @@ public:
|
|||
typedef typename Helper::FunctionType FunctionType;
|
||||
typedef typename Helper::ReturnType ReturnType;
|
||||
template<typename Frame> using MethodType = typename Helper::template MethodType<Frame>;
|
||||
static constexpr S32 NUM_ARGS = Helper::NUM_ARGS;
|
||||
static const S32 NUM_ARGS = Helper::NUM_ARGS;
|
||||
|
||||
static ReturnType thunk( S32 argc, ConsoleValueRef *argv, FunctionType fn, const _EngineFunctionDefaultArguments< void(ArgTs...) >& defaultArgs)
|
||||
{
|
||||
|
|
@ -622,7 +622,7 @@ public:
|
|||
typedef typename Helper::FunctionType FunctionType;
|
||||
typedef typename Helper::ReturnType ReturnType;
|
||||
template<typename Frame> using MethodType = typename Helper::template MethodType<Frame>;
|
||||
static constexpr S32 NUM_ARGS = Helper::NUM_ARGS;
|
||||
static const S32 NUM_ARGS = Helper::NUM_ARGS;
|
||||
|
||||
static void thunk( S32 argc, ConsoleValueRef *argv, FunctionType fn, const _EngineFunctionDefaultArguments< void(ArgTs...) >& defaultArgs)
|
||||
{
|
||||
|
|
@ -1162,7 +1162,7 @@ struct _BaseEngineConsoleCallbackHelper
|
|||
public:
|
||||
|
||||
/// Matches up to storeArgs.
|
||||
static constexpr U32 MAX_ARGUMENTS = 11;
|
||||
static const U32 MAX_ARGUMENTS = 11;
|
||||
|
||||
SimObject* mThis;
|
||||
S32 mInitialArgc;
|
||||
|
|
|
|||
|
|
@ -105,8 +105,7 @@ private:
|
|||
|
||||
template<typename ...TailTs, size_t ...I>
|
||||
static void copyHelper(std::tuple<DefVST<ArgTs> ...> &args, std::tuple<DefVST<TailTs> ...> &defaultArgs, Seq<I...>) {
|
||||
constexpr size_t offset = (sizeof...(ArgTs) - sizeof...(TailTs));
|
||||
std::tie(std::get<I + offset>(args)...) = defaultArgs;
|
||||
std::tie(std::get<I + (sizeof...(ArgTs) - sizeof...(TailTs))>(args)...) = defaultArgs;
|
||||
}
|
||||
|
||||
template<typename ...TailTs> using MaybeSelfEnabled = typename std::enable_if<sizeof...(TailTs) <= sizeof...(ArgTs), decltype(mArgs)>::type;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public:
|
|||
{
|
||||
eCommandType type; // Command type
|
||||
StringTableEntry name; // Command name
|
||||
static constexpr U32 MAX_ARGS = 10;
|
||||
static const U32 MAX_ARGS = 10;
|
||||
String argv[MAX_ARGS]; // Command arguments
|
||||
S32 argc; // Number of arguments
|
||||
Command() : type(CmdInvalid), name(0), argc(0) { }
|
||||
|
|
|
|||
Loading…
Reference in a new issue