1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Complete the previous commit by also removing the inline min and max

functions defined in HeadSpin.h without breaking (3ds)Max compilation
This commit is contained in:
2014-07-22 22:22:22 -07:00
parent e36220cca5
commit 72f18e8ebb
20 changed files with 49 additions and 86 deletions

View File

@ -205,7 +205,7 @@ static unsigned MaxMsgId (const T msgs[], unsigned count) {
for (unsigned i = 0; i < count; i++) {
ASSERT(msgs[i].msg.count);
maxMsgId = max(msgs[i].msg.messageId, maxMsgId);
maxMsgId = std::max(msgs[i].msg.messageId, maxMsgId);
}
return maxMsgId;
}
@ -248,7 +248,7 @@ static void AddRecvMsgs_CS (
*dst = *src;
const uint32_t bytes = ValidateMsg(dst->msg);
channel->m_largestRecv = max(channel->m_largestRecv, bytes);
channel->m_largestRecv = std::max(channel->m_largestRecv, bytes);
}
}

View File

@ -244,7 +244,7 @@ static void AddToSendBuffer (
// calculate the space left in the output buffer and use it
// to determine the maximum number of bytes that will fit
unsigned const left = &cli->sendBuffer[arrsize(cli->sendBuffer)] - cli->sendCurr;
unsigned const copy = min(bytes, left);
unsigned const copy = std::min(bytes, left);
// copy the data into the buffer
for (unsigned i = 0; i < copy; ++i)
@ -678,7 +678,7 @@ static void ClientConnect (NetCli * cli) {
memset(&cli->seed, 0, sizeof(cli->seed));
unsigned bytes;
unsigned char * data = clientSeed.GetData_LE(&bytes);
memcpy(cli->seed, data, min(bytes, sizeof(cli->seed)));
memcpy(cli->seed, data, std::min(bytes, sizeof(cli->seed)));
delete [] data;
}
@ -740,7 +740,7 @@ static bool ServerRecvConnect (
memset(&clientSeed, 0, sizeof(clientSeed));
unsigned bytes;
unsigned char * data = clientSeedValue.GetData_LE(&bytes);
memcpy(clientSeed, data, min(bytes, sizeof(clientSeed)));
memcpy(clientSeed, data, std::min(bytes, sizeof(clientSeed)));
delete [] data;
}
@ -964,7 +964,7 @@ static void SetConnSeed (
const uint8_t seedData[]
) {
if (seedBytes)
memcpy(cli->seed, seedData, min(sizeof(cli->seed), seedBytes));
memcpy(cli->seed, seedData, std::min(sizeof(cli->seed), seedBytes));
else
CryptCreateRandomSeed(sizeof(cli->seed), cli->seed);
}