mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-01-18 19:47:15 +01:00
Don't make the temporary buffer static.
It is pointless.
This commit is contained in:
parent
25fb30140c
commit
db6cf1cdde
@ -742,8 +742,6 @@ const AABB & AABB::Get(StackStrF & str)
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const AABB & AABB::GetEx(SQChar delim, StackStrF & str)
|
const AABB & AABB::GetEx(SQChar delim, StackStrF & str)
|
||||||
{
|
{
|
||||||
// The format specifications that will be used to scan the string
|
|
||||||
static SQChar fs[] = _SC(" %f , %f , %f , %f , %f , %f ");
|
|
||||||
static AABB box;
|
static AABB box;
|
||||||
// Clear previous values, if any
|
// Clear previous values, if any
|
||||||
box.Clear();
|
box.Clear();
|
||||||
@ -752,6 +750,8 @@ const AABB & AABB::GetEx(SQChar delim, StackStrF & str)
|
|||||||
{
|
{
|
||||||
return box; // Return the value as is!
|
return box; // Return the value as is!
|
||||||
}
|
}
|
||||||
|
// The format specifications that will be used to scan the string
|
||||||
|
SQChar fs[] = _SC(" %f , %f , %f , %f , %f , %f ");
|
||||||
// Assign the specified delimiter
|
// Assign the specified delimiter
|
||||||
fs[4] = delim;
|
fs[4] = delim;
|
||||||
fs[9] = delim;
|
fs[9] = delim;
|
||||||
|
@ -503,8 +503,6 @@ const Circle & Circle::Get(StackStrF & str)
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const Circle & Circle::GetEx(SQChar delim, StackStrF & str)
|
const Circle & Circle::GetEx(SQChar delim, StackStrF & str)
|
||||||
{
|
{
|
||||||
// The format specifications that will be used to scan the string
|
|
||||||
static SQChar fs[] = _SC(" %f , %f , %f ");
|
|
||||||
static Circle circle;
|
static Circle circle;
|
||||||
// Clear previous values, if any
|
// Clear previous values, if any
|
||||||
circle.Clear();
|
circle.Clear();
|
||||||
@ -513,6 +511,8 @@ const Circle & Circle::GetEx(SQChar delim, StackStrF & str)
|
|||||||
{
|
{
|
||||||
return circle; // Return the value as is!
|
return circle; // Return the value as is!
|
||||||
}
|
}
|
||||||
|
// The format specifications that will be used to scan the string
|
||||||
|
SQChar fs[] = _SC(" %f , %f , %f ");
|
||||||
// Assign the specified delimiter
|
// Assign the specified delimiter
|
||||||
fs[4] = delim;
|
fs[4] = delim;
|
||||||
fs[9] = delim;
|
fs[9] = delim;
|
||||||
|
@ -640,12 +640,10 @@ const Color3 & Color3::Get(StackStrF & str)
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const Color3 & Color3::GetEx(SQChar delim, StackStrF & str)
|
const Color3 & Color3::GetEx(SQChar delim, StackStrF & str)
|
||||||
{
|
{
|
||||||
// The format specifications that will be used to scan the string
|
|
||||||
static SQChar fs[] = _SC(" %u , %u , %u ");
|
|
||||||
static Color3 col;
|
static Color3 col;
|
||||||
// The minimum and maximum values supported by the Color3 type
|
// The minimum and maximum values supported by the Color3 type
|
||||||
static const Uint32 min = std::numeric_limits< Color3::Value >::min();
|
static constexpr Uint32 min = std::numeric_limits< Color3::Value >::min();
|
||||||
static const Uint32 max = std::numeric_limits< Color3::Value >::max();
|
static constexpr Uint32 max = std::numeric_limits< Color3::Value >::max();
|
||||||
// Clear previous values, if any
|
// Clear previous values, if any
|
||||||
col.Clear();
|
col.Clear();
|
||||||
// Is the specified string empty?
|
// Is the specified string empty?
|
||||||
@ -653,6 +651,8 @@ const Color3 & Color3::GetEx(SQChar delim, StackStrF & str)
|
|||||||
{
|
{
|
||||||
return col; // Return the value as is!
|
return col; // Return the value as is!
|
||||||
}
|
}
|
||||||
|
// The format specifications that will be used to scan the string
|
||||||
|
SQChar fs[] = _SC(" %u , %u , %u ");
|
||||||
// Assign the specified delimiter
|
// Assign the specified delimiter
|
||||||
fs[4] = delim;
|
fs[4] = delim;
|
||||||
fs[9] = delim;
|
fs[9] = delim;
|
||||||
|
@ -675,12 +675,10 @@ const Color4 & Color4::Get(StackStrF & str)
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const Color4 & Color4::GetEx(SQChar delim, StackStrF & str)
|
const Color4 & Color4::GetEx(SQChar delim, StackStrF & str)
|
||||||
{
|
{
|
||||||
// The format specifications that will be used to scan the string
|
|
||||||
static SQChar fs[] = _SC(" %u , %u , %u , %u ");
|
|
||||||
static Color4 col;
|
static Color4 col;
|
||||||
// The minimum and maximum values supported by the Color4 type
|
// The minimum and maximum values supported by the Color4 type
|
||||||
static const Uint32 min = std::numeric_limits< Color4::Value >::min();
|
static constexpr Uint32 min = std::numeric_limits< Color4::Value >::min();
|
||||||
static const Uint32 max = std::numeric_limits< Color4::Value >::max();
|
static constexpr Uint32 max = std::numeric_limits< Color4::Value >::max();
|
||||||
// Clear previous values, if any
|
// Clear previous values, if any
|
||||||
col.Clear();
|
col.Clear();
|
||||||
// Is the specified string empty?
|
// Is the specified string empty?
|
||||||
@ -688,6 +686,8 @@ const Color4 & Color4::GetEx(SQChar delim, StackStrF & str)
|
|||||||
{
|
{
|
||||||
return col; // Return the value as is!
|
return col; // Return the value as is!
|
||||||
}
|
}
|
||||||
|
// The format specifications that will be used to scan the string
|
||||||
|
SQChar fs[] = _SC(" %u , %u , %u , %u ");
|
||||||
// Assign the specified delimiter
|
// Assign the specified delimiter
|
||||||
fs[4] = delim;
|
fs[4] = delim;
|
||||||
fs[9] = delim;
|
fs[9] = delim;
|
||||||
|
@ -722,8 +722,6 @@ const Quaternion & Quaternion::Get(StackStrF & str)
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const Quaternion & Quaternion::GetEx(SQChar delim, StackStrF & str)
|
const Quaternion & Quaternion::GetEx(SQChar delim, StackStrF & str)
|
||||||
{
|
{
|
||||||
// The format specifications that will be used to scan the string
|
|
||||||
static SQChar fs[] = _SC(" %f , %f , %f , %f ");
|
|
||||||
static Quaternion quat;
|
static Quaternion quat;
|
||||||
// Clear previous values, if any
|
// Clear previous values, if any
|
||||||
quat.Clear();
|
quat.Clear();
|
||||||
@ -732,6 +730,8 @@ const Quaternion & Quaternion::GetEx(SQChar delim, StackStrF & str)
|
|||||||
{
|
{
|
||||||
return quat; // Return the value as is!
|
return quat; // Return the value as is!
|
||||||
}
|
}
|
||||||
|
// The format specifications that will be used to scan the string
|
||||||
|
SQChar fs[] = _SC(" %f , %f , %f , %f ");
|
||||||
// Assign the specified delimiter
|
// Assign the specified delimiter
|
||||||
fs[4] = delim;
|
fs[4] = delim;
|
||||||
fs[9] = delim;
|
fs[9] = delim;
|
||||||
|
@ -476,8 +476,6 @@ const Sphere & Sphere::Get(StackStrF & str)
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const Sphere & Sphere::GetEx(SQChar delim, StackStrF & str)
|
const Sphere & Sphere::GetEx(SQChar delim, StackStrF & str)
|
||||||
{
|
{
|
||||||
// The format specifications that will be used to scan the string
|
|
||||||
static SQChar fs[] = _SC(" %f , %f , %f , %f ");
|
|
||||||
static Sphere sphere;
|
static Sphere sphere;
|
||||||
// Clear previous values, if any
|
// Clear previous values, if any
|
||||||
sphere.Clear();
|
sphere.Clear();
|
||||||
@ -486,6 +484,8 @@ const Sphere & Sphere::GetEx(SQChar delim, StackStrF & str)
|
|||||||
{
|
{
|
||||||
return sphere; // Return the value as is!
|
return sphere; // Return the value as is!
|
||||||
}
|
}
|
||||||
|
// The format specifications that will be used to scan the string
|
||||||
|
SQChar fs[] = _SC(" %f , %f , %f , %f ");
|
||||||
// Assign the specified delimiter
|
// Assign the specified delimiter
|
||||||
fs[4] = delim;
|
fs[4] = delim;
|
||||||
fs[9] = delim;
|
fs[9] = delim;
|
||||||
|
@ -384,8 +384,6 @@ const Vector2 & Vector2::Get(StackStrF & str)
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const Vector2 & Vector2::GetEx(SQChar delim, StackStrF & str)
|
const Vector2 & Vector2::GetEx(SQChar delim, StackStrF & str)
|
||||||
{
|
{
|
||||||
// The format specifications that will be used to scan the string
|
|
||||||
static SQChar fs[] = _SC(" %f , %f ");
|
|
||||||
static Vector2 vec;
|
static Vector2 vec;
|
||||||
// Clear previous values, if any
|
// Clear previous values, if any
|
||||||
vec.Clear();
|
vec.Clear();
|
||||||
@ -394,6 +392,8 @@ const Vector2 & Vector2::GetEx(SQChar delim, StackStrF & str)
|
|||||||
{
|
{
|
||||||
return vec; // Return the value as is!
|
return vec; // Return the value as is!
|
||||||
}
|
}
|
||||||
|
// The format specifications that will be used to scan the string
|
||||||
|
SQChar fs[] = _SC(" %f , %f ");
|
||||||
// Assign the specified delimiter
|
// Assign the specified delimiter
|
||||||
fs[4] = delim;
|
fs[4] = delim;
|
||||||
// Attempt to extract the component values from the specified string
|
// Attempt to extract the component values from the specified string
|
||||||
|
@ -530,8 +530,6 @@ const Vector2i & Vector2i::Get(StackStrF & str)
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const Vector2i & Vector2i::GetEx(SQChar delim, StackStrF & str)
|
const Vector2i & Vector2i::GetEx(SQChar delim, StackStrF & str)
|
||||||
{
|
{
|
||||||
// The format specifications that will be used to scan the string
|
|
||||||
static SQChar fs[] = _SC(" %d , %d ");
|
|
||||||
static Vector2i vec;
|
static Vector2i vec;
|
||||||
// Clear previous values, if any
|
// Clear previous values, if any
|
||||||
vec.Clear();
|
vec.Clear();
|
||||||
@ -540,6 +538,8 @@ const Vector2i & Vector2i::GetEx(SQChar delim, StackStrF & str)
|
|||||||
{
|
{
|
||||||
return vec; // Return the value as is!
|
return vec; // Return the value as is!
|
||||||
}
|
}
|
||||||
|
// The format specifications that will be used to scan the string
|
||||||
|
SQChar fs[] = _SC(" %d , %d ");
|
||||||
// Assign the specified delimiter
|
// Assign the specified delimiter
|
||||||
fs[4] = delim;
|
fs[4] = delim;
|
||||||
// Attempt to extract the component values from the specified string
|
// Attempt to extract the component values from the specified string
|
||||||
|
@ -637,8 +637,6 @@ const Vector3 & Vector3::Get(StackStrF & str)
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const Vector3 & Vector3::GetEx(SQChar delim, StackStrF & str)
|
const Vector3 & Vector3::GetEx(SQChar delim, StackStrF & str)
|
||||||
{
|
{
|
||||||
// The format specifications that will be used to scan the string
|
|
||||||
static SQChar fs[] = _SC(" %f , %f , %f ");
|
|
||||||
static Vector3 vec;
|
static Vector3 vec;
|
||||||
// Clear previous values, if any
|
// Clear previous values, if any
|
||||||
vec.Clear();
|
vec.Clear();
|
||||||
@ -647,6 +645,8 @@ const Vector3 & Vector3::GetEx(SQChar delim, StackStrF & str)
|
|||||||
{
|
{
|
||||||
return vec; // Return the value as is!
|
return vec; // Return the value as is!
|
||||||
}
|
}
|
||||||
|
// The format specifications that will be used to scan the string
|
||||||
|
SQChar fs[] = _SC(" %f , %f , %f ");
|
||||||
// Assign the specified delimiter
|
// Assign the specified delimiter
|
||||||
fs[4] = delim;
|
fs[4] = delim;
|
||||||
fs[9] = delim;
|
fs[9] = delim;
|
||||||
|
@ -473,8 +473,6 @@ const Vector4 & Vector4::Get(StackStrF & str)
|
|||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const Vector4 & Vector4::GetEx(SQChar delim, StackStrF & str)
|
const Vector4 & Vector4::GetEx(SQChar delim, StackStrF & str)
|
||||||
{
|
{
|
||||||
// The format specifications that will be used to scan the string
|
|
||||||
static SQChar fs[] = _SC(" %f , %f , %f , %f ");
|
|
||||||
static Vector4 vec;
|
static Vector4 vec;
|
||||||
// Clear previous values, if any
|
// Clear previous values, if any
|
||||||
vec.Clear();
|
vec.Clear();
|
||||||
@ -483,6 +481,8 @@ const Vector4 & Vector4::GetEx(SQChar delim, StackStrF & str)
|
|||||||
{
|
{
|
||||||
return vec; // Return the value as is!
|
return vec; // Return the value as is!
|
||||||
}
|
}
|
||||||
|
// The format specifications that will be used to scan the string
|
||||||
|
SQChar fs[] = _SC(" %f , %f , %f , %f ");
|
||||||
// Assign the specified delimiter
|
// Assign the specified delimiter
|
||||||
fs[4] = delim;
|
fs[4] = delim;
|
||||||
fs[9] = delim;
|
fs[9] = delim;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user