* BugFix: Fix a missing <vector> include for GCC.

* BugFix: Correct some globally used local variables in the editor code.
This commit is contained in:
Robert MacGregor 2021-09-03 00:26:48 -04:00
parent 07877f246a
commit 5cce344bb1
2 changed files with 6 additions and 3 deletions

View file

@ -23,6 +23,7 @@
#ifndef _CODEBLOCK_H_
#define _CODEBLOCK_H_
#include <vector>
#include <unordered_map>
struct CompilerLocalVariableToRegisterMappingTable

View file

@ -318,7 +318,8 @@ void GuiInspectorField::setData( const char* data, bool callbacks )
{
char buffer[ 2048 ];
expandEscape( buffer, newValue );
newValue = (const char*)Con::evaluatef( "%%f = \"%s\"; return ( %s );", oldValue.c_str(), buffer );
newValue = (const char*)Con::evaluatef( "$f = \"%s\"; return ( %s );", oldValue.c_str(), buffer );
Con::evaluatef("$f=0;");
}
else if( type == TypeS32Vector
|| type == TypeF32Vector
@ -353,9 +354,10 @@ void GuiInspectorField::setData( const char* data, bool callbacks )
char buffer[ 2048 ];
expandEscape( buffer, newComponentExpr );
const char* newComponentVal = Con::evaluatef( "%%f = \"%s\"; %%v = \"%s\"; return ( %s );",
const char* newComponentVal = Con::evaluatef( "$f = \"%s\"; $v = \"%s\"; return ( %s );",
oldComponentVal, oldValue.c_str(), buffer );
Con::evaluatef("$f=0;$v=0;");
if( !isFirst )
strNew.append( ' ' );
strNew.append( newComponentVal );