1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-07-09 10:27:10 +02:00

Discard instances of constant StackStrF parameters. This should always be non-const if possible.

This commit is contained in:
Sandu Liviu Catalin
2019-02-17 17:23:59 +02:00
parent baee2d5c33
commit 600c21d45f
68 changed files with 250 additions and 227 deletions

@ -1888,6 +1888,16 @@ struct StackStrF
CacheHash();
return GetHash();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Provide a dummy non constant instance when calling functions that can work with placeholders.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static StackStrF & Dummy()
{
static StackStrF o;
o.Release();
return o;
}
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -2122,7 +2132,7 @@ template<class T> struct is_reference<T&>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Fast integer to string implementation to avoid using itoa. See https://github.com/jeaiii/itoa
/// Fast integer to string implementation to avoid using itoa. See https://github.com/jeaiii/itoa
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////