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
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 );
}
// 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 );
}

View File

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