diff options
Diffstat (limited to 'indra')
28 files changed, 183 insertions, 156 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 35d1a8b247..0e91cd3185 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -44,6 +44,7 @@ #include "llstl.h" #include "lltexglobalcolor.h" #include "llwearabledata.h" +#include "boost/bind.hpp" #if LL_MSVC diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index d86a460511..cb80313b0b 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -33,6 +33,7 @@ #include "llvisualparam.h" #include "llavatarappearancedefines.h" #include "llwearable.h" +#include "boost/bind.hpp" using namespace LLAvatarAppearanceDefines; diff --git a/indra/llcommon/llevent.h b/indra/llcommon/llevent.h index 8cd682b8bf..9d3a7a654a 100755 --- a/indra/llcommon/llevent.h +++ b/indra/llcommon/llevent.h @@ -30,7 +30,6 @@ #include "llsd.h" #include "llpointer.h" -#include "llthread.h" namespace LLOldEvents { diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index a72f16d385..79aa0c8722 100755 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -117,22 +117,22 @@ struct SortTimerByName }; TimeBlock& TimeBlock::getRootTimeBlock() - { +{ static TimeBlock root_timer("root", NULL); return root_timer; - } +} void TimeBlock::pushLog(LLSD log) - { +{ LLMutexLock lock(sLogLock); sLogQueue.push(log); - } +} void TimeBlock::setLogLock(LLMutex* lock) - { +{ sLogLock = lock; - } +} //static @@ -166,8 +166,7 @@ U64 TimeBlock::countsPerSecond() TimeBlock::TimeBlock(const char* name, TimeBlock* parent) : TraceType<TimeBlockAccumulator>(name) -{ -} +{} TimeBlockTreeNode& TimeBlock::getTreeNode() const { @@ -182,7 +181,7 @@ void TimeBlock::bootstrapTimerTree() for (LLInstanceTracker<TimeBlock>::instance_iter begin_it = LLInstanceTracker<TimeBlock>::beginInstances(), end_it = LLInstanceTracker<TimeBlock>::endInstances(), it = begin_it; it != end_it; ++it) - { + { TimeBlock& timer = *it; if (&timer == &TimeBlock::getRootTimeBlock()) continue; @@ -193,13 +192,13 @@ void TimeBlock::bootstrapTimerTree() TimeBlockAccumulator* accumulator = timer.getPrimaryAccumulator(); if (accumulator->mLastCaller) - { + { timer.setParent(accumulator->mLastCaller); accumulator->mParent = accumulator->mLastCaller; - } + } // no need to push up tree on first use, flag can be set spuriously accumulator->mMoveUpTree = false; -} + } } } @@ -217,32 +216,32 @@ void TimeBlock::incrementalUpdateTimerTree() // sort timers by time last called, so call graph makes sense TimeBlockTreeNode& tree_node = timerp->getTreeNode(); if (tree_node.mNeedsSorting) - { + { std::sort(tree_node.mChildren.begin(), tree_node.mChildren.end(), SortTimerByName()); - } + } // skip root timer if (timerp != &TimeBlock::getRootTimeBlock()) - { + { TimeBlockAccumulator* accumulator = timerp->getPrimaryAccumulator(); if (accumulator->mMoveUpTree) - { - // since ancestors have already been visited, re-parenting won't affect tree traversal - //step up tree, bringing our descendants with us - LL_DEBUGS("FastTimers") << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() << - " to child of " << timerp->getParent()->getParent()->getName() << LL_ENDL; - timerp->setParent(timerp->getParent()->getParent()); - accumulator->mParent = timerp->getParent(); - accumulator->mMoveUpTree = false; - - // don't bubble up any ancestors until descendants are done bubbling up - // as ancestors may call this timer only on certain paths, so we want to resolve - // child-most block locations before their parents - it.skipAncestors(); + { + // since ancestors have already been visited, re-parenting won't affect tree traversal + //step up tree, bringing our descendants with us + LL_DEBUGS("FastTimers") << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() << + " to child of " << timerp->getParent()->getParent()->getName() << LL_ENDL; + timerp->setParent(timerp->getParent()->getParent()); + accumulator->mParent = timerp->getParent(); + accumulator->mMoveUpTree = false; + + // don't bubble up any ancestors until descendants are done bubbling up + // as ancestors may call this timer only on certain paths, so we want to resolve + // child-most block locations before their parents + it.skipAncestors(); + } } } - } } @@ -308,12 +307,12 @@ void TimeBlock::processTimes() } std::vector<TimeBlock*>::iterator TimeBlock::beginChildren() - { +{ return getTreeNode().mChildren.begin(); - } +} std::vector<TimeBlock*>::iterator TimeBlock::endChildren() - { +{ return getTreeNode().mChildren.end(); } @@ -373,7 +372,7 @@ void TimeBlock::logStats() //static void TimeBlock::dumpCurTimes() - { +{ LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording(); @@ -462,7 +461,7 @@ void TimeBlockAccumulator::reset( const TimeBlockAccumulator* other ) mParent = other->mParent; } else -{ + { mStartTotalTimeCounter = mTotalTimeCounter; } } diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index c8e1d9cd84..f4e37d21fe 100755 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -32,9 +32,6 @@ #include <typeinfo> #include "string_table.h" -#include <boost/utility.hpp> -#include <boost/function.hpp> -#include <boost/bind.hpp> #include <boost/iterator/transform_iterator.hpp> #include <boost/iterator/indirect_iterator.hpp> diff --git a/indra/llcommon/llmutex.h b/indra/llcommon/llmutex.h index cbde4c47a9..db5b9357d9 100644 --- a/indra/llcommon/llmutex.h +++ b/indra/llcommon/llmutex.h @@ -27,13 +27,16 @@ #ifndef LL_LLMUTEX_H #define LL_LLMUTEX_H -#include "llapr.h" -#include "apr_thread_cond.h" +#include "stdtypes.h" //============================================================================ #define MUTEX_DEBUG (LL_DEBUG || LL_RELEASE_WITH_DEBUG_INFO) +struct apr_thread_mutex_t; +struct apr_pool_t; +struct apr_thread_cond_t; + class LL_COMMON_API LLMutex { public: @@ -45,18 +48,18 @@ public: LLMutex(apr_pool_t *apr_poolp = NULL); // NULL pool constructs a new pool for the mutex virtual ~LLMutex(); - void lock(); // blocks + void lock(); // blocks void unlock(); - bool isLocked(); // non-blocking, but does do a lock/unlock so not free - bool isSelfLocked(); //return true if locked in a same thread + bool isLocked(); // non-blocking, but does do a lock/unlock so not free + bool isSelfLocked(); //return true if locked in a same thread U32 lockingThread() const; //get ID of locking thread protected: - apr_thread_mutex_t *mAPRMutexp; + apr_thread_mutex_t* mAPRMutexp; mutable U32 mCount; mutable U32 mLockingThread; - apr_pool_t *mAPRPoolp; + apr_pool_t* mAPRPoolp; BOOL mIsLocalPool; #if MUTEX_DEBUG @@ -68,7 +71,7 @@ protected: class LL_COMMON_API LLCondition : public LLMutex { public: - LLCondition(apr_pool_t *apr_poolp); // Defaults to global pool, could use the thread pool as well. + LLCondition(apr_pool_t* apr_poolp); // Defaults to global pool, could use the thread pool as well. ~LLCondition(); void wait(); // blocks @@ -76,7 +79,7 @@ public: void broadcast(); protected: - apr_thread_cond_t *mAPRCondp; + apr_thread_cond_t* mAPRCondp; }; class LLMutexLock diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h index c827996db1..9a0726c338 100755 --- a/indra/llcommon/llpointer.h +++ b/indra/llcommon/llpointer.h @@ -27,6 +27,7 @@ #define LLPOINTER_H #include "llerror.h" // *TODO: consider eliminating this +#include "llmutex.h" //---------------------------------------------------------------------------- // RefCount objects should generally only be accessed by way of LLPointer<>'s @@ -213,4 +214,82 @@ private: bool mStayUnique; }; +//============================================================================ + +// see llmemory.h for LLPointer<> definition + +class LL_COMMON_API LLThreadSafeRefCount +{ +public: + static void initThreadSafeRefCount(); // creates sMutex + static void cleanupThreadSafeRefCount(); // destroys sMutex + +private: + static LLMutex* sMutex; + +protected: + virtual ~LLThreadSafeRefCount(); // use unref() + +public: + LLThreadSafeRefCount(); + LLThreadSafeRefCount(const LLThreadSafeRefCount&); + LLThreadSafeRefCount& operator=(const LLThreadSafeRefCount& ref) + { + if (sMutex) + { + sMutex->lock(); + } + mRef = 0; + if (sMutex) + { + sMutex->unlock(); + } + return *this; + } + + void ref() + { + if (sMutex) sMutex->lock(); + mRef++; + if (sMutex) sMutex->unlock(); + } + + S32 unref() + { + llassert(mRef >= 1); + if (sMutex) sMutex->lock(); + S32 res = --mRef; + if (sMutex) sMutex->unlock(); + if (0 == res) + { + delete this; + return 0; + } + return res; + } + S32 getNumRefs() const + { + return mRef; + } + +private: + S32 mRef; +}; + +/** + * intrusive pointer support for LLThreadSafeRefCount + * this allows you to use boost::intrusive_ptr with any LLThreadSafeRefCount-derived type + */ +namespace boost +{ + inline void intrusive_ptr_add_ref(LLThreadSafeRefCount* p) + { + p->ref(); + } + + inline void intrusive_ptr_release(LLThreadSafeRefCount* p) + { + p->unref(); + } +}; #endif diff --git a/indra/llcommon/llptrto.h b/indra/llcommon/llptrto.h index 7091d36f6b..4082e30de6 100755 --- a/indra/llcommon/llptrto.h +++ b/indra/llcommon/llptrto.h @@ -33,7 +33,6 @@ #include "llpointer.h" #include "llrefcount.h" // LLRefCount -#include "llthread.h" // LLThreadSafeRefCount #include <boost/type_traits/is_base_of.hpp> #include <boost/type_traits/remove_pointer.hpp> #include <boost/utility/enable_if.hpp> diff --git a/indra/llcommon/llsdparam.cpp b/indra/llcommon/llsdparam.cpp index 50815b2cc6..c1ba777543 100755 --- a/indra/llcommon/llsdparam.cpp +++ b/indra/llcommon/llsdparam.cpp @@ -30,6 +30,7 @@ // Project includes #include "llsdparam.h" #include "llsdutil.h" +#include "boost/bind.hpp" static LLInitParam::Parser::parser_read_func_map_t sReadFuncs; static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs; diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 95bbcbc816..5d805ba841 100755 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -1395,9 +1395,14 @@ public: LL_CONT << "slowest framerate for last " << int(prevSize * MEM_INFO_THROTTLE) << " seconds "; } + + S32 precision = LL_CONT.precision(); + LL_CONT << std::fixed << std::setprecision(1) << framerate << '\n' - << LLMemoryInfo() << LL_ENDL; + << LLMemoryInfo(); + LL_CONT.precision(precision); + LL_CONT << LL_ENDL; return false; } diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index e0f53fb9c4..db7ddbbfd3 100755 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -47,13 +47,13 @@ const DWORD MS_VC_EXCEPTION=0x406D1388; typedef struct tagTHREADNAME_INFO { DWORD dwType; // Must be 0x1000. - const char* szName; // Pointer to name (in user addr space). + LPCSTR szName; // Pointer to name (in user addr space). DWORD dwThreadID; // Thread ID (-1=caller thread). DWORD dwFlags; // Reserved for future use, must be zero. } THREADNAME_INFO; #pragma pack(pop) -void SetThreadName( DWORD dwThreadID, const char* threadName) +void set_thread_name( DWORD dwThreadID, const char* threadName) { THREADNAME_INFO info; info.dwType = 0x1000; @@ -63,7 +63,7 @@ void SetThreadName( DWORD dwThreadID, const char* threadName) __try { - RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(DWORD), (DWORD*)&info ); + ::RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(DWORD), (DWORD*)&info ); } __except(EXCEPTION_CONTINUE_EXECUTION) { @@ -127,7 +127,7 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap LLThread *threadp = (LLThread *)datap; #ifdef LL_WINDOWS - SetThreadName(-1, threadp->mName.c_str()); + set_thread_name(-1, threadp->mName.c_str()); #endif diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index 4a84a14a65..c2c6b8e7ac 100755 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -32,6 +32,7 @@ #include "apr_thread_cond.h" #include "boost/intrusive_ptr.hpp" #include "llmutex.h" +#include "llpointer.h" LL_COMMON_API void assert_main_thread(); @@ -148,86 +149,6 @@ void LLThread::unlockData() //============================================================================ -// see llmemory.h for LLPointer<> definition - -class LL_COMMON_API LLThreadSafeRefCount -{ -public: - static void initThreadSafeRefCount(); // creates sMutex - static void cleanupThreadSafeRefCount(); // destroys sMutex - -private: - static LLMutex* sMutex; - -protected: - virtual ~LLThreadSafeRefCount(); // use unref() - -public: - LLThreadSafeRefCount(); - LLThreadSafeRefCount(const LLThreadSafeRefCount&); - LLThreadSafeRefCount& operator=(const LLThreadSafeRefCount& ref) - { - if (sMutex) - { - sMutex->lock(); - } - mRef = 0; - if (sMutex) - { - sMutex->unlock(); - } - return *this; - } - - - - void ref() - { - if (sMutex) sMutex->lock(); - mRef++; - if (sMutex) sMutex->unlock(); - } - - S32 unref() - { - llassert(mRef >= 1); - if (sMutex) sMutex->lock(); - S32 res = --mRef; - if (sMutex) sMutex->unlock(); - if (0 == res) - { - delete this; - return 0; - } - return res; - } - S32 getNumRefs() const - { - return mRef; - } - -private: - S32 mRef; -}; - -/** - * intrusive pointer support for LLThreadSafeRefCount - * this allows you to use boost::intrusive_ptr with any LLThreadSafeRefCount-derived type - */ -namespace boost -{ - inline void intrusive_ptr_add_ref(LLThreadSafeRefCount* p) - { - p->ref(); - } - - inline void intrusive_ptr_release(LLThreadSafeRefCount* p) - { - p->unref(); - } -}; -//============================================================================ - // Simple responder for self destructing callbacks // Pure virtual class class LL_COMMON_API LLResponder : public LLThreadSafeRefCount diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 2c84b1596a..75e913a348 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -123,6 +123,7 @@ class EventStatHandle public: typedef F64 storage_t; typedef TraceType<EventAccumulator> trace_t; + typedef EventStatHandle<T> self_t; EventStatHandle(const char* name, const char* description = NULL) : trace_t(name, description) @@ -146,6 +147,7 @@ class SampleStatHandle public: typedef F64 storage_t; typedef TraceType<SampleAccumulator> trace_t; + typedef SampleStatHandle<T> self_t; SampleStatHandle(const char* name, const char* description = NULL) : trace_t(name, description) @@ -168,6 +170,7 @@ class CountStatHandle public: typedef F64 storage_t; typedef TraceType<CountAccumulator> trace_t; + typedef CountStatHandle<T> self_t; CountStatHandle(const char* name, const char* description = NULL) : trace_t(name, description) diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 2e09973ef6..51f14a5948 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -30,12 +30,12 @@ #include "stdtypes.h" #include "llpreprocessor.h" #include "llerrorlegacy.h" -#include <boost/type_traits/is_same.hpp> template<typename STORAGE_TYPE, typename UNIT_TYPE> struct LLUnit { typedef LLUnit<STORAGE_TYPE, UNIT_TYPE> self_t; + typedef STORAGE_TYPE storage_t; // value initialization @@ -176,18 +176,28 @@ std::ostream& operator <<(std::ostream& s, const LLUnitImplicit<STORAGE_TYPE, UN return s; } +template<typename S, typename T> +struct LLIsSameType +{ + static const bool value = false; +}; + +template<typename T> +struct LLIsSameType<T, T> +{ + static const bool value = true; +}; + template<typename S1, typename T1, typename S2, typename T2> LL_FORCE_INLINE void ll_convert_units(LLUnit<S1, T1> in, LLUnit<S2, T2>& out, ...) { - typedef boost::integral_constant<bool, - boost::is_same<T1, T2>::value - || !boost::is_same<T1, typename T1::base_unit_t>::value - || !boost::is_same<T2, typename T2::base_unit_t>::value> conversion_valid_t; - LL_STATIC_ASSERT(conversion_valid_t::value, "invalid conversion"); + LL_STATIC_ASSERT((LLIsSameType<T1, T2>::value + || !LLIsSameType<T1, typename T1::base_unit_t>::value + || !LLIsSameType<T2, typename T2::base_unit_t>::value), "invalid conversion"); - if (boost::is_same<T1, typename T1::base_unit_t>::value) + if (LLIsSameType<T1, typename T1::base_unit_t>::value) { - if (boost::is_same<T2, typename T2::base_unit_t>::value) + if (LLIsSameType<T2, typename T2::base_unit_t>::value) { // T1 and T2 fully reduced and equal...just copy diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 8477e62db7..655d7a381a 100755 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -26,6 +26,7 @@ #include "linden_common.h" +#include "llimageworker.h" #include "llimage.h" #include "llmath.h" @@ -37,7 +38,6 @@ #include "llimagejpeg.h" #include "llimagepng.h" #include "llimagedxt.h" -#include "llimageworker.h" #include "llmemory.h" //--------------------------------------------------------------------------- diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 504b7e4795..8ad6b49dd2 100755 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -29,7 +29,7 @@ #include "lluuid.h" #include "llstring.h" -#include "llthread.h" +#include "llpointer.h" #include "lltrace.h" const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp index c6bfa50b40..383ae00fb7 100755 --- a/indra/llimage/llimagedimensionsinfo.cpp +++ b/indra/llimage/llimagedimensionsinfo.cpp @@ -172,8 +172,8 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg() /* Make sure this is a JPEG file. */ const size_t JPEG_MAGIC_SIZE = 2; - const uint8_t jpeg_magic[JPEG_MAGIC_SIZE] = {0xFF, 0xD8}; - uint8_t signature[JPEG_MAGIC_SIZE]; + const U8 jpeg_magic[JPEG_MAGIC_SIZE] = {0xFF, 0xD8}; + U8 signature[JPEG_MAGIC_SIZE]; if (fread(signature, sizeof(signature), 1, fp) != 1) { diff --git a/indra/llimage/llimagedimensionsinfo.h b/indra/llimage/llimagedimensionsinfo.h index 382fdb2a0e..8f716c5d02 100755 --- a/indra/llimage/llimagedimensionsinfo.h +++ b/indra/llimage/llimagedimensionsinfo.h @@ -27,6 +27,8 @@ #ifndef LL_LLIMAGEDIMENSIONSINFO_H #define LL_LLIMAGEDIMENSIONSINFO_H +#include "llapr.h" + //----------------------------------------------------------------------------- // LLImageDimensionsInfo // helper class to get image dimensions WITHOUT loading image to memore diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index 5412f98ee5..65cdcd6923 100755 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -24,6 +24,7 @@ */ #include "linden_common.h" +#include "llapr.h" #include "lldir.h" #include "llimagej2c.h" #include "lltimer.h" diff --git a/indra/llimage/llimagejpeg.h b/indra/llimage/llimagejpeg.h index 7ac7f5d2e0..5b596d9fa4 100755 --- a/indra/llimage/llimagejpeg.h +++ b/indra/llimage/llimagejpeg.h @@ -31,6 +31,7 @@ #include "llimage.h" +#include "llwin32headerslean.h" extern "C" { #ifdef LL_STANDALONE # include <jpeglib.h> diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index 7bcf61e233..1c88800ffa 100755 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -41,7 +41,6 @@ #include "llbuffer.h" #include "lliopipe.h" #include "llsd.h" -#include "llthread.h" #include "llqueuedthread.h" #include "llframetimer.h" #include "llpointer.h" diff --git a/indra/llui/llflashtimer.h b/indra/llui/llflashtimer.h index c60f99a8ea..db8d49f009 100755 --- a/indra/llui/llflashtimer.h +++ b/indra/llui/llflashtimer.h @@ -28,6 +28,7 @@ #define LL_FLASHTIMER_H #include "lleventtimer.h" +#include "boost/function.hpp" class LLFlashTimer : public LLEventTimer { diff --git a/indra/llui/llrngwriter.cpp b/indra/llui/llrngwriter.cpp index 5e6840d7df..cd9fe3610e 100755 --- a/indra/llui/llrngwriter.cpp +++ b/indra/llui/llrngwriter.cpp @@ -29,6 +29,7 @@ #include "llrngwriter.h" #include "lluicolor.h" #include "lluictrlfactory.h" +#include "boost/bind.hpp" static LLInitParam::Parser::parser_read_func_map_t sReadFuncs; static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs; diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp index 2814efec47..4cbf84be73 100755 --- a/indra/llui/llxuiparser.cpp +++ b/indra/llui/llxuiparser.cpp @@ -38,6 +38,7 @@ #include <fstream> #include <boost/tokenizer.hpp> +#include <boost/bind.hpp> //#include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/classic_core.hpp> diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h index ec486d7957..d7681c54a0 100755 --- a/indra/llxml/llxmlnode.h +++ b/indra/llxml/llxmlnode.h @@ -39,7 +39,6 @@ #include "indra_constants.h" #include "llpointer.h" -#include "llthread.h" // LLThreadSafeRefCount #include "llstring.h" #include "llstringtable.h" #include "llfile.h" diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 68e9ebeff3..e7dd605044 100755 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -271,7 +271,7 @@ private: LLWatchdogTimeout* mMainloopTimeout; // For performance and metric gathering - LLThread* mFastTimerLogThread; + class LLThread* mFastTimerLogThread; // for tracking viewer<->region circuit death bool mAgentRegionLastAlive; diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h index 28765fbfb1..c01d318f56 100755 --- a/indra/newview/llsecapi.h +++ b/indra/newview/llsecapi.h @@ -28,9 +28,10 @@ #ifndef LLSECAPI_H #define LLSECAPI_H #include <vector> +#include "llwin32headerslean.h" #include <openssl/x509.h> #include <ostream> -#include "llthread.h" +#include "llpointer.h" #ifdef LL_WINDOWS #pragma warning(disable:4250) diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 3b7079ae4b..ee1a73de9f 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -48,6 +48,8 @@ struct SimMeasurementSampler : public LLInstanceTracker<SimMeasurementSampler, E template<typename T = F64> struct SimMeasurement : public LLTrace::SampleStatHandle<T>, public SimMeasurementSampler { + typedef SimMeasurement<T> self_t; + SimMeasurement(const char* name, const char* description, ESimStatID stat_id) : LLTrace::SampleStatHandle<T>(name, description), SimMeasurementSampler(stat_id) @@ -55,17 +57,18 @@ struct SimMeasurement : public LLTrace::SampleStatHandle<T>, public SimMeasureme using SimMeasurementSampler::getInstance; + //friend void sample(self_t& measurement, T value) + //{ + // LLTrace::sample(static_cast<LLTrace::SampleStatHandle<T>& >(measurement), value); + //} + /*virtual*/ void sample(F64 value) { - LLTrace::sample(*this, value); + LLTrace::sample(static_cast<LLTrace::SampleStatHandle<T>& >(*this), value); + //LLStatViewer::sample(*this, value); } -}; -template<typename T, typename VALUE_T> -void sample(SimMeasurement<T>& measurement, VALUE_T value) -{ - LLTrace::sample(measurement, value); -} +}; extern LLTrace::CountStatHandle<> FPS, PACKETS_IN, |