clean up math varsize complaints

This commit is contained in:
AzaezelX 2023-04-27 16:10:04 -05:00
parent 1230d0d280
commit 0ce2da3a23
30 changed files with 61 additions and 56 deletions

View file

@ -1556,7 +1556,7 @@ U32 FunctionDeclStmtNode::compileStmt(CodeStream& codeStream, U32 ip)
// map local variables to registers for this function.
// Note we have to map these in order because the table itself is ordered by the register id.
CompilerLocalVariableToRegisterMappingTable* tbl = &getFunctionVariableMappingTable();
for (size_t i = 0; i < gFuncVars->variableNameMap.size(); ++i)
for (S32 i = 0; i < gFuncVars->variableNameMap.size(); ++i)
{
StringTableEntry varName = gFuncVars->variableNameMap[i];
tbl->add(fnName, nameSpace, varName);

View file

@ -615,7 +615,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
gExecCount++;
#endif
const dsize_t TRACE_BUFFER_SIZE = 1024;
const U32 TRACE_BUFFER_SIZE = 1024;
static char traceBuffer[TRACE_BUFFER_SIZE];
U32 i;
@ -648,12 +648,12 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
}
if (thisNamespace && thisNamespace->mName)
{
dSprintf(traceBuffer + dStrlen(traceBuffer), sizeof(traceBuffer) - dStrlen(traceBuffer),
dSprintf(traceBuffer + (U32)dStrlen(traceBuffer), sizeof(traceBuffer) - (U32)dStrlen(traceBuffer),
"%s::%s(", thisNamespace->mName, thisFunctionName);
}
else
{
dSprintf(traceBuffer + dStrlen(traceBuffer), sizeof(traceBuffer) - dStrlen(traceBuffer),
dSprintf(traceBuffer + (U32)dStrlen(traceBuffer), sizeof(traceBuffer) - (U32)dStrlen(traceBuffer),
"%s(", thisFunctionName);
}
for (i = 0; i < wantedArgc; i++)
@ -2317,12 +2317,12 @@ execFinished:
}
if (thisNamespace && thisNamespace->mName)
{
dSprintf(traceBuffer + dStrlen(traceBuffer), sizeof(traceBuffer) - dStrlen(traceBuffer),
dSprintf(traceBuffer + (U32)dStrlen(traceBuffer), sizeof(traceBuffer) - (U32)dStrlen(traceBuffer),
"%s::%s() - return %s", thisNamespace->mName, thisFunctionName, returnValue.getString());
}
else
{
dSprintf(traceBuffer + dStrlen(traceBuffer), sizeof(traceBuffer) - dStrlen(traceBuffer),
dSprintf(traceBuffer + (U32)dStrlen(traceBuffer), sizeof(traceBuffer) - (U32)dStrlen(traceBuffer),
"%s() - return %s", thisFunctionName, returnValue.getString());
}
Con::printf("%s", traceBuffer);

View file

@ -276,7 +276,7 @@ void EngineObject::debugEnumInstances( const char* className, DebugEnumInstances
//-----------------------------------------------------------------------------
void* EngineCRuntimeObjectPool::allocateObject( U32 size TORQUE_TMM_ARGS_DECL )
void* EngineCRuntimeObjectPool::allocateObject(size_t size TORQUE_TMM_ARGS_DECL )
{
#ifdef TORQUE_DISABLE_MEMORY_MANAGER
return dMalloc( size );

View file

@ -456,7 +456,7 @@ class IEngineObjectPool
/// Allocate a new object memory block of the given size.
/// @return Pointer to a new memory block or NULL on failure.
virtual void* allocateObject( U32 size TORQUE_TMM_ARGS_DECL ) = 0;
virtual void* allocateObject( size_t size TORQUE_TMM_ARGS_DECL ) = 0;
/// Return the member for the object at the given address to the
/// allocator for reuse.
@ -485,7 +485,7 @@ class EngineCRuntimeObjectPool : public IEngineObjectPool
static EngineCRuntimeObjectPool* instance() { return &smInstance; }
// IEngineObjectPool
virtual void* allocateObject( U32 size TORQUE_TMM_ARGS_DECL );
virtual void* allocateObject(size_t size TORQUE_TMM_ARGS_DECL );
virtual void freeObject( void* ptr );
};