mirror of https://github.com/OpenTTD/OpenTTD
Codechange: use fmt::format to build Squirrel error message
parent
5e9a1eb790
commit
a541b8217d
|
@ -48,9 +48,7 @@ SQInteger sq_aux_throwobject(HSQUIRRELVM v,SQObjectPtr &e)
|
||||||
|
|
||||||
SQInteger sq_aux_invalidtype(HSQUIRRELVM v,SQObjectType type)
|
SQInteger sq_aux_invalidtype(HSQUIRRELVM v,SQObjectType type)
|
||||||
{
|
{
|
||||||
char buf[100];
|
return sq_throwerror(v, fmt::format("unexpected type {}", IdType2Name(type)));
|
||||||
seprintf(buf, lastof(buf), "unexpected type %s", IdType2Name(type));
|
|
||||||
return sq_throwerror(v, buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HSQUIRRELVM sq_open(SQInteger initialstacksize)
|
HSQUIRRELVM sq_open(SQInteger initialstacksize)
|
||||||
|
|
Loading…
Reference in New Issue