From ca5001026a94f702c4012c5e8d2093ad3f51c1fa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 21 Apr 2018 12:33:31 +0300 Subject: code cleaning: - in conformance to C++'11 rules, we don't declare a method as virtual if it's declared as override; - cause this code isn't visible in Pascal anymore, there's no need to use __cdecl calling convention for virtual methods; - since PROTO_INTERFACE is a regular C++ class, there's no need to use old style service declarations for virtual methods like OnModulesLoaded / OnShutdown --- protocols/IcqOscarJ/src/icq_packet.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/IcqOscarJ/src/icq_packet.cpp') diff --git a/protocols/IcqOscarJ/src/icq_packet.cpp b/protocols/IcqOscarJ/src/icq_packet.cpp index 22aac5fd62..313562af13 100644 --- a/protocols/IcqOscarJ/src/icq_packet.cpp +++ b/protocols/IcqOscarJ/src/icq_packet.cpp @@ -443,8 +443,8 @@ void packLETLVLNTS(PBYTE *buf, size_t *bufpos, const char *str, WORD wType) size_t len = mir_strlen(str) + 1; *(PWORD)(*buf + *bufpos) = wType; - *(PWORD)(*buf + *bufpos + 2) = DWORD(len + 2); - *(PWORD)(*buf + *bufpos + 4) = DWORD(len); + *(PWORD)(*buf + *bufpos + 2) = WORD(len + 2); + *(PWORD)(*buf + *bufpos + 4) = WORD(len); memcpy(*buf + *bufpos + 6, str, len); *bufpos += len + 6; } @@ -469,9 +469,9 @@ void ppackLETLVWordLNTS(PBYTE *buf, size_t *buflen, WORD w, const char *str, WOR *buf = (PBYTE)SAFE_REALLOC(*buf, 8 + *buflen + len); *(PWORD)(*buf + *buflen) = wType; - *(PWORD)(*buf + *buflen + 2) = DWORD(len + 4); + *(PWORD)(*buf + *buflen + 2) = WORD(len + 4); *(PWORD)(*buf + *buflen + 4) = w; - *(PWORD)(*buf + *buflen + 6) = DWORD(len); + *(PWORD)(*buf + *buflen + 6) = WORD(len); memcpy(*buf + *buflen + 8, str, len); *buflen += len + 8; } @@ -483,8 +483,8 @@ void ppackLETLVLNTSByte(PBYTE *buf, size_t *buflen, const char *str, BYTE b, WOR *buf = (PBYTE)SAFE_REALLOC(*buf, 7 + *buflen + len); *(PWORD)(*buf + *buflen) = wType; - *(PWORD)(*buf + *buflen + 2) = DWORD(len + 3); - *(PWORD)(*buf + *buflen + 4) = DWORD(len); + *(PWORD)(*buf + *buflen + 2) = WORD(len + 3); + *(PWORD)(*buf + *buflen + 4) = WORD(len); memcpy(*buf + *buflen + 6, str, len); *(*buf + *buflen + 6 + len) = b; *buflen += len + 7; -- cgit v1.2.3