diff --git a/include/sqrat/sqratClass.h b/include/sqrat/sqratClass.h index 4525f519..d2bcfd18 100644 --- a/include/sqrat/sqratClass.h +++ b/include/sqrat/sqratClass.h @@ -781,39 +781,6 @@ public: Class& Ctor(const SQChar *name = 0) { return BindConstructor(A::template iNew, sizeof...(P), name); } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// Binds a constructor with 1 argument (there can only be one constructor of this many arguments for a given name) - /// - /// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) - /// - /// \return The Class itself so the call can be chained - /// - /// \remarks - /// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count. - /// - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - Class& FmtCtor(const SQChar *name = 0) { - return BindConstructor(A::iFmtNew, 1, name); - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /// Binds a constructor with 2 or more arguments (there can only be one constructor of this many arguments for a given name) - /// - /// \param name Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) - /// - /// \tparam P Type of arguments of the constructor (must be defined explicitly) - /// - /// \return The Class itself so the call can be chained - /// - /// \remarks - /// The last parameter is implicitly of StackStrF type and is automatically included into the parameter count. - /// - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - template - Class& FmtCtor(const SQChar *name = 0) { - return BindConstructor(A::template iFmtNew, sizeof...(P)+1, name); - } }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/Misc/Areas.cpp b/source/Misc/Areas.cpp index deaf0a1c..b99a0e56 100644 --- a/source/Misc/Areas.cpp +++ b/source/Misc/Areas.cpp @@ -421,14 +421,14 @@ void Register_Areas(HSQUIRRELVM vm) Class< Area >(vm, AreaTypename::Str) // Constructors .Ctor() - .FmtCtor() - .FmtCtor< SQInteger >() + .Ctor< const StackStrF & >() + .Ctor< SQInteger, const StackStrF & >() .Ctor< const Vector2 &, const Vector2 &, const Vector2 & >() - .FmtCtor< const Vector2 &, const Vector2 &, const Vector2 & >() - .FmtCtor< const Vector2 &, const Vector2 &, const Vector2 &, SQInteger >() + .Ctor< const Vector2 &, const Vector2 &, const Vector2 &, const StackStrF & >() + .Ctor< const Vector2 &, const Vector2 &, const Vector2 &, SQInteger, const StackStrF & >() .Ctor< float, float, float, float, float, float >() - .FmtCtor< float, float, float, float, float, float >() - .FmtCtor< float, float, float, float, float, float, SQInteger >() + .Ctor< float, float, float, float, float, float, const StackStrF & >() + .Ctor< float, float, float, float, float, float, SQInteger, const StackStrF & >() // Meta-methods .SquirrelFunc(_SC("_typename"), &AreaTypename::Fn) .Func(_SC("_tostring"), &Area::ToString) diff --git a/source/Misc/Command.cpp b/source/Misc/Command.cpp index b144ef13..9c92f2ae 100644 --- a/source/Misc/Command.cpp +++ b/source/Misc/Command.cpp @@ -1072,8 +1072,8 @@ void Register(HSQUIRRELVM vm) cmdns.Bind(_SC("Listener"), Class< Listener, NoCopy< Listener > >(vm, ListenerTypename::Str) // Constructors - .FmtCtor() - .FmtCtor< StackStrF & >() + .Ctor< StackStrF & >() + .Ctor< StackStrF &, StackStrF & >() .Ctor< StackStrF &, StackStrF &, Array & >() .Ctor< StackStrF &, StackStrF &, Uint8, Uint8 >() .Ctor< StackStrF &, StackStrF &, Array &, Uint8, Uint8 >()