mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 18:59:09 +00:00
Fix/remove some incorrect uses of the arrsize macro
This commit is contained in:
@ -239,6 +239,9 @@ inline double hsSwapEndianDouble(double dvalue)
|
||||
*
|
||||
***/
|
||||
#define arrsize(a) (sizeof(a) / sizeof((a)[0]))
|
||||
/* TODO: Use this safer version when MSVC finally supports constexpr */
|
||||
//template <typename _T, size_t _Sz>
|
||||
//constexpr size_t arrsize(_T (&)[_Sz]) { return _Sz; }
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -102,7 +102,9 @@ static void LookupProcess (Lookup * lookup, unsigned error) {
|
||||
in_addr const * const * const inAddr = (in_addr **) host.h_addr_list;
|
||||
|
||||
// allocate a buffer large enough to hold all the addresses
|
||||
size_t count = arrsize(inAddr);
|
||||
size_t count = 0;
|
||||
while (inAddr[count])
|
||||
++count;
|
||||
plNetAddress* addrs = new plNetAddress[count];
|
||||
|
||||
// fill in address data
|
||||
|
@ -561,20 +561,6 @@ static void INetAuthFileListRequestCallback (
|
||||
msg->Send();
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
static void INetCliAuthFileRequestCallback (
|
||||
ENetError result,
|
||||
void * param,
|
||||
const wchar_t filename[],
|
||||
hsStream * writer
|
||||
) {
|
||||
plNetCommFileDownloadMsg * msg = new plNetCommFileDownloadMsg;
|
||||
msg->result = result;
|
||||
msg->writer = writer;
|
||||
StrCopy(msg->filename, filename, arrsize(filename));
|
||||
msg->Send();
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
static void INetCliGameJoinAgeRequestCallback (
|
||||
ENetError result,
|
||||
|
Reference in New Issue
Block a user