Issue #218: Used refenrces instead of pointers in C++ functions

This commit is contained in:
Viacheslav Demydiuk
2020-11-01 15:59:11 +02:00
parent f6659ed91d
commit 1a1b0cd822
2 changed files with 31 additions and 25 deletions
+7 -2
View File
@@ -185,7 +185,7 @@ namespace MTApiService
return retval;
}
public object GetCommandParameter(int expertHandle, int index)
public T GetCommandParameter<T>(int expertHandle, int index)
{
Log.DebugFormat("GetCommandParameter: begin. expertHandle = {0}, index = {1}", expertHandle, index);
@@ -204,7 +204,7 @@ namespace MTApiService
Log.DebugFormat("GetCommandParameter: end. retval = {0}", retval);
return retval;
return (T)retval;
}
public object GetNamedParameter(int expertHandle, string name)
@@ -250,6 +250,11 @@ namespace MTApiService
return retval;
}
public void LogError(string message)
{
Log.Error(message);
}
#endregion
#region Private Methods