diff options
author | Richard Linden <none@none> | 2013-10-24 14:37:57 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-10-24 14:37:57 -0700 |
commit | dc60a7564abf16cbf269e47cfc33ed00c6bb0870 (patch) | |
tree | d8096d7e77da9079171135e590e265a5966f6d7b /indra/llcommon | |
parent | 4264060662c1a598856622a749ea4a3216c5975c (diff) |
SH-4577 WIP Interesting: viewer crashed when clicking a offline Conversation containing a shared object
potential fix by making instance tracker allow key collisions for LLToastNotifyPanel
changed assertion macro to use original unpreprocessed source code
renamed instance tracker behavior macros to use LL prefix
added RestoreCameraPosOnLogin setting to optionally restore old camera positioning behavior
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-x | indra/llcommon/llerror.h | 8 | ||||
-rwxr-xr-x | indra/llcommon/llinstancetracker.h | 8 | ||||
-rw-r--r-- | indra/llcommon/llthreadlocalstorage.h | 2 | ||||
-rw-r--r-- | indra/llcommon/lltrace.h | 4 |
4 files changed, 12 insertions, 10 deletions
diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 046cd69543..5268cf9a4d 100755 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -72,11 +72,13 @@ const int LL_ERR_NOERR = 0; #endif // !_DEBUG -#define llassert_always(func) if (LL_UNLIKELY(!(func))) LL_ERRS() << "ASSERT (" << #func << ")" << LL_ENDL; +#define llassert_always_msg(func, msg) if (LL_UNLIKELY(!(func))) LL_ERRS() << "ASSERT (" << msg << ")" << LL_ENDL + +#define llassert_always(func) llassert_always_msg(func, #func) #ifdef SHOW_ASSERT -#define llassert(func) llassert_always(func) -#define llverify(func) llassert_always(func) +#define llassert(func) llassert_always_msg(func, #func) +#define llverify(func) llassert_always_msg(func, #func) #else #define llassert(func) #define llverify(func) do {if (func) {}} while(0) diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index 3fdb84cfd7..3107415ccf 100755 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -64,8 +64,8 @@ LL_COMMON_API void assert_main_thread(); enum EInstanceTrackerAllowKeyCollisions { - InstanceTrackerAllowKeyCollisions, - InstanceTrackerDisallowKeyCollisions + LLInstanceTrackerAllowKeyCollisions, + LLInstanceTrackerDisallowKeyCollisions }; /// This mix-in class adds support for tracking all instances of the specified class parameter T @@ -73,7 +73,7 @@ enum EInstanceTrackerAllowKeyCollisions /// If KEY is not provided, then instances are stored in a simple set /// @NOTE: see explicit specialization below for default KEY==void case /// @NOTE: this class is not thread-safe unless used as read-only -template<typename T, typename KEY = void, EInstanceTrackerAllowKeyCollisions ALLOW_KEY_COLLISIONS = InstanceTrackerDisallowKeyCollisions> +template<typename T, typename KEY = void, EInstanceTrackerAllowKeyCollisions ALLOW_KEY_COLLISIONS = LLInstanceTrackerDisallowKeyCollisions> class LLInstanceTracker : public LLInstanceTrackerBase { typedef LLInstanceTracker<T, KEY> self_t; @@ -216,7 +216,7 @@ private: mInstanceKey = key; InstanceMap& map = getMap_(); typename InstanceMap::iterator insertion_point_it = map.lower_bound(key); - if (ALLOW_KEY_COLLISIONS == InstanceTrackerDisallowKeyCollisions + if (ALLOW_KEY_COLLISIONS == LLInstanceTrackerDisallowKeyCollisions && insertion_point_it != map.end() && insertion_point_it->first == key) { diff --git a/indra/llcommon/llthreadlocalstorage.h b/indra/llcommon/llthreadlocalstorage.h index 177e822227..ec3b52c8cb 100644 --- a/indra/llcommon/llthreadlocalstorage.h +++ b/indra/llcommon/llthreadlocalstorage.h @@ -43,7 +43,7 @@ public: } LLThreadLocalPointerBase( const LLThreadLocalPointerBase& other) - : mThreadKey(NULL) + : mThreadKey(NULL) { if (sInitialized) { diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index b499036af2..8b67dd8f44 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -69,10 +69,10 @@ protected: template<typename ACCUMULATOR> class StatType : public StatBase, - public LLInstanceTracker<StatType<ACCUMULATOR>, std::string, InstanceTrackerAllowKeyCollisions> + public LLInstanceTracker<StatType<ACCUMULATOR>, std::string, LLInstanceTrackerAllowKeyCollisions> { public: - typedef LLInstanceTracker<StatType<ACCUMULATOR>, std::string, InstanceTrackerAllowKeyCollisions> instance_tracker_t; + typedef LLInstanceTracker<StatType<ACCUMULATOR>, std::string, LLInstanceTrackerAllowKeyCollisions> instance_tracker_t; StatType(const char* name, const char* description) : instance_tracker_t(name), StatBase(name, description), |