1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +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

@ -439,9 +439,9 @@ void plArmatureModBase::AdjustLOD()
hsPoint3 delta = ourPos - camPos;
float distanceSquared = delta.MagnitudeSquared();
if (distanceSquared < fLODDistance * fLODDistance)
SetLOD(max(0, fMinLOD));
SetLOD(std::max(0, fMinLOD));
else if (distanceSquared < fLODDistance * fLODDistance * 4.0)
SetLOD(max(1, fMinLOD));
SetLOD(std::max(1, fMinLOD));
else
SetLOD(2);
}

View File

@ -106,7 +106,7 @@ void plArmatureBehavior::DumpDebug(int &x, int &y, int lineHeight, plDebugText &
float strength = GetStrength();
const char *onOff = strength > 0 ? "on" : "off";
char blendBar[] = "||||||||||";
int bars = (int)min(10 * strength, 10);
int bars = std::min(static_cast<int>(10 * strength), 10);
blendBar[bars] = '\0';
plString details;

View File

@ -179,7 +179,7 @@ public:
float oldSpeed = fabs(fSwimBrain->fSwimStrategy->GetTurnStrength());
float thisInc = elapsed * incPerSec;
float newSpeed = min(oldSpeed + thisInc, maxTurnSpeed);
float newSpeed = std::min(oldSpeed + thisInc, maxTurnSpeed);
fSwimBrain->fSwimStrategy->SetTurnStrength(newSpeed * fAvMod->GetKeyTurnStrength() + fAvMod->GetAnalogTurnStrength());
// the turn is actually applied during PhysicsUpdate
}

View File

@ -577,7 +577,7 @@ bool plWalkingStrategy::EnableControlledFlight(bool status)
++fControlledFlight;
}
else
fControlledFlight = max(--fControlledFlight, 0);
fControlledFlight = std::max(--fControlledFlight, 0);
return status;
}

View File

@ -713,7 +713,7 @@ bool plSecureStream::GetSecureEncryptionKey(const plFileName& filename, uint32_t
file.Close();
unsigned memSize = min(bytesToRead, bytesRead);
unsigned memSize = std::min(bytesToRead, bytesRead);
memcpy(key, buffer, memSize);
free(buffer);
@ -721,7 +721,7 @@ bool plSecureStream::GetSecureEncryptionKey(const plFileName& filename, uint32_t
}
// file doesn't exist, use default key
unsigned memSize = min(length, arrsize(plSecureStream::kDefaultKey));
unsigned memSize = std::min(length, arrsize(plSecureStream::kDefaultKey));
memSize *= sizeof(uint32_t);
memcpy(key, plSecureStream::kDefaultKey, memSize);

View File

@ -2701,7 +2701,7 @@ bool LoginRequestTrans::Recv (
m_accountFlags = reply.accountFlags;
m_billingType = reply.billingType;
unsigned memSize = min(arrsize(s_encryptionKey), arrsize(reply.encryptionKey));
unsigned memSize = std::min(arrsize(s_encryptionKey), arrsize(reply.encryptionKey));
memSize *= sizeof(uint32_t);
memcpy(s_encryptionKey, reply.encryptionKey, memSize);
}
@ -5130,7 +5130,7 @@ void NetCliAuthStartConnect (
) {
// TEMP: Only connect to one auth server until we fill out this module
// to choose the "best" auth connection.
authAddrCount = min(authAddrCount, 1);
authAddrCount = std::min(authAddrCount, 1u);
for (unsigned i = 0; i < authAddrCount; ++i) {
// Do we need to lookup the address?
@ -5273,7 +5273,7 @@ void NetCliAuthGetEncryptionKey (
uint32_t key[],
unsigned size
) {
unsigned memSize = min(arrsize(s_encryptionKey), size);
unsigned memSize = std::min(arrsize(s_encryptionKey), size);
memSize *= sizeof(uint32_t);
memcpy(key, s_encryptionKey, memSize);
}

View File

@ -1350,7 +1350,7 @@ void NetCliFileStartConnect (
) {
// TEMP: Only connect to one file server until we fill out this module
// to choose the "best" file connection.
fileAddrCount = min(fileAddrCount, 1);
fileAddrCount = std::min(fileAddrCount, 1u);
s_connectBuildId = isPatcher ? kFileSrvBuildId : plProduct::BuildId();
s_serverType = kSrvTypeNone;
@ -1387,7 +1387,7 @@ void NetCliFileStartConnectAsServer (
) {
// TEMP: Only connect to one file server until we fill out this module
// to choose the "best" file connection.
fileAddrCount = min(fileAddrCount, 1);
fileAddrCount = std::min(fileAddrCount, 1u);
s_connectBuildId = serverBuildId;
s_serverType = serverType;

View File

@ -1062,7 +1062,7 @@ void NetCliGateKeeperStartConnect (
const char* gateKeeperAddrList[],
uint32_t gateKeeperAddrCount
) {
gateKeeperAddrCount = min(gateKeeperAddrCount, 1);
gateKeeperAddrCount = std::min(gateKeeperAddrCount, 1u);
for (unsigned i = 0; i < gateKeeperAddrCount; ++i) {
// Do we need to lookup the address?

View File

@ -79,7 +79,7 @@ int plBufferedSocketWriter::Flush(plTcpSocket & sck) // this is where things
{
int ans = kSuccessNoDataSent;
int writeSize = MIN(FastAmountBuffered(),fBytesPerFlush);
int writeSize = std::min(FastAmountBuffered(), fBytesPerFlush);
if(writeSize > 0)
{