Fixed duplicate method name values

This commit is contained in:
Garry Newman 2018-01-31 13:05:49 +00:00
parent 2ecf323ae0
commit 627fa4c825
2 changed files with 12 additions and 4 deletions

View File

@ -285,13 +285,13 @@ public bool SetProperty0( SteamInventoryUpdateHandle_t handle /*SteamInventoryUp
} }
// bool // bool
public bool SetProperty0( SteamInventoryUpdateHandle_t handle /*SteamInventoryUpdateHandle_t*/, SteamItemInstanceID_t nItemID /*SteamItemInstanceID_t*/, string pchPropertyName /*const char **/, long nValue /*int64*/ ) public bool SetProperty1( SteamInventoryUpdateHandle_t handle /*SteamInventoryUpdateHandle_t*/, SteamItemInstanceID_t nItemID /*SteamItemInstanceID_t*/, string pchPropertyName /*const char **/, long nValue /*int64*/ )
{ {
return platform.ISteamInventory_SetProperty0( handle.Value, nItemID.Value, pchPropertyName, nValue ); return platform.ISteamInventory_SetProperty0( handle.Value, nItemID.Value, pchPropertyName, nValue );
} }
// bool // bool
public bool SetProperty0( SteamInventoryUpdateHandle_t handle /*SteamInventoryUpdateHandle_t*/, SteamItemInstanceID_t nItemID /*SteamItemInstanceID_t*/, string pchPropertyName /*const char **/, float flValue /*float*/ ) public bool SetProperty2( SteamInventoryUpdateHandle_t handle /*SteamInventoryUpdateHandle_t*/, SteamItemInstanceID_t nItemID /*SteamItemInstanceID_t*/, string pchPropertyName /*const char **/, float flValue /*float*/ )
{ {
return platform.ISteamInventory_SetProperty0( handle.Value, nItemID.Value, pchPropertyName, flValue ); return platform.ISteamInventory_SetProperty0( handle.Value, nItemID.Value, pchPropertyName, flValue );
} }

View File

@ -9,6 +9,7 @@ namespace Generator
public partial class CodeWriter public partial class CodeWriter
{ {
string LastMethodName; string LastMethodName;
int MethodNameCount;
List<string> BeforeLines; List<string> BeforeLines;
List<string> AfterLines; List<string> AfterLines;
string ReturnType; string ReturnType;
@ -143,8 +144,15 @@ private void ClassMethod( string classname, SteamApiDefinition.MethodDef m )
var methodName = m.Name; var methodName = m.Name;
if ( LastMethodName == methodName ) if (LastMethodName == methodName)
methodName += "0"; {
methodName += MethodNameCount.ToString();
MethodNameCount++;
}
else
{
MethodNameCount = 0;
}
var argString = string.Join( ", ", argList.Select( x => x.ManagedParameter() ) ); var argString = string.Join( ", ", argList.Select( x => x.ManagedParameter() ) );
if ( argString != "" ) argString = " " + argString + " "; if ( argString != "" ) argString = " " + argString + " ";