summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-26 22:24:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-26 22:24:58 +0000
commita7ecea148c70da66f744a0036f985bc97804d8b4 (patch)
tree007e11deee4595280f1941a178a4dfe9a79942f7 /protocols/Twitter/src
parentf0ea2e2a1708b66b4b2a7db825a0987306a5fc5d (diff)
unified project for Twitter
git-svn-id: http://svn.miranda-ng.org/main/trunk@13181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/src')
-rw-r--r--protocols/Twitter/src/chat.cpp2
-rw-r--r--protocols/Twitter/src/connection.cpp4
-rw-r--r--protocols/Twitter/src/contacts.cpp6
-rw-r--r--protocols/Twitter/src/main.cpp2
-rw-r--r--protocols/Twitter/src/oauth.cpp9
-rw-r--r--protocols/Twitter/src/proto.cpp7
-rw-r--r--protocols/Twitter/src/stdafx.cxx (renamed from protocols/Twitter/src/stdafx.cpp)0
-rw-r--r--protocols/Twitter/src/utility.h5
8 files changed, 13 insertions, 22 deletions
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp
index 30e357a7bc..17ded4336d 100644
--- a/protocols/Twitter/src/chat.cpp
+++ b/protocols/Twitter/src/chat.cpp
@@ -56,7 +56,7 @@ void TwitterProto::UpdateChat(const twitter_user &update)
mir_free(const_cast<TCHAR*>(gce.ptszText));
}
-int TwitterProto::OnChatOutgoing(WPARAM wParam, LPARAM lParam)
+int TwitterProto::OnChatOutgoing(WPARAM, LPARAM lParam)
{
GCHOOK *hook = reinterpret_cast<GCHOOK*>(lParam);
if (strcmp(hook->pDest->pszModule, m_szModuleName))
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp
index 2db1d892b9..a92ea20cc6 100644
--- a/protocols/Twitter/src/connection.cpp
+++ b/protocols/Twitter/src/connection.cpp
@@ -571,7 +571,7 @@ void TwitterProto::UpdateStatuses(bool pre_read, bool popups, bool tweetToMsg)
}
if (!updates.empty())
- since_id_ = std::max(since_id_, updates[0].status.id);
+ since_id_ = max(since_id_, updates[0].status.id);
for (twitter::status_list::reverse_iterator i = updates.rbegin(); i != updates.rend(); ++i) {
@@ -634,7 +634,7 @@ void TwitterProto::UpdateMessages(bool pre_read)
}
if (messages.size())
- dm_since_id_ = std::max(dm_since_id_, messages[0].status.id);
+ dm_since_id_ = max(dm_since_id_, messages[0].status.id);
for (twitter::status_list::reverse_iterator i = messages.rbegin(); i != messages.rend(); ++i) {
MCONTACT hContact = AddToClientList(i->username.c_str(), "");
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index ffbabc4503..674516a5b3 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -44,7 +44,7 @@ void TwitterProto::AddToListWorker(void *p)
mir_free(name);
}
-MCONTACT TwitterProto::AddToList(int flags, PROTOSEARCHRESULT *result)
+MCONTACT TwitterProto::AddToList(int, PROTOSEARCHRESULT *result)
{
if (m_iStatus != ID_STATUS_ONLINE)
return 0;
@@ -172,7 +172,7 @@ HANDLE TwitterProto::GetAwayMsg(MCONTACT hContact)
return (HANDLE)1;
}
-int TwitterProto::OnContactDeleted(WPARAM hContact, LPARAM lParam)
+int TwitterProto::OnContactDeleted(WPARAM hContact, LPARAM)
{
if (m_iStatus != ID_STATUS_ONLINE)
return 0;
@@ -264,7 +264,7 @@ void TwitterProto::SetAllContactStatuses(int status)
{
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
if (!db_get_b(hContact, m_szModuleName, "ChatRoom", 0))
- db_set_w(hContact, m_szModuleName, "Status", status);
+ db_set_w(hContact, m_szModuleName, "Status", (WORD)status);
SetChatStatus(status);
}
diff --git a/protocols/Twitter/src/main.cpp b/protocols/Twitter/src/main.cpp
index 53081ab253..a35ee2916e 100644
--- a/protocols/Twitter/src/main.cpp
+++ b/protocols/Twitter/src/main.cpp
@@ -57,7 +57,7 @@ DWORD WINAPI DllMain(HINSTANCE hInstance, DWORD, LPVOID)
return TRUE;
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfo;
}
diff --git a/protocols/Twitter/src/oauth.cpp b/protocols/Twitter/src/oauth.cpp
index 8458004e42..b2d8aa4795 100644
--- a/protocols/Twitter/src/oauth.cpp
+++ b/protocols/Twitter/src/oauth.cpp
@@ -145,10 +145,7 @@ wstring mir_twitter::OAuthWebRequestSubmit(
return OAuthWebRequestSubmit(oauthSignedParameters, url);
}
-wstring mir_twitter::OAuthWebRequestSubmit(
- const OAuthParameters& parameters,
- const wstring& url
- )
+wstring mir_twitter::OAuthWebRequestSubmit(const OAuthParameters &parameters, const wstring&)
{
//debugLogW("OAuthWebRequestSubmit(%s)", url);
@@ -377,8 +374,8 @@ wstring mir_twitter::OAuthCreateNonce()
wstring mir_twitter::OAuthCreateTimestamp()
{
__time64_t utcNow;
- __time64_t ret = _time64(&utcNow);
- _ASSERTE(ret != -1);
+ _time64(&utcNow);
+ _ASSERTE(utcNow != -1);
wchar_t buf[100] = {};
mir_snwprintf(buf, SIZEOF(buf), L"%I64u", utcNow);
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index b7e32117dc..820c67d1e2 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -274,8 +274,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM)
mi.hParentMenu = hRoot;
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.position = 1001;
-
- HANDLE m_hMenuRoot = Menu_AddStatusMenuItem(&mi);
+ Menu_AddStatusMenuItem(&mi);
// TODO: Disable this menu item when offline
// "Send Tweet..."
@@ -284,7 +283,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM)
mi.ptszName = LPGENT("Send Tweet...");
mi.popupPosition = 200001;
mi.icolibItem = GetIconHandle("tweet");
- HANDLE m_hMenuBookmarks = Menu_AddStatusMenuItem(&mi);
+ Menu_AddStatusMenuItem(&mi);
return 0;
}
@@ -391,7 +390,7 @@ void TwitterProto::ShowPopup(const wchar_t *text, int Error)
{
POPUPDATAT popup = {};
mir_sntprintf(popup.lptzContactName, SIZEOF(popup.lptzContactName), TranslateT("%s Protocol"), m_tszUserName);
- wcs_to_tcs(CP_UTF8, text, popup.lptzText, SIZEOF(popup.lptzText));
+ wcsncpy_s(popup.lptzText, text, _TRUNCATE);
if (Error) {
popup.iSeconds = -1;
diff --git a/protocols/Twitter/src/stdafx.cpp b/protocols/Twitter/src/stdafx.cxx
index fd705e1c02..fd705e1c02 100644
--- a/protocols/Twitter/src/stdafx.cpp
+++ b/protocols/Twitter/src/stdafx.cxx
diff --git a/protocols/Twitter/src/utility.h b/protocols/Twitter/src/utility.h
index 017fd2e9be..fec8d6b23c 100644
--- a/protocols/Twitter/src/utility.h
+++ b/protocols/Twitter/src/utility.h
@@ -92,9 +92,4 @@ inline void mbcs_to_tcs(UINT code_page, const char *mbstr, TCHAR *tstr, int tlen
MultiByteToWideChar(code_page, 0, mbstr, -1, tstr, tlen);
}
-inline void wcs_to_tcs(UINT code_page, const wchar_t *wstr, TCHAR *tstr, int tlen)
-{
- wcsncpy(tstr, wstr, tlen);
-}
-
bool save_url(HANDLE hNetlib,const std::string &url,const std::tstring &filename); \ No newline at end of file