1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-15 22:57:12 +02:00

Lazy fix for new changes to cpp fmt library.

This commit is contained in:
Sandu Liviu Catalin
2021-07-03 14:09:58 +03:00
parent 69d1b6a919
commit a710ceebff
19 changed files with 92 additions and 92 deletions

View File

@ -730,7 +730,7 @@ int32_t AABB::IsSphereInsideFastEx(Value x, Value y, Value z, Value r) const
// ------------------------------------------------------------------------------------------------
String AABB::Format(StackStrF & str) const
{
return fmt::format(str.ToStr()
return fmt::format(fmt::runtime(str.ToStr())
, fmt::arg("min_x", min.x)
, fmt::arg("min_y", min.y)
, fmt::arg("min_z", min.z)

View File

@ -496,7 +496,7 @@ Array Circle::ToPointsArray(SQInteger num_segments) const
// ------------------------------------------------------------------------------------------------
String Circle::Format(StackStrF & str) const
{
return fmt::format(str.ToStr()
return fmt::format(fmt::runtime(str.ToStr())
, fmt::arg("x", pos.x)
, fmt::arg("y", pos.y)
, fmt::arg("r", rad)

View File

@ -658,7 +658,7 @@ LightObj Color3::ToHex4() const
// ------------------------------------------------------------------------------------------------
String Color3::Format(StackStrF & str) const
{
return fmt::format(str.ToStr()
return fmt::format(fmt::runtime(str.ToStr())
, fmt::arg("r", r)
, fmt::arg("g", g)
, fmt::arg("b", b)

View File

@ -693,7 +693,7 @@ LightObj Color4::ToHex3() const
// ------------------------------------------------------------------------------------------------
String Color4::Format(StackStrF & str) const
{
return fmt::format(str.ToStr()
return fmt::format(fmt::runtime(str.ToStr())
, fmt::arg("r", r)
, fmt::arg("g", g)
, fmt::arg("b", b)

View File

@ -719,7 +719,7 @@ const Quaternion & Quaternion::Get(StackStrF & str)
// ------------------------------------------------------------------------------------------------
String Quaternion::Format(StackStrF & str) const
{
return fmt::format(str.ToStr()
return fmt::format(fmt::runtime(str.ToStr())
, fmt::arg("x", x)
, fmt::arg("y", y)
, fmt::arg("z", z)

View File

@ -955,11 +955,11 @@ struct SqAssertResult
// Default?
if (s.mLen <= 0)
{
LogScs("%s", fmt::format(mFStr, mA, mB).c_str());
LogScs("%s", fmt::format(fmt::runtime(mFStr), mA, mB).c_str());
}
else
{
LogScs("%s", fmt::format(s.ToStr(), mA, mB).c_str());
LogScs("%s", fmt::format(fmt::runtime(s.ToStr()), mA, mB).c_str());
}
// Allow chaining
return *this;
@ -1120,7 +1120,7 @@ template < class C > static SQInteger SqAssertValue(HSQUIRRELVM vm)
if (C{}(r) == false)
{
// Throw the error
return sq_throwerrorf(vm, fmt::format(C::FSTRV, ar.Get()->mA, ar.Get()->mB).c_str());
return sq_throwerrorf(vm, fmt::format(fmt::runtime(C::FSTRV), ar.Get()->mA, ar.Get()->mB).c_str());
}
// Try to return assert result
try
@ -1165,7 +1165,7 @@ template < class C > static SQInteger SqAssertSame(HSQUIRRELVM vm)
if (C{}(r) == false)
{
// Throw the error
return sq_throwerrorf(vm, fmt::format(C::FSTRV, ar.Get()->mA, ar.Get()->mB).c_str());
return sq_throwerrorf(vm, fmt::format(fmt::runtime(C::FSTRV), ar.Get()->mA, ar.Get()->mB).c_str());
}
// Try to return assert result
try

View File

@ -469,7 +469,7 @@ Sphere Sphere::Abs() const
// ------------------------------------------------------------------------------------------------
String Sphere::Format(StackStrF & str) const
{
return fmt::format(str.ToStr()
return fmt::format(fmt::runtime(str.ToStr())
, fmt::arg("x", pos.x)
, fmt::arg("y", pos.y)
, fmt::arg("z", pos.z)

View File

@ -375,7 +375,7 @@ Vector2 Vector2::Abs() const
// ------------------------------------------------------------------------------------------------
String Vector2::Format(StackStrF & str) const
{
return fmt::format(str.ToStr()
return fmt::format(fmt::runtime(str.ToStr())
, fmt::arg("x", x)
, fmt::arg("y", y)
);

View File

@ -521,7 +521,7 @@ Vector2i Vector2i::Abs() const
// ------------------------------------------------------------------------------------------------
String Vector2i::Format(StackStrF & str) const
{
return fmt::format(str.ToStr()
return fmt::format(fmt::runtime(str.ToStr())
, fmt::arg("x", x)
, fmt::arg("y", y)
);

View File

@ -628,7 +628,7 @@ void Vector3::CenterRotateYZBy(Value degrees, const Vector3 & center)
// ------------------------------------------------------------------------------------------------
String Vector3::Format(StackStrF & str) const
{
return fmt::format(str.ToStr()
return fmt::format(fmt::runtime(str.ToStr())
, fmt::arg("x", x)
, fmt::arg("y", y)
, fmt::arg("z", z)

View File

@ -470,7 +470,7 @@ const Vector4 & Vector4::Get(StackStrF & str)
// ------------------------------------------------------------------------------------------------
String Vector4::Format(StackStrF & str) const
{
return fmt::format(str.ToStr()
return fmt::format(fmt::runtime(str.ToStr())
, fmt::arg("x", x)
, fmt::arg("y", y)
, fmt::arg("z", z)