mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
optimizations
This commit is contained in:
parent
dcd01e1231
commit
55b0ecb487
3 changed files with 38 additions and 33 deletions
|
|
@ -149,12 +149,10 @@ class ConsoleValue
|
|||
|
||||
enum Constants
|
||||
{
|
||||
ConversionBufferSize = 1024,
|
||||
StringSize = 16
|
||||
ConversionBufferSize = 32
|
||||
};
|
||||
|
||||
static char sConversionBuffer[ConversionBufferSize];
|
||||
static S32 sBufferOffset;
|
||||
|
||||
char* convertToBuffer() const;
|
||||
|
||||
|
|
@ -314,6 +312,13 @@ public:
|
|||
dStrcpy(s, val, static_cast<dsize_t>(len) + 1);
|
||||
}
|
||||
|
||||
TORQUE_FORCEINLINE void setStringRef(const char* ref, S32 len)
|
||||
{
|
||||
cleanupData();
|
||||
type = ConsoleValueType::cvString;
|
||||
s = const_cast<char*>(ref);
|
||||
}
|
||||
|
||||
TORQUE_FORCEINLINE void setBool(const bool val)
|
||||
{
|
||||
cleanupData();
|
||||
|
|
@ -361,7 +366,6 @@ public:
|
|||
}
|
||||
|
||||
static void init();
|
||||
static S32 getConstantBufferCount() { return (S32)ConversionBufferSize / StringSize; }
|
||||
};
|
||||
|
||||
// Transparently converts ConsoleValue[] to const char**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue