diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-21 18:08:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-21 18:08:38 +0300 |
commit | 03ba85dcd2d47cf31d6181b40620e278f7f30427 (patch) | |
tree | b094d6ec3070821a67455d4812d7776888eac803 /protocols/Discord/src | |
parent | d15ac078344461faee80f676b49d2194387b9862 (diff) |
more warnings fixed
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r-- | protocols/Discord/src/connection.cpp | 2 | ||||
-rw-r--r-- | protocols/Discord/src/gateway.cpp | 2 | ||||
-rw-r--r-- | protocols/Discord/src/groupchat.cpp | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Discord/src/connection.cpp b/protocols/Discord/src/connection.cpp index ddb1a77e04..ae8da49d97 100644 --- a/protocols/Discord/src/connection.cpp +++ b/protocols/Discord/src/connection.cpp @@ -24,7 +24,7 @@ void CDiscordProto::ExecuteRequest(AsyncHttpRequest *pReq) pReq->szUrl = pReq->m_szUrl.GetBuffer(); if (!pReq->m_szParam.IsEmpty()) { if (pReq->requestType == REQUEST_GET) { - str.Format("%s?%s", pReq->m_szUrl, pReq->m_szParam); + str.Format("%s?%s", pReq->m_szUrl.c_str(), pReq->m_szParam.c_str()); pReq->szUrl = str.GetBuffer(); } else { diff --git a/protocols/Discord/src/gateway.cpp b/protocols/Discord/src/gateway.cpp index 51a4b7344f..9d3266917a 100644 --- a/protocols/Discord/src/gateway.cpp +++ b/protocols/Discord/src/gateway.cpp @@ -248,7 +248,7 @@ void CDiscordProto::GatewayThreadWorker() if (hdr.bIsFinal) { // process a packet here CMStringA szJson(netbuf.data() + hdr.headerSize, (int)hdr.payloadSize); - debugLogA("JSON received:\n%s", szJson); + debugLogA("JSON received:\n%s", szJson.c_str()); JSONNode root = JSONNode::parse(szJson); if (root) GatewayProcess(root); diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp index d5574eb2b7..e0f1603ac8 100644 --- a/protocols/Discord/src/groupchat.cpp +++ b/protocols/Discord/src/groupchat.cpp @@ -106,7 +106,7 @@ void CDiscordProto::Chat_ProcessLogMenu(GCHOOK *gch) switch (gch->dwData) { case IDM_DESTROY: if (IDYES == MessageBox(nullptr, TranslateT("Do you really want to destroy this channel? This action is non-revertable."), m_tszUserName, MB_YESNO | MB_ICONQUESTION)) { - CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername); + CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str()); Push(new AsyncHttpRequest(this, REQUEST_DELETE, szUrl, nullptr)); } break; @@ -117,7 +117,7 @@ void CDiscordProto::Chat_ProcessLogMenu(GCHOOK *gch) es.szDataPrefix = "chat_rename"; if (EnterString(&es)) { JSONNode root; root << WCHAR_PARAM("name", es.ptszResult); - CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername); + CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str()); Push(new AsyncHttpRequest(this, REQUEST_PATCH, szUrl, nullptr, &root)); mir_free(es.ptszResult); } @@ -129,7 +129,7 @@ void CDiscordProto::Chat_ProcessLogMenu(GCHOOK *gch) es.szDataPrefix = "chat_topic"; if (EnterString(&es)) { JSONNode root; root << WCHAR_PARAM("topic", es.ptszResult); - CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername); + CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str()); Push(new AsyncHttpRequest(this, REQUEST_PATCH, szUrl, nullptr, &root)); mir_free(es.ptszResult); } |