diff options
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llcursortypes.cpp | 6 | ||||
-rw-r--r-- | indra/llcommon/llcursortypes.h | 6 | ||||
-rw-r--r-- | indra/llcommon/llfasttimer.h | 14 | ||||
-rw-r--r-- | indra/llcommon/llpreprocessor.h | 2 | ||||
-rw-r--r-- | indra/llcommon/llsafehandle.h | 1 | ||||
-rw-r--r-- | indra/llcommon/llsecondlifeurls.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/llstringtable.cpp | 17 | ||||
-rw-r--r-- | indra/llcommon/llstringtable.h | 18 | ||||
-rw-r--r-- | indra/llcommon/llversionviewer.h | 2 |
9 files changed, 37 insertions, 31 deletions
diff --git a/indra/llcommon/llcursortypes.cpp b/indra/llcommon/llcursortypes.cpp index 7444115aa1..23ede97af3 100644 --- a/indra/llcommon/llcursortypes.cpp +++ b/indra/llcommon/llcursortypes.cpp @@ -30,6 +30,8 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + #include "llcursortypes.h" ECursorType getCursorFromString(const std::string& cursor_string) @@ -66,10 +68,6 @@ ECursorType getCursorFromString(const std::string& cursor_string) cursor_string_table["UI_CURSOR_TOOLPAN"] = UI_CURSOR_TOOLPAN; cursor_string_table["UI_CURSOR_TOOLZOOMIN"] = UI_CURSOR_TOOLZOOMIN; cursor_string_table["UI_CURSOR_TOOLPICKOBJECT3"] = UI_CURSOR_TOOLPICKOBJECT3; - cursor_string_table["UI_CURSOR_TOOLSIT"] = UI_CURSOR_TOOLSIT; - cursor_string_table["UI_CURSOR_TOOLBUY"] = UI_CURSOR_TOOLBUY; - cursor_string_table["UI_CURSOR_TOOLPAY"] = UI_CURSOR_TOOLPAY; - cursor_string_table["UI_CURSOR_TOOLOPEN"] = UI_CURSOR_TOOLOPEN; cursor_string_table["UI_CURSOR_TOOLPLAY"] = UI_CURSOR_TOOLPLAY; cursor_string_table["UI_CURSOR_TOOLPAUSE"] = UI_CURSOR_TOOLPAUSE; cursor_string_table["UI_CURSOR_TOOLMEDIAOPEN"] = UI_CURSOR_TOOLMEDIAOPEN; diff --git a/indra/llcommon/llcursortypes.h b/indra/llcommon/llcursortypes.h index 836ecc3c04..a1b8178bfe 100644 --- a/indra/llcommon/llcursortypes.h +++ b/indra/llcommon/llcursortypes.h @@ -33,8 +33,6 @@ #ifndef LL_LLCURSORTYPES_H #define LL_LLCURSORTYPES_H -#include "linden_common.h" - // If you add types here, add them in LLCursor::getCursorFromString enum ECursorType { UI_CURSOR_ARROW, @@ -66,10 +64,6 @@ enum ECursorType { UI_CURSOR_TOOLPAN, UI_CURSOR_TOOLZOOMIN, UI_CURSOR_TOOLPICKOBJECT3, - UI_CURSOR_TOOLSIT, - UI_CURSOR_TOOLBUY, - UI_CURSOR_TOOLPAY, - UI_CURSOR_TOOLOPEN, UI_CURSOR_TOOLPLAY, UI_CURSOR_TOOLPAUSE, UI_CURSOR_TOOLMEDIAOPEN, diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 6ea9762546..aef50ff8f9 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -114,8 +114,9 @@ public: // recursive call to gather total time from children
static void accumulateTimings();
- // called once per frame by LLFastTimer
- static void processFrame();
+ // updates cumulative times and hierarchy,
+ // can be called multiple times in a frame, at any point
+ static void processTimes();
static void buildHierarchy();
static void resetFrame();
@@ -178,8 +179,9 @@ public: {
#if FAST_TIMER_ON
NamedTimer::FrameState* frame_state = mFrameState;
- frame_state->mLastStartTime = get_cpu_clock_count();
- mStartSelfTime = frame_state->mLastStartTime;
+ U64 cur_time = get_cpu_clock_count();
+ frame_state->mLastStartTime = cur_time;
+ mStartSelfTime = cur_time;
frame_state->mActiveCount++;
frame_state->mCalls++;
@@ -215,6 +217,10 @@ public: // call this once a frame to reset timers
static void nextFrame();
+ // dumps current cumulative frame stats to log
+ // call nextFrame() to reset timers
+ static void dumpCurTimes();
+
// call this to reset timer hierarchy, averages, etc.
static void reset();
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index f853e31002..48baa50edb 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -106,7 +106,9 @@ #if defined(LL_WINDOWS)
#define BOOST_REGEX_NO_LIB 1
#define CURL_STATICLIB 1
+#ifndef XML_STATIC
#define XML_STATIC
+#endif
#endif // LL_WINDOWS
diff --git a/indra/llcommon/llsafehandle.h b/indra/llcommon/llsafehandle.h index 1f7c682fd1..5862f1a341 100644 --- a/indra/llcommon/llsafehandle.h +++ b/indra/llcommon/llsafehandle.h @@ -77,6 +77,7 @@ public: Type* operator->() { return nonNull(mPointer); } Type* get() const { return mPointer; } + void clear() { assign(NULL); } // we disallow these operations as they expose our null objects to direct manipulation // and bypass the reference counting semantics //const Type& operator*() const { return *nonNull(mPointer); } diff --git a/indra/llcommon/llsecondlifeurls.cpp b/indra/llcommon/llsecondlifeurls.cpp index 6323d9d36b..9e67872ffd 100644 --- a/indra/llcommon/llsecondlifeurls.cpp +++ b/indra/llcommon/llsecondlifeurls.cpp @@ -34,7 +34,7 @@ #include "llsecondlifeurls.h" /* const std::string CREATE_ACCOUNT_URL ( - "http://secondlife.com/registration/"); + "http://join.secondlife.com/"); const std::string MANAGE_ACCOUNT ( "http://secondlife.com/account/"); // *TODO: NOT USED diff --git a/indra/llcommon/llstringtable.cpp b/indra/llcommon/llstringtable.cpp index 27f9036b8b..2f3a994d8f 100644 --- a/indra/llcommon/llstringtable.cpp +++ b/indra/llcommon/llstringtable.cpp @@ -38,6 +38,23 @@ LLStringTable gStringTable(32768); +LLStringTableEntry::LLStringTableEntry(const char *str) +: mString(NULL), mCount(1) +{ + // Copy string + U32 length = (U32)strlen(str) + 1; /*Flawfinder: ignore*/ + length = llmin(length, MAX_STRINGS_LENGTH); + mString = new char[length]; + strncpy(mString, str, length); /*Flawfinder: ignore*/ + mString[length - 1] = 0; +} + +LLStringTableEntry::~LLStringTableEntry() +{ + delete [] mString; + mCount = 0; +} + LLStringTable::LLStringTable(int tablesize) : mUniqueEntries(0) { diff --git a/indra/llcommon/llstringtable.h b/indra/llcommon/llstringtable.h index ec61ea1982..d40c9d8dfd 100644 --- a/indra/llcommon/llstringtable.h +++ b/indra/llcommon/llstringtable.h @@ -61,21 +61,9 @@ const U32 MAX_STRINGS_LENGTH = 256; class LL_COMMON_API LLStringTableEntry { public: - LLStringTableEntry(const char *str) - : mString(NULL), mCount(1) - { - // Copy string - U32 length = (U32)strlen(str) + 1; /*Flawfinder: ignore*/ - length = llmin(length, MAX_STRINGS_LENGTH); - mString = new char[length]; - strncpy(mString, str, length); /*Flawfinder: ignore*/ - mString[length - 1] = 0; - } - ~LLStringTableEntry() - { - delete [] mString; - mCount = 0; - } + LLStringTableEntry(const char *str); + ~LLStringTableEntry(); + void incCount() { mCount++; } BOOL decCount() { return --mCount; } diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index ca5bcb5a95..9a230516d5 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -38,6 +38,6 @@ const S32 LL_VERSION_MINOR = 0; const S32 LL_VERSION_PATCH = 0; const S32 LL_VERSION_BUILD = 2822; -const char * const LL_CHANNEL = "Second Life 2009"; +const char * const LL_CHANNEL = "Second Life Developer"; #endif |