Fix initialization list order (compiler warnings)

This commit is contained in:
Aleric Inglewood
2013-05-06 03:26:22 +02:00
parent 1d629438c0
commit 84e7f15dc5
4 changed files with 10 additions and 7 deletions

View File

@@ -67,7 +67,7 @@ class LL_COMMON_API AIFrameTimer
mutable Signal* mCallback; // Pointer to callback struct, or NULL when the object wasn't added to sTimerList yet.
public:
AIRunningFrameTimer(F64 expiration, AIFrameTimer* timer) : mExpire(LLFrameTimer::getElapsedSeconds() + expiration), mCallback(NULL), mTimer(timer) { }
AIRunningFrameTimer(F64 expiration, AIFrameTimer* timer) : mExpire(LLFrameTimer::getElapsedSeconds() + expiration), mTimer(timer), mCallback(NULL) { }
~AIRunningFrameTimer() { delete mCallback; }
// This function is called after the final object was added to sTimerList (where it is initialized in-place).
@@ -89,7 +89,7 @@ class LL_COMMON_API AIFrameTimer
#if LL_DEBUG
// May not copy this object after it was initialized.
AIRunningFrameTimer(AIRunningFrameTimer const& running_frame_timer) :
mExpire(running_frame_timer.mExpire), mCallback(running_frame_timer.mCallback), mTimer(running_frame_timer.mTimer)
mExpire(running_frame_timer.mExpire), mTimer(running_frame_timer.mTimer), mCallback(running_frame_timer.mCallback)
{ llassert(!mCallback); }
#endif
};

View File

@@ -403,8 +403,8 @@ void LLCondition::broadcast()
//============================================================================
LLMutexBase::LLMutexBase() :
mLockingThread(AIThreadID::sNone),
mCount(0)
mCount(0),
mLockingThread(AIThreadID::sNone)
{
}

View File

@@ -1270,7 +1270,7 @@ bool BufferedCurlEasyRequest::sShuttingDown = false;
AIAverage BufferedCurlEasyRequest::sHTTPBandwidth(25);
BufferedCurlEasyRequest::BufferedCurlEasyRequest() :
mRequestTransferedBytes(0), mTotalRawBytes(0), mBufferEventsTarget(NULL), mStatus(HTTP_INTERNAL_ERROR_OTHER), mQueueIfTooMuchBandwidthUsage(false)
mRequestTransferedBytes(0), mTotalRawBytes(0), mStatus(HTTP_INTERNAL_ERROR_OTHER), mBufferEventsTarget(NULL), mQueueIfTooMuchBandwidthUsage(false)
{
AICurlInterface::Stats::BufferedCurlEasyRequest_count++;
}

View File

@@ -888,7 +888,7 @@ AICurlThread* AICurlThread::sInstance = NULL;
AICurlThread::AICurlThread(void) : LLThread("AICurlThread"),
mWakeUpFd_in(CURL_SOCKET_BAD),
mWakeUpFd(CURL_SOCKET_BAD),
mZeroTimeout(0), mRunning(true), mWakeUpFlag(false)
mZeroTimeout(0), mWakeUpFlag(false), mRunning(true)
{
create_wakeup_fds();
sInstance = this;
@@ -1724,7 +1724,10 @@ void MultiHandle::add_easy_request(AICurlEasyRequest const& easy_request)
} // Release the lock on easy_request.
if (!throttled)
{ // ... to here.
std::pair<addedEasyRequests_type::iterator, bool> res = mAddedEasyRequests.insert(easy_request);
#ifdef SHOW_ASSERT
std::pair<addedEasyRequests_type::iterator, bool> res =
#endif
mAddedEasyRequests.insert(easy_request);
llassert(res.second); // May not have been added before.
sTotalAdded++;
llassert(sTotalAdded == mAddedEasyRequests.size());