First attempt to fix windows compile errors.

This commit is contained in:
Aleric Inglewood
2014-04-04 20:58:33 +02:00
parent a332a7fc35
commit 7d124012c2
2 changed files with 8 additions and 7 deletions

View File

@@ -91,7 +91,7 @@ bool operator==(AISyncKey const& key1, AISyncKey const& key2)
{
// Test if these keys match based on time.
if (std::abs((S32)(key1.mStartFrameCount - key2.mStartFrameCount)) > 1 &&
std::abs(key1.mFrameTimer.getStartTime() - key2.mFrameTimer.getStartTime()) >= AISyncKey::sExpirationTime)
std::abs(key1.mFrameTimer.getStartTime() - key2.mFrameTimer.getStartTime()) >= sSyncKeyExpirationTime)
{
return false;
}

View File

@@ -108,12 +108,13 @@ enum synckeytype_t
typedef U32 synceventset_t; // A mask where each bit represents a ready state.
static F32 const sSyncKeyExpirationTime = 0.25; // In seconds.
class LL_COMMON_API AISyncKey
{
private:
LLFrameTimer mFrameTimer; // This timer is started at the moment the sync key is created.
U32 mStartFrameCount; // The frame count at which the timer was started.
static F32 const sExpirationTime = 0.1; // In seconds.
public:
// Constructor.
@@ -125,7 +126,7 @@ class LL_COMMON_API AISyncKey
}
else
{
mFrameTimer.reset(sExpirationTime);
mFrameTimer.reset(sSyncKeyExpirationTime);
}
}
@@ -135,14 +136,14 @@ class LL_COMMON_API AISyncKey
// Return true if this key expired.
bool expired(void) const
{
// The key has expired when sExpirationTime seconds have elapsed AND at least two frames have passed.
// The key has expired when sSyncKeyExpirationTime seconds have elapsed AND at least two frames have passed.
return mFrameTimer.getFrameCount() > mStartFrameCount + 1 && mFrameTimer.hasExpired();
}
// Returns true if this object and key would not compare equal based on time because this object is too old.
bool is_older_than(AISyncKey const& key) const
{
return key.mStartFrameCount > mStartFrameCount + 1 && key.mFrameTimer.getStartTime() > mFrameTimer.getStartTime() + sExpirationTime;
return key.mStartFrameCount > mStartFrameCount + 1 && key.mFrameTimer.getStartTime() > mFrameTimer.getStartTime() + sSyncKeyExpirationTime;
}
// Return the creation time of this key (in number of seconds since application start).
@@ -228,8 +229,8 @@ class LL_COMMON_API AISyncServer
#endif
private:
friend void intrusive_ptr_add_ref(AISyncServer* server);
friend void intrusive_ptr_release(AISyncServer* server);
friend LL_COMMON_API void intrusive_ptr_add_ref(AISyncServer* server);
friend LL_COMMON_API void intrusive_ptr_release(AISyncServer* server);
};
class LL_COMMON_API AISyncServerMap : public LLSingleton<AISyncServerMap>