mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-17 12:48:11 +00:00
Fixed warning in function CreateErrorResponse (MT5)
Declaration of 'message' hides global declaration in MtApi5.mq5
This commit is contained in:
+6
-6
@@ -1908,7 +1908,7 @@ string OnRequest(string json)
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
string CreateErrorResponse(int code, string message)
|
string CreateErrorResponse(int code, string message_er)
|
||||||
{
|
{
|
||||||
JSONValue* jsonError;
|
JSONValue* jsonError;
|
||||||
if (code == 0)
|
if (code == 0)
|
||||||
@@ -1916,13 +1916,13 @@ string CreateErrorResponse(int code, string message)
|
|||||||
else
|
else
|
||||||
jsonError = new JSONNumber((long)code);
|
jsonError = new JSONNumber((long)code);
|
||||||
|
|
||||||
JSONObject *joResponse = new JSONObject();
|
JSONObject *joResponse = new JSONObject();
|
||||||
joResponse.put("ErrorCode", jsonError);
|
joResponse.put("ErrorCode", jsonError);
|
||||||
joResponse.put("ErrorMessage", new JSONString(message));
|
joResponse.put("ErrorMessage", new JSONString(message_er));
|
||||||
|
|
||||||
string result = joResponse.toString();
|
string result = joResponse.toString();
|
||||||
delete joResponse;
|
delete joResponse;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
string CreateSuccessResponse(string responseName, JSONValue* responseBody)
|
string CreateSuccessResponse(string responseName, JSONValue* responseBody)
|
||||||
|
|||||||
Reference in New Issue
Block a user