mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 13:45:37 +03:00
Deduplicate function names
This commit is contained in:
parent
5782160623
commit
b6f651b45c
@ -46,6 +46,29 @@ internal Function AddFunction( string funcName, string returnType, string args )
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
public void PostProcess()
|
||||
{
|
||||
var LastName = "";
|
||||
var DuplicateCount = 0;
|
||||
|
||||
for (int i=0; i< Functions.Count; i++ )
|
||||
{
|
||||
var ThisName = Functions[i].Name;
|
||||
|
||||
if ( Functions[i].Name == LastName)
|
||||
{
|
||||
DuplicateCount++;
|
||||
Functions[i].Name += $"{DuplicateCount + 1}";
|
||||
}
|
||||
else
|
||||
{
|
||||
DuplicateCount = 0;
|
||||
}
|
||||
|
||||
LastName = ThisName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public void ProcessClass( string fulldef, string classname, string inner )
|
||||
if ( line.Trim().StartsWith( "public:" ) ) continue;
|
||||
if ( line.Trim().StartsWith( "//" ) ) continue;
|
||||
|
||||
var callresult = Regex.Match( line, @"STEAM_CALL_RESULT\( (.+?) \)" );
|
||||
var callresult = Regex.Match( line, @"STEAM_CALL_RESULT\((.+?)\)" );
|
||||
if ( callresult.Success )
|
||||
{
|
||||
lastCallResult = callresult.Groups[1].Value.Trim();
|
||||
@ -89,6 +89,7 @@ public void ProcessClass( string fulldef, string classname, string inner )
|
||||
}
|
||||
}
|
||||
|
||||
c.PostProcess();
|
||||
|
||||
Classes.Add( c );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user