diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-03 00:29:49 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-03 00:29:49 +0300 |
commit | 5e99d6ea054f7ad4f1bbb5565803656e2d02b479 (patch) | |
tree | 3a1b8aa0c75f94608f4c9c5ae14d65a7bd294058 /protocols | |
parent | 10bbf1e71ad16fc4e0d274417c01ecaa4e3973f8 (diff) |
stronger typization
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/main.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/fam_01service.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/userinfotab.cpp | 5 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 5 | ||||
-rw-r--r-- | protocols/WhatsApp/src/main.cpp | 2 |
6 files changed, 10 insertions, 8 deletions
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp index dd4a7b11c6..0823e659e5 100644 --- a/protocols/FacebookRM/src/main.cpp +++ b/protocols/FacebookRM/src/main.cpp @@ -104,7 +104,7 @@ extern "C" int __declspec(dllexport) Load(void) InitContactMenus();
// Init native User-Agent
- WORD v[4];
+ MFileVersion v;
Miranda_GetFileVersion(&v);
std::stringstream agent;
agent << "Miranda NG/" << v[0] << "." << v[1] << "." << v[2];
diff --git a/protocols/IcqOscarJ/src/fam_01service.cpp b/protocols/IcqOscarJ/src/fam_01service.cpp index 161d9b10af..a416b1b97a 100644 --- a/protocols/IcqOscarJ/src/fam_01service.cpp +++ b/protocols/IcqOscarJ/src/fam_01service.cpp @@ -675,7 +675,7 @@ void CIcqProto::setUserInfo() packDWord(&packet, 0x4D697261); // Miranda Signature
packDWord(&packet, 0x6E64614E);
- WORD v[4];
+ MFileVersion v;
Miranda_GetFileVersion(&v);
packWord(&packet, v[0]);
packWord(&packet, v[1]);
diff --git a/protocols/IcqOscarJ/src/userinfotab.cpp b/protocols/IcqOscarJ/src/userinfotab.cpp index 2f35f7e007..af52cbaef5 100644 --- a/protocols/IcqOscarJ/src/userinfotab.cpp +++ b/protocols/IcqOscarJ/src/userinfotab.cpp @@ -232,9 +232,10 @@ static INT_PTR CALLBACK IcqDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SetValue(ppro, hwndDlg, IDC_STATUS, hContact, szProto, "Status", SVS_STATUSID);
}
else {
- char str[MAX_PATH];
- WORD v[4];
+ MFileVersion v;
Miranda_GetFileVersion(&v);
+
+ char str[MAX_PATH];
mir_snprintf(str, "Miranda NG %d.%d.%d.%d (ICQ %s)", v[0], v[1], v[2], v[3], __VERSION_STRING_DOTS);
SetValue(ppro, hwndDlg, IDC_PORT, hContact, (char*)DBVT_WORD, (char*)ppro->wListenPort, SVS_ZEROISUNSPEC);
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 35d92e6f17..ce22a54dd1 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -192,7 +192,7 @@ extern "C" int __declspec(dllexport) Load() return 1;
}
- WORD v[4];
+ MFileVersion v;
Miranda_GetFileVersion(&v);
mir_snwprintf(szCoreVersion, L"%d.%d.%d.%d", v[0], v[1], v[2], v[3]);
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 3b77a98b25..a63493bfc3 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -28,11 +28,12 @@ LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPA CMStringA MraGetSelfVersionString()
{
- WORD v[4];
LPSTR lpszSecIM = ServiceExists("SecureIM/IsContactSecured") ? " + SecureIM" : "";
- CMStringA szSelfVersion;
+ MFileVersion v;
Miranda_GetFileVersion(&v);
+
+ CMStringA szSelfVersion;
szSelfVersion.Format("Miranda NG %lu.%lu.%lu.%lu Unicode (MRA v%lu.%lu.%lu.%lu)%s, version: %lu.%lu",
v[0], v[1], v[2], v[3], __FILEVERSION_STRING, lpszSecIM, PROTO_VERSION_MAJOR, PROTO_VERSION_MINOR);
return szSelfVersion;
diff --git a/protocols/WhatsApp/src/main.cpp b/protocols/WhatsApp/src/main.cpp index 54da26d108..84d29e07be 100644 --- a/protocols/WhatsApp/src/main.cpp +++ b/protocols/WhatsApp/src/main.cpp @@ -80,7 +80,7 @@ extern "C" int __declspec(dllexport) Load(void) //InitContactMenus();
// Init native User-Agent
- WORD v[4];
+ MFileVersion v;
Miranda_GetFileVersion(&v);
WAConnection::globalInit();
|