diff options
author | Richard Linden <none@none> | 2013-07-19 15:03:05 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-07-19 15:03:05 -0700 |
commit | e40065f82c797eab41006a448c838f4f1089a2e8 (patch) | |
tree | 7abaeeae98304308bc3812531f682de3cda4bb72 /indra/llcommon | |
parent | eb8d552df76540e7b0b533f0c10c5faa541299a4 (diff) |
BUILDFIX: #include and dependency cleanup
Diffstat (limited to 'indra/llcommon')
-rwxr-xr-x | indra/llcommon/llcommonutils.h | 2 | ||||
-rwxr-xr-x | indra/llcommon/llcriticaldamp.cpp | 2 | ||||
-rwxr-xr-x | indra/llcommon/llcriticaldamp.h | 4 | ||||
-rwxr-xr-x | indra/llcommon/lldate.cpp | 2 | ||||
-rwxr-xr-x | indra/llcommon/lldate.h | 2 | ||||
-rwxr-xr-x | indra/llcommon/llfasttimer.cpp | 22 | ||||
-rwxr-xr-x | indra/llcommon/llinitparam.h | 1 | ||||
-rwxr-xr-x | indra/llcommon/llsdutil.h | 2 | ||||
-rwxr-xr-x | indra/llcommon/llstring.cpp | 1 | ||||
-rwxr-xr-x | indra/llcommon/llstring.h | 6 | ||||
-rwxr-xr-x | indra/llcommon/llsys.cpp | 6 | ||||
-rw-r--r-- | indra/llcommon/lltraceaccumulators.h | 1 | ||||
-rw-r--r-- | indra/llcommon/lltracerecording.cpp | 38 | ||||
-rw-r--r-- | indra/llcommon/llunit.h | 110 | ||||
-rwxr-xr-x | indra/llcommon/lluuid.h | 1 |
15 files changed, 111 insertions, 89 deletions
diff --git a/indra/llcommon/llcommonutils.h b/indra/llcommon/llcommonutils.h index 755dc41fb4..20ada27830 100755 --- a/indra/llcommon/llcommonutils.h +++ b/indra/llcommon/llcommonutils.h @@ -27,6 +27,8 @@ #ifndef LL_LLCOMMONUTILS_H #define LL_LLCOMMONUTILS_H +#include "lluuid.h" + namespace LLCommonUtils { /** diff --git a/indra/llcommon/llcriticaldamp.cpp b/indra/llcommon/llcriticaldamp.cpp index 575fc4149e..5ffad88973 100755 --- a/indra/llcommon/llcriticaldamp.cpp +++ b/indra/llcommon/llcriticaldamp.cpp @@ -81,7 +81,7 @@ void LLSmoothInterpolation::updateInterpolants() //----------------------------------------------------------------------------- // getInterpolant() //----------------------------------------------------------------------------- -F32 LLSmoothInterpolation::getInterpolant(LLUnit<F32, LLUnits::Seconds> time_constant, bool use_cache) +F32 LLSmoothInterpolation::getInterpolant(LLUnitImplicit<F32, LLUnits::Seconds> time_constant, bool use_cache) { if (time_constant == 0.f) { diff --git a/indra/llcommon/llcriticaldamp.h b/indra/llcommon/llcriticaldamp.h index e174643cd0..7b2a414459 100755 --- a/indra/llcommon/llcriticaldamp.h +++ b/indra/llcommon/llcriticaldamp.h @@ -42,10 +42,10 @@ public: static void updateInterpolants(); // ACCESSORS - static F32 getInterpolant(LLUnit<F32, LLUnits::Seconds> time_constant, bool use_cache = true); + static F32 getInterpolant(LLUnitImplicit<F32, LLUnits::Seconds> time_constant, bool use_cache = true); template<typename T> - static T lerp(T a, T b, LLUnit<F32, LLUnits::Seconds> time_constant, bool use_cache = true) + static T lerp(T a, T b, LLUnitImplicit<F32, LLUnits::Seconds> time_constant, bool use_cache = true) { F32 interpolant = getInterpolant(time_constant, use_cache); return ((a * (1.f - interpolant)) diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index 7892269e35..cec4047c1f 100755 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -55,7 +55,7 @@ LLDate::LLDate(const LLDate& date) : mSecondsSinceEpoch(date.mSecondsSinceEpoch) {} -LLDate::LLDate(LLUnit<F64, LLUnits::Seconds> seconds_since_epoch) : +LLDate::LLDate(LLUnitImplicit<F64, LLUnits::Seconds> seconds_since_epoch) : mSecondsSinceEpoch(seconds_since_epoch.value()) {} diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h index 1067ac5280..816bc62b14 100755 --- a/indra/llcommon/lldate.h +++ b/indra/llcommon/lldate.h @@ -59,7 +59,7 @@ public: * * @param seconds_since_epoch The number of seconds since UTC epoch. */ - LLDate(LLUnit<F64, LLUnits::Seconds> seconds_since_epoch); + LLDate(LLUnitImplicit<F64, LLUnits::Seconds> seconds_since_epoch); /** * @brief Construct a date from a string representation diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index 79aa0c8722..6f046c18ff 100755 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -111,9 +111,9 @@ static timer_tree_dfs_iterator_t end_timer_tree() struct SortTimerByName { bool operator()(const TimeBlock* i1, const TimeBlock* i2) - { + { return i1->getName() < i2->getName(); - } + } }; TimeBlock& TimeBlock::getRootTimeBlock() @@ -227,17 +227,17 @@ void TimeBlock::incrementalUpdateTimerTree() if (accumulator->mMoveUpTree) { - // since ancestors have already been visited, re-parenting won't affect tree traversal + // 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; + 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 + // as ancestors may call this timer only on certain paths, so we want to resolve + // child-most block locations before their parents it.skipAncestors(); } } @@ -357,7 +357,7 @@ void TimeBlock::logStats() // doesn't work correctly on the first frame total_time += frame_recording.getLastRecording().getSum(timer); } - } +} sd["Total"]["Time"] = (LLSD::Real) total_time.value(); sd["Total"]["Calls"] = (LLSD::Integer) 1; @@ -366,7 +366,7 @@ void TimeBlock::logStats() LLMutexLock lock(sLogLock); sLogQueue.push(sd); } - } +} } @@ -413,7 +413,7 @@ void TimeBlock::writeLog(std::ostream& os) LLSDSerialize::toXML(sd, os); LLMutexLock lock(sLogLock); sLogQueue.pop(); - } + } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -470,7 +470,7 @@ LLUnit<F64, LLUnits::Seconds> BlockTimer::getElapsedTime() { U64 total_time = TimeBlock::getCPUClockCount64() - mStartTime; - return (F64)total_time / (F64)TimeBlock::countsPerSecond(); + return LLUnits::Seconds::fromValue((F64)total_time / (F64)TimeBlock::countsPerSecond()); } diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index 879ea4fe2a..812071efdd 100755 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -38,6 +38,7 @@ #include "llerror.h" #include "llstl.h" #include "llpredicate.h" +#include "llsd.h" namespace LLTypeTags { diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h index 532d3f9341..d0b536c39a 100755 --- a/indra/llcommon/llsdutil.h +++ b/indra/llcommon/llsdutil.h @@ -29,7 +29,7 @@ #ifndef LL_LLSDUTIL_H #define LL_LLSDUTIL_H -class LLSD; +#include "llsd.h" // U32 LL_COMMON_API LLSD ll_sd_from_U32(const U32); diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 66c416bfdd..6f92c7d5d4 100755 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -29,6 +29,7 @@ #include "llstring.h" #include "llerror.h" #include "llfasttimer.h" +#include "llsd.h" #if LL_WINDOWS #include "llwin32headerslean.h" diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 17893c1910..fdf9f3ce89 100755 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -29,10 +29,11 @@ #include <string> #include <cstdio> -#include <locale> +//#include <locale> #include <iomanip> #include <algorithm> -#include "llsd.h" +#include <vector> +#include <map> #include "llformat.h" #if LL_LINUX || LL_SOLARIS @@ -50,6 +51,7 @@ #endif const char LL_UNKNOWN_CHAR = '?'; +class LLSD; #if LL_DARWIN || LL_LINUX || LL_SOLARIS // Template specialization of char_traits for U16s. Only necessary on Mac and Linux (exists on Windows already) diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 5d805ba841..8d2045dfa0 100755 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -1396,13 +1396,13 @@ public: << " seconds "; } - S32 precision = LL_CONT.precision(); + S32 precision = LL_CONT.precision(); LL_CONT << std::fixed << std::setprecision(1) << framerate << '\n' << LLMemoryInfo(); - LL_CONT.precision(precision); - LL_CONT << LL_ENDL; + LL_CONT.precision(precision); + LL_CONT << LL_ENDL; return false; } diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index a2f9f4c090..efc8b43f6a 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -34,6 +34,7 @@ #include "lltimer.h" #include "llrefcount.h" #include "llthreadlocalstorage.h" +#include <limits> namespace LLTrace { diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 48b5a7c3fa..2150a44f12 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -95,7 +95,7 @@ void Recording::handleReset() { mBuffers.write()->reset(); - mElapsedSeconds = 0.0; + mElapsedSeconds = LLUnits::Seconds::fromValue(0.0); mSamplingTimer.reset(); } @@ -131,14 +131,14 @@ void Recording::appendRecording( Recording& other ) LLUnit<F64, LLUnits::Seconds> Recording::getSum(const TraceType<TimeBlockAccumulator>& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; - return (F64)(accumulator.mTotalTimeCounter - accumulator.mStartTotalTimeCounter) - / (F64)LLTrace::TimeBlock::countsPerSecond(); + return LLUnits::Seconds::fromValue((F64)(accumulator.mTotalTimeCounter - accumulator.mStartTotalTimeCounter) + / (F64)LLTrace::TimeBlock::countsPerSecond()); } LLUnit<F64, LLUnits::Seconds> Recording::getSum(const TraceType<TimeBlockAccumulator::SelfTimeFacet>& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; - return (F64)(accumulator.mSelfTimeCounter) / (F64)LLTrace::TimeBlock::countsPerSecond(); + return LLUnits::Seconds::fromValue((F64)(accumulator.mSelfTimeCounter) / (F64)LLTrace::TimeBlock::countsPerSecond()); } @@ -151,16 +151,16 @@ LLUnit<F64, LLUnits::Seconds> Recording::getPerSec(const TraceType<TimeBlockAccu { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; - return (F64)(accumulator.mTotalTimeCounter - accumulator.mStartTotalTimeCounter) - / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds.value()); + return LLUnits::Seconds::fromValue((F64)(accumulator.mTotalTimeCounter - accumulator.mStartTotalTimeCounter) + / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds.value())); } LLUnit<F64, LLUnits::Seconds> Recording::getPerSec(const TraceType<TimeBlockAccumulator::SelfTimeFacet>& stat) { const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()]; - return (F64)(accumulator.mSelfTimeCounter) - / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds.value()); + return LLUnits::Seconds::fromValue((F64)(accumulator.mSelfTimeCounter) + / ((F64)LLTrace::TimeBlock::countsPerSecond() * mElapsedSeconds.value())); } F32 Recording::getPerSec(const TraceType<TimeBlockAccumulator::CallCountFacet>& stat) @@ -170,52 +170,52 @@ F32 Recording::getPerSec(const TraceType<TimeBlockAccumulator::CallCountFacet>& LLUnit<F64, LLUnits::Bytes> Recording::getMin(const TraceType<MemStatAccumulator>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mSize.getMin(); + return LLUnits::Bytes::fromValue(mBuffers->mMemStats[stat.getIndex()].mSize.getMin()); } LLUnit<F64, LLUnits::Bytes> Recording::getMean(const TraceType<MemStatAccumulator>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mSize.getMean(); + return LLUnits::Bytes::fromValue(mBuffers->mMemStats[stat.getIndex()].mSize.getMean()); } LLUnit<F64, LLUnits::Bytes> Recording::getMax(const TraceType<MemStatAccumulator>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mSize.getMax(); + return LLUnits::Bytes::fromValue(mBuffers->mMemStats[stat.getIndex()].mSize.getMax()); } LLUnit<F64, LLUnits::Bytes> Recording::getStandardDeviation(const TraceType<MemStatAccumulator>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mSize.getStandardDeviation(); + return LLUnits::Bytes::fromValue(mBuffers->mMemStats[stat.getIndex()].mSize.getStandardDeviation()); } LLUnit<F64, LLUnits::Bytes> Recording::getLastValue(const TraceType<MemStatAccumulator>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mSize.getLastValue(); + return LLUnits::Bytes::fromValue(mBuffers->mMemStats[stat.getIndex()].mSize.getLastValue()); } LLUnit<F64, LLUnits::Bytes> Recording::getMin(const TraceType<MemStatAccumulator::ChildMemFacet>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mChildSize.getMin(); + return LLUnits::Bytes::fromValue(mBuffers->mMemStats[stat.getIndex()].mChildSize.getMin()); } LLUnit<F64, LLUnits::Bytes> Recording::getMean(const TraceType<MemStatAccumulator::ChildMemFacet>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mChildSize.getMean(); + return LLUnits::Bytes::fromValue(mBuffers->mMemStats[stat.getIndex()].mChildSize.getMean()); } LLUnit<F64, LLUnits::Bytes> Recording::getMax(const TraceType<MemStatAccumulator::ChildMemFacet>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mChildSize.getMax(); + return LLUnits::Bytes::fromValue(mBuffers->mMemStats[stat.getIndex()].mChildSize.getMax()); } LLUnit<F64, LLUnits::Bytes> Recording::getStandardDeviation(const TraceType<MemStatAccumulator::ChildMemFacet>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mChildSize.getStandardDeviation(); + return LLUnits::Bytes::fromValue(mBuffers->mMemStats[stat.getIndex()].mChildSize.getStandardDeviation()); } LLUnit<F64, LLUnits::Bytes> Recording::getLastValue(const TraceType<MemStatAccumulator::ChildMemFacet>& stat) { - return mBuffers->mMemStats[stat.getIndex()].mChildSize.getLastValue(); + return LLUnits::Bytes::fromValue(mBuffers->mMemStats[stat.getIndex()].mChildSize.getLastValue()); } U32 Recording::getSum(const TraceType<MemStatAccumulator::AllocationCountFacet>& stat) @@ -603,7 +603,7 @@ F64 PeriodicRecording::getPeriodMean( const TraceType<SampleAccumulator>& stat, size_t total_periods = mRecordingPeriods.size(); num_periods = llmin(num_periods, isStarted() ? total_periods - 1 : total_periods); - LLUnit<F64, LLUnits::Seconds> total_duration = 0.f; + LLUnit<F64, LLUnits::Seconds> total_duration(0.f); F64 mean = 0; if (num_periods <= 0) { return mean; } diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 51f14a5948..f81e746c77 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -141,8 +141,17 @@ protected: template<typename STORAGE_TYPE, typename UNIT_TYPE> std::ostream& operator <<(std::ostream& s, const LLUnit<STORAGE_TYPE, UNIT_TYPE>& unit) { - s << unit.value() << UNIT_TYPE::getUnitLabel(); - return s; + s << unit.value() << UNIT_TYPE::getUnitLabel(); + return s; +} + +template<typename STORAGE_TYPE, typename UNIT_TYPE> +std::istream& operator >>(std::istream& s, LLUnit<STORAGE_TYPE, UNIT_TYPE>& unit) +{ + STORAGE_TYPE val; + s >> val; + unit = val; + return s; } template<typename STORAGE_TYPE, typename UNIT_TYPE> @@ -172,8 +181,17 @@ struct LLUnitImplicit : public LLUnit<STORAGE_TYPE, UNIT_TYPE> template<typename STORAGE_TYPE, typename UNIT_TYPE> std::ostream& operator <<(std::ostream& s, const LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE>& unit) { - s << unit.value() << UNIT_TYPE::getUnitLabel(); - return s; + s << unit.value() << UNIT_TYPE::getUnitLabel(); + return s; +} + +template<typename STORAGE_TYPE, typename UNIT_TYPE> +std::istream& operator >>(std::istream& s, LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE>& unit) +{ + STORAGE_TYPE val; + s >> val; + unit = val; + return s; } template<typename S, typename T> @@ -201,7 +219,7 @@ LL_FORCE_INLINE void ll_convert_units(LLUnit<S1, T1> in, LLUnit<S2, T2>& out, .. { // T1 and T2 fully reduced and equal...just copy - out = (S2)in.value(); + out = LLUnit<S2, T2>((S2)in.value()); } else { @@ -447,33 +465,33 @@ template<typename VALUE_TYPE> struct LLUnitLinearOps { typedef LLUnitLinearOps<VALUE_TYPE> self_t; - LLUnitLinearOps(VALUE_TYPE val) : mValue (val) {} + LLUnitLinearOps(VALUE_TYPE val) : mResult (val) {} - operator VALUE_TYPE() const { return mValue; } - VALUE_TYPE mValue; + operator VALUE_TYPE() const { return mResult; } + VALUE_TYPE mResult; template<typename T> self_t operator * (T other) { - return mValue * other; + return mResult * other; } template<typename T> self_t operator / (T other) { - return mValue / other; + return mResult / other; } template<typename T> self_t operator + (T other) { - return mValue + other; + return mResult + other; } template<typename T> self_t operator - (T other) { - return mValue - other; + return mResult - other; } }; @@ -482,32 +500,32 @@ struct LLUnitInverseLinearOps { typedef LLUnitInverseLinearOps<VALUE_TYPE> self_t; - LLUnitInverseLinearOps(VALUE_TYPE val) : mValue (val) {} - operator VALUE_TYPE() const { return mValue; } - VALUE_TYPE mValue; + LLUnitInverseLinearOps(VALUE_TYPE val) : mResult (val) {} + operator VALUE_TYPE() const { return mResult; } + VALUE_TYPE mResult; template<typename T> self_t operator * (T other) { - return mValue / other; + return mResult / other; } template<typename T> self_t operator / (T other) { - return mValue * other; + return mResult * other; } template<typename T> self_t operator + (T other) { - return mValue - other; + return mResult - other; } template<typename T> self_t operator - (T other) { - return mValue + other; + return mResult + other; } }; @@ -521,35 +539,31 @@ struct base_unit_name template<typename STORAGE_T, typename UNIT_T> \ static LLUnit<STORAGE_T, base_unit_name> fromValue(LLUnit<STORAGE_T, UNIT_T> value) \ { return LLUnit<STORAGE_T, base_unit_name>(value); } \ -}; \ -template<typename T> std::ostream& operator<<(std::ostream& s, const LLUnit<T, base_unit_name>& val) \ -{ s << val.value() << base_unit_name::getUnitLabel; return s; } - - -#define LL_DECLARE_DERIVED_UNIT(unit_name, unit_label, base_unit_name, conversion_operation) \ -struct unit_name \ -{ \ - typedef base_unit_name base_unit_t; \ - static const char* getUnitLabel() { return unit_label; } \ - template<typename T> \ - static LLUnit<T, unit_name> fromValue(T value) { return LLUnit<T, unit_name>(value); } \ - template<typename STORAGE_T, typename UNIT_T> \ - static LLUnit<STORAGE_T, unit_name> fromValue(LLUnit<STORAGE_T, UNIT_T> value) \ - { return LLUnit<STORAGE_T, unit_name>(value); } \ -}; \ -template<typename T> std::ostream& operator<<(std::ostream& s, const LLUnit<T, unit_name>& val) \ -{ s << val.value() << unit_name::getUnitLabel; return s; } \ - \ -template<typename S1, typename S2> \ -void ll_convert_units(LLUnit<S1, unit_name> in, LLUnit<S2, base_unit_name>& out) \ -{ \ - out = (S2)(LLUnitLinearOps<S1>(in.value()) conversion_operation).mValue; \ -} \ - \ -template<typename S1, typename S2> \ -void ll_convert_units(LLUnit<S1, base_unit_name> in, LLUnit<S2, unit_name>& out) \ -{ \ - out = (S2)(LLUnitInverseLinearOps<S1>(in.value()) conversion_operation).mValue; \ +} + + +#define LL_DECLARE_DERIVED_UNIT(unit_name, unit_label, base_unit_name, conversion_operation) \ +struct unit_name \ +{ \ + typedef base_unit_name base_unit_t; \ + static const char* getUnitLabel() { return unit_label; } \ + template<typename T> \ + static LLUnit<T, unit_name> fromValue(T value) { return LLUnit<T, unit_name>(value); } \ + template<typename STORAGE_T, typename UNIT_T> \ + static LLUnit<STORAGE_T, unit_name> fromValue(LLUnit<STORAGE_T, UNIT_T> value) \ + { return LLUnit<STORAGE_T, unit_name>(value); } \ +}; \ + \ +template<typename S1, typename S2> \ +void ll_convert_units(LLUnit<S1, unit_name> in, LLUnit<S2, base_unit_name>& out) \ +{ \ + out = LLUnit<S2, base_unit_name>((S2)(LLUnitLinearOps<S1>(in.value()) conversion_operation)); \ +} \ + \ +template<typename S1, typename S2> \ +void ll_convert_units(LLUnit<S1, base_unit_name> in, LLUnit<S2, unit_name>& out) \ +{ \ + out = LLUnit<S2, unit_name>((S2)(LLUnitInverseLinearOps<S1>(in.value()) conversion_operation)); \ } // diff --git a/indra/llcommon/lluuid.h b/indra/llcommon/lluuid.h index 7889828c85..0699dcda83 100755 --- a/indra/llcommon/lluuid.h +++ b/indra/llcommon/lluuid.h @@ -28,6 +28,7 @@ #include <iostream> #include <set> +#include <vector> #include "stdtypes.h" #include "llpreprocessor.h" |