summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rwxr-xr-xindra/llui/llstatbar.cpp26
-rwxr-xr-xindra/llui/llstatbar.h8
-rwxr-xr-xindra/llui/llstatgraph.h8
-rwxr-xr-xindra/llui/lltextbase.cpp1
4 files changed, 21 insertions, 22 deletions
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
index bc8235132e..24256c3193 100755
--- a/indra/llui/llstatbar.cpp
+++ b/indra/llui/llstatbar.cpp
@@ -284,7 +284,7 @@ S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const
return num_rapid_changes;
}
-S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const LLTrace::TraceType<LLTrace::CountAccumulator>& stat, const F32Seconds time_period)
+S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const LLTrace::StatType<LLTrace::CountAccumulator>& stat, const F32Seconds time_period)
{
F32Seconds elapsed_time,
time_since_value_changed;
@@ -332,7 +332,7 @@ void LLStatBar::draw()
{
case STAT_COUNT:
{
- const LLTrace::TraceType<LLTrace::CountAccumulator>& count_stat = *mStat.countStatp;
+ const LLTrace::StatType<LLTrace::CountAccumulator>& count_stat = *mStat.countStatp;
unit_label = std::string(count_stat.getUnitLabel()) + "/s";
current = last_frame_recording.getPerSec(count_stat);
@@ -344,7 +344,7 @@ void LLStatBar::draw()
break;
case STAT_EVENT:
{
- const LLTrace::TraceType<LLTrace::EventAccumulator>& event_stat = *mStat.eventStatp;
+ const LLTrace::StatType<LLTrace::EventAccumulator>& event_stat = *mStat.eventStatp;
unit_label = mUnitLabel.empty() ? event_stat.getUnitLabel() : mUnitLabel;
current = last_frame_recording.getLastValue(event_stat);
@@ -356,7 +356,7 @@ void LLStatBar::draw()
break;
case STAT_SAMPLE:
{
- const LLTrace::TraceType<LLTrace::SampleAccumulator>& sample_stat = *mStat.sampleStatp;
+ const LLTrace::StatType<LLTrace::SampleAccumulator>& sample_stat = *mStat.sampleStatp;
unit_label = mUnitLabel.empty() ? sample_stat.getUnitLabel() : mUnitLabel;
current = last_frame_recording.getLastValue(sample_stat);
@@ -379,7 +379,7 @@ void LLStatBar::draw()
break;
case STAT_MEM:
{
- const LLTrace::TraceType<LLTrace::MemStatAccumulator>& mem_stat = *mStat.memStatp;
+ const LLTrace::StatType<LLTrace::MemAccumulator>& mem_stat = *mStat.memStatp;
unit_label = mUnitLabel.empty() ? mem_stat.getUnitLabel() : mUnitLabel;
current = last_frame_recording.getLastValue(mem_stat).value();
@@ -578,27 +578,27 @@ void LLStatBar::draw()
void LLStatBar::setStat(const std::string& stat_name)
{
using namespace LLTrace;
- const TraceType<CountAccumulator>* count_stat;
- const TraceType<EventAccumulator>* event_stat;
- const TraceType<SampleAccumulator>* sample_stat;
- const TraceType<MemStatAccumulator>* mem_stat;
+ const StatType<CountAccumulator>* count_stat;
+ const StatType<EventAccumulator>* event_stat;
+ const StatType<SampleAccumulator>* sample_stat;
+ const StatType<MemAccumulator>* mem_stat;
- if ((count_stat = TraceType<CountAccumulator>::getInstance(stat_name)))
+ if ((count_stat = StatType<CountAccumulator>::getInstance(stat_name)))
{
mStat.countStatp = count_stat;
mStatType = STAT_COUNT;
}
- else if ((event_stat = TraceType<EventAccumulator>::getInstance(stat_name)))
+ else if ((event_stat = StatType<EventAccumulator>::getInstance(stat_name)))
{
mStat.eventStatp = event_stat;
mStatType = STAT_EVENT;
}
- else if ((sample_stat = TraceType<SampleAccumulator>::getInstance(stat_name)))
+ else if ((sample_stat = StatType<SampleAccumulator>::getInstance(stat_name)))
{
mStat.sampleStatp = sample_stat;
mStatType = STAT_SAMPLE;
}
- else if ((mem_stat = TraceType<MemStatAccumulator>::getInstance(stat_name)))
+ else if ((mem_stat = StatType<MemAccumulator>::getInstance(stat_name)))
{
mStat.memStatp = mem_stat;
mStatType = STAT_MEM;
diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h
index 5e9255b9eb..57e492bc80 100755
--- a/indra/llui/llstatbar.h
+++ b/indra/llui/llstatbar.h
@@ -105,10 +105,10 @@ private:
union
{
void* valid;
- const LLTrace::TraceType<LLTrace::CountAccumulator>* countStatp;
- const LLTrace::TraceType<LLTrace::EventAccumulator>* eventStatp;
- const LLTrace::TraceType<LLTrace::SampleAccumulator>* sampleStatp;
- const LLTrace::TraceType<LLTrace::MemStatAccumulator>* memStatp;
+ const LLTrace::StatType<LLTrace::CountAccumulator>* countStatp;
+ const LLTrace::StatType<LLTrace::EventAccumulator>* eventStatp;
+ const LLTrace::StatType<LLTrace::SampleAccumulator>* sampleStatp;
+ const LLTrace::StatType<LLTrace::MemAccumulator>* memStatp;
} mStat;
LLUIString mLabel;
diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h
index 38fe12d18b..f381e92a4d 100755
--- a/indra/llui/llstatgraph.h
+++ b/indra/llui/llstatgraph.h
@@ -57,9 +57,9 @@ public:
struct StatParams : public LLInitParam::ChoiceBlock<StatParams>
{
- Alternative<LLTrace::TraceType<LLTrace::CountAccumulator>* > count_stat_float;
- Alternative<LLTrace::TraceType<LLTrace::EventAccumulator>* > event_stat_float;
- Alternative<LLTrace::TraceType<LLTrace::SampleAccumulator>* > sample_stat_float;
+ Alternative<LLTrace::StatType<LLTrace::CountAccumulator>* > count_stat_float;
+ Alternative<LLTrace::StatType<LLTrace::EventAccumulator>* > event_stat_float;
+ Alternative<LLTrace::StatType<LLTrace::SampleAccumulator>* > sample_stat_float;
};
struct Params : public LLInitParam::Block<Params, LLView::Params>
@@ -104,7 +104,7 @@ public:
/*virtual*/ void setValue(const LLSD& value);
private:
- LLTrace::TraceType<LLTrace::CountAccumulator>* mNewStatFloatp;
+ LLTrace::StatType<LLTrace::CountAccumulator>* mNewStatFloatp;
BOOL mPerSec;
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 730c3b2ada..00382125a8 100755
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1871,7 +1871,6 @@ LLTextBase::segment_set_t::iterator LLTextBase::getSegIterContaining(S32 index)
// when there are no segments, we return the end iterator, which must be checked by caller
if (mSegments.size() <= 1) { return mSegments.begin(); }
- //FIXME: avoid operator new somehow (without running into refcount problems)
index_segment->setStart(index);
index_segment->setEnd(index);
segment_set_t::iterator it = mSegments.upper_bound(index_segment);