summaryrefslogtreecommitdiff
path: root/protocols/Twitter
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-08-28 16:22:41 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-08-28 16:22:41 +0000
commitc370af60855db957c5b200914bf0bde743845528 (patch)
tree0bd2ef127097c9e937c2650e8b202c3f09453323 /protocols/Twitter
parent7f082bd5d4865c30b313661b7a02f048b4b137be (diff)
mir_sntprintf / mir_snprintf: obsoleted second parameter removed wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@15064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter')
-rw-r--r--protocols/Twitter/src/proto.cpp12
-rw-r--r--protocols/Twitter/src/ui.cpp6
2 files changed, 9 insertions, 9 deletions
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index 3891325d47..88f3be83c5 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -45,7 +45,7 @@ TwitterProto::TwitterProto(const char *proto_name, const TCHAR *username) :
// Initialize hotkeys
char text[512];
- mir_snprintf(text, _countof(text), "%s/Tweet", m_szModuleName);
+ mir_snprintf(text, "%s/Tweet", m_szModuleName);
HOTKEYDESC hkd = { sizeof(hkd) };
hkd.pszName = text;
@@ -324,7 +324,7 @@ int TwitterProto::OnModulesLoaded(WPARAM, LPARAM)
// Create avatar network connection (TODO: probably remove this)
char module[512];
- mir_snprintf(module, _countof(module), "%sAv", m_szModuleName);
+ mir_snprintf(module, "%sAv", m_szModuleName);
nlu.szSettingsModule = module;
mir_sntprintf(descr, TranslateT("%s avatar connection"), m_tszUserName);
nlu.ptszDescriptiveName = descr;
@@ -380,7 +380,7 @@ int TwitterProto::ShowPinDialog()
void TwitterProto::ShowPopup(const wchar_t *text, int Error)
{
POPUPDATAT popup = {};
- mir_sntprintf(popup.lptzContactName, _countof(popup.lptzContactName), TranslateT("%s Protocol"), m_tszUserName);
+ mir_sntprintf(popup.lptzContactName, TranslateT("%s Protocol"), m_tszUserName);
wcsncpy_s(popup.lptzText, text, _TRUNCATE);
if (Error) {
@@ -398,7 +398,7 @@ void TwitterProto::ShowPopup(const wchar_t *text, int Error)
void TwitterProto::ShowPopup(const char *text, int Error)
{
POPUPDATAT popup = {};
- mir_sntprintf(popup.lptzContactName, _countof(popup.lptzContactName), TranslateT("%s Protocol"), m_tszUserName);
+ mir_sntprintf(popup.lptzContactName, TranslateT("%s Protocol"), m_tszUserName);
mbcs_to_tcs(CP_UTF8, text, popup.lptzText, _countof(popup.lptzText));
if (Error) {
popup.iSeconds = -1;
@@ -422,7 +422,7 @@ void TwitterProto::SendTweetWorker(void *p)
char *text = static_cast<char*>(p);
if (mir_strlen(mir_utf8decodeA(text)) > 140) { // looks like the chat max outgoing msg thing doesn't work, so i'll do it here.
TCHAR errorPopup[280];
- mir_sntprintf(errorPopup, _countof(errorPopup), TranslateT("Don't be crazy! Everyone knows the max tweet size is 140, and you're trying to fit %d chars in there?"), mir_strlen(text));
+ mir_sntprintf(errorPopup, TranslateT("Don't be crazy! Everyone knows the max tweet size is 140, and you're trying to fit %d chars in there?"), mir_strlen(text));
ShowPopup(errorPopup, 1);
return;
}
@@ -455,7 +455,7 @@ void TwitterProto::UpdateSettings()
std::tstring TwitterProto::GetAvatarFolder()
{
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _countof(path), _T("%s\\%s"), VARST(_T("%miranda_avatarcache%")), m_tszUserName);
+ mir_sntprintf(path, _T("%s\\%s"), VARST(_T("%miranda_avatarcache%")), m_tszUserName);
return path;
}
diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp
index ae8dd27cfc..fd82475a54 100644
--- a/protocols/Twitter/src/ui.cpp
+++ b/protocols/Twitter/src/ui.cpp
@@ -113,7 +113,7 @@ INT_PTR CALLBACK tweet_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
// Set window title
TCHAR title[512];
- mir_sntprintf(title, _countof(title), _T("Send Tweet for %s"), proto->m_tszUserName);
+ mir_sntprintf(title, _T("Send Tweet for %s"), proto->m_tszUserName);
SetWindowText(hwndDlg, title);
return true;
@@ -146,7 +146,7 @@ INT_PTR CALLBACK tweet_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
case WM_SETREPLY:
char foo[512];
- mir_snprintf(foo, _countof(foo), "@%s ", (char*)wParam);
+ mir_snprintf(foo, "@%s ", (char*)wParam);
size_t len = mir_strlen(foo);
SetDlgItemTextA(hwndDlg, IDC_TWEETMSG, foo);
@@ -190,7 +190,7 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
else SendDlgItemMessage(hwndDlg, IDC_BASEURL, CB_SETCURSEL, 0, 0);
char pollrate_str[32];
- mir_snprintf(pollrate_str, _countof(pollrate_str), "%d", proto->getDword(TWITTER_KEY_POLLRATE, 80));
+ mir_snprintf(pollrate_str, "%d", proto->getDword(TWITTER_KEY_POLLRATE, 80));
SetDlgItemTextA(hwndDlg, IDC_POLLRATE, pollrate_str);
CheckDlgButton(hwndDlg, IDC_TWEET_MSG, proto->getByte(TWITTER_KEY_TWEET_TO_MSG, 0) ? BST_CHECKED : BST_UNCHECKED);