Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now
parent
9ddf64c651
commit
9fdca96f8b
|
|
@ -557,7 +557,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
|
|||
}
|
||||
if (mLastWeight != mLastWeight)
|
||||
{
|
||||
mLastWeight = mCurWeight+.001;
|
||||
mLastWeight = mCurWeight+.001f;
|
||||
}
|
||||
|
||||
// perform differential update of morph
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ void LLTexLayerSetBuffer::pushProjection() const
|
|||
gGL.matrixMode(LLRender::MM_PROJECTION);
|
||||
gGL.pushMatrix();
|
||||
gGL.loadIdentity();
|
||||
gGL.ortho(0.0f, getCompositeWidth(), 0.0f, getCompositeHeight(), -1.0f, 1.0f);
|
||||
gGL.ortho(0.0f, (F32)getCompositeWidth(), 0.0f, (F32)getCompositeHeight(), -1.0f, 1.0f);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ bool LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask)
|
|||
F32 target_roll = llclamp(ang_vel.mV[VZ], -4.f, 4.f) * roll_factor;
|
||||
|
||||
// roll is critically damped interpolation between current roll and angular velocity-derived target roll
|
||||
mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, U32Milliseconds(100));
|
||||
mRoll = LLSmoothInterpolation::lerp(mRoll, target_roll, F32Milliseconds(100.f));
|
||||
|
||||
LLQuaternion roll(mRoll, LLVector3(0.f, 0.f, 1.f));
|
||||
mPelvisState->setRotation(roll);
|
||||
|
|
|
|||
|
|
@ -130,8 +130,6 @@
|
|||
#endif
|
||||
|
||||
// level 4 warnings that we need to disable:
|
||||
#pragma warning (disable : 4244) // possible loss of data on conversions
|
||||
#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
|
||||
#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
|
||||
#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
|
||||
#endif // LL_MSVC
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ void LLQueuedThread::processRequest(LLQueuedThread::QueuedRequest* req)
|
|||
|
||||
if (sleep_time.count() > 0)
|
||||
{
|
||||
ms_sleep(sleep_time.count());
|
||||
ms_sleep((U32)sleep_time.count());
|
||||
}
|
||||
}
|
||||
processRequest(req);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ inline F32 ll_internal_random<F32>()
|
|||
// Per Monty, it's important to clamp using the correct fmodf() rather
|
||||
// than expanding to F64 for fmod() and then truncating back to F32. Prior
|
||||
// to this change, we were getting sporadic ll_frand() == 1.0 results.
|
||||
F32 rv{ narrow<F32>(gRandomGenerator()) };
|
||||
F32 rv{ narrow<F64>(gRandomGenerator()) };
|
||||
if(!((rv >= 0.0f) && (rv < 1.0f))) return fmodf(rv, 1.0f);
|
||||
return rv;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ bool LLParamSDParser::readF32(Parser& parser, void* val_ptr)
|
|||
{
|
||||
LLParamSDParser& self = static_cast<LLParamSDParser&>(parser);
|
||||
|
||||
*((F32*)val_ptr) = self.mCurReadSD->asReal();
|
||||
*((F32*)val_ptr) = (F32)self.mCurReadSD->asReal();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, llssize max_bytes)
|
|||
}
|
||||
// Since we've already read 'inbuf' bytes into 'hdr_buf', prepend that
|
||||
// data to whatever remains in 'str'.
|
||||
LLMemoryStreamBuf already(reinterpret_cast<const U8*>(hdr_buf), inbuf);
|
||||
LLMemoryStreamBuf already(reinterpret_cast<const U8*>(hdr_buf), (S32)inbuf);
|
||||
cat_streambuf prebuff(&already, str.rdbuf());
|
||||
std::istream prepend(&prebuff);
|
||||
#if 1
|
||||
|
|
@ -566,7 +566,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) c
|
|||
data,
|
||||
NOTATION_FALSE_SERIAL,
|
||||
false);
|
||||
if(PARSE_FAILURE == cnt) parse_count = cnt;
|
||||
if(PARSE_FAILURE == cnt) parse_count = (S32)cnt;
|
||||
else account(cnt);
|
||||
}
|
||||
else
|
||||
|
|
@ -592,7 +592,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) c
|
|||
if(isalpha(c))
|
||||
{
|
||||
auto cnt = deserialize_boolean(istr,data,NOTATION_TRUE_SERIAL,true);
|
||||
if(PARSE_FAILURE == cnt) parse_count = cnt;
|
||||
if(PARSE_FAILURE == cnt) parse_count = (S32)cnt;
|
||||
else account(cnt);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -554,7 +554,7 @@ void LLSDXMLParser::Impl::parsePart(const char* buf, llssize len)
|
|||
if ( buf != NULL
|
||||
&& len > 0 )
|
||||
{
|
||||
XML_Status status = XML_Parse(mParser, buf, len, false);
|
||||
XML_Status status = XML_Parse(mParser, buf, (int)len, 0);
|
||||
if (status == XML_STATUS_ERROR)
|
||||
{
|
||||
LL_INFOS() << "Unexpected XML parsing error at start" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@
|
|||
#include "llmainthreadtask.h"
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
#pragma warning( disable : 4506 ) // no definition for inline function
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4506) // no definition for inline function
|
||||
#endif
|
||||
|
||||
class LLSingletonBase: private boost::noncopyable
|
||||
|
|
@ -861,4 +862,8 @@ private:
|
|||
template <class T>
|
||||
T* LLSimpleton<T>::sInstance{ nullptr };
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ LLWString utf16str_to_wstring(const U16* utf16str, size_t len)
|
|||
while (i < len)
|
||||
{
|
||||
llwchar cur_char;
|
||||
i += utf16chars_to_wchar(chars16+i, &cur_char);
|
||||
i += (S32)utf16chars_to_wchar(chars16+i, &cur_char);
|
||||
wout += cur_char;
|
||||
}
|
||||
return wout;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ U32 micro_sleep(U64 us, U32 max_yields)
|
|||
WaitForSingleObject(timer, INFINITE);
|
||||
CloseHandle(timer);
|
||||
#else
|
||||
Sleep(us / 1000);
|
||||
Sleep((DWORD)(us / 1000));
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ bool AccumulatorBufferGroup::isCurrent() const
|
|||
return mCounts.isCurrent();
|
||||
}
|
||||
|
||||
void AccumulatorBufferGroup::append( const AccumulatorBufferGroup& other )
|
||||
void AccumulatorBufferGroup::append(const AccumulatorBufferGroup& other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
|
||||
mCounts.addSamples(other.mCounts, SEQUENTIAL);
|
||||
|
|
@ -109,7 +109,7 @@ void AccumulatorBufferGroup::append( const AccumulatorBufferGroup& other )
|
|||
mStackTimers.addSamples(other.mStackTimers, SEQUENTIAL);
|
||||
}
|
||||
|
||||
void AccumulatorBufferGroup::merge( const AccumulatorBufferGroup& other)
|
||||
void AccumulatorBufferGroup::merge(const AccumulatorBufferGroup& other)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_STATS;
|
||||
mCounts.addSamples(other.mCounts, NON_SEQUENTIAL);
|
||||
|
|
@ -140,7 +140,7 @@ void AccumulatorBufferGroup::sync()
|
|||
|
||||
F64 SampleAccumulator::mergeSumsOfSquares(const SampleAccumulator& a, const SampleAccumulator& b)
|
||||
{
|
||||
const F64 epsilon = 0.0000001;
|
||||
constexpr F64 epsilon = 0.0000001;
|
||||
|
||||
if (a.getSamplingTime() > epsilon && b.getSamplingTime() > epsilon)
|
||||
{
|
||||
|
|
@ -170,7 +170,7 @@ F64 SampleAccumulator::mergeSumsOfSquares(const SampleAccumulator& a, const Samp
|
|||
return a.getSumOfSquares();
|
||||
}
|
||||
|
||||
void SampleAccumulator::addSamples( const SampleAccumulator& other, EBufferAppendType append_type )
|
||||
void SampleAccumulator::addSamples(const SampleAccumulator& other, EBufferAppendType append_type)
|
||||
{
|
||||
if (append_type == NON_SEQUENTIAL)
|
||||
{
|
||||
|
|
@ -205,7 +205,7 @@ void SampleAccumulator::addSamples( const SampleAccumulator& other, EBufferAppen
|
|||
}
|
||||
}
|
||||
|
||||
void SampleAccumulator::reset( const SampleAccumulator* other )
|
||||
void SampleAccumulator::reset(const SampleAccumulator* other)
|
||||
{
|
||||
mLastValue = other ? other->mLastValue : NaN;
|
||||
mHasValue = other ? other->mHasValue : false;
|
||||
|
|
@ -243,7 +243,7 @@ F64 EventAccumulator::mergeSumsOfSquares(const EventAccumulator& a, const EventA
|
|||
return a.mSumOfSquares;
|
||||
}
|
||||
|
||||
void EventAccumulator::addSamples( const EventAccumulator& other, EBufferAppendType append_type )
|
||||
void EventAccumulator::addSamples(const EventAccumulator& other, EBufferAppendType append_type)
|
||||
{
|
||||
if (other.mNumSamples)
|
||||
{
|
||||
|
|
@ -269,12 +269,12 @@ void EventAccumulator::addSamples( const EventAccumulator& other, EBufferAppendT
|
|||
}
|
||||
}
|
||||
|
||||
void EventAccumulator::reset( const EventAccumulator* other )
|
||||
void EventAccumulator::reset(const EventAccumulator* other)
|
||||
{
|
||||
mNumSamples = 0;
|
||||
mSum = 0;
|
||||
mMin = F32(NaN);
|
||||
mMax = F32(NaN);
|
||||
mMin = NaN;
|
||||
mMax = NaN;
|
||||
mMean = NaN;
|
||||
mSumOfSquares = 0;
|
||||
mLastValue = other ? other->mLastValue : NaN;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
namespace LLTrace
|
||||
{
|
||||
const F64 NaN = std::numeric_limits<double>::quiet_NaN();
|
||||
constexpr F64 NaN = std::numeric_limits<double>::quiet_NaN();
|
||||
|
||||
enum EBufferAppendType
|
||||
{
|
||||
|
|
@ -251,8 +251,8 @@ namespace LLTrace
|
|||
|
||||
EventAccumulator()
|
||||
: mSum(0),
|
||||
mMin(F32(NaN)),
|
||||
mMax(F32(NaN)),
|
||||
mMin(NaN),
|
||||
mMax(NaN),
|
||||
mMean(NaN),
|
||||
mSumOfSquares(0),
|
||||
mNumSamples(0),
|
||||
|
|
@ -288,11 +288,11 @@ namespace LLTrace
|
|||
void sync(F64SecondsImplicit) {}
|
||||
|
||||
F64 getSum() const { return mSum; }
|
||||
F32 getMin() const { return mMin; }
|
||||
F32 getMax() const { return mMax; }
|
||||
F64 getMin() const { return mMin; }
|
||||
F64 getMax() const { return mMax; }
|
||||
F64 getLastValue() const { return mLastValue; }
|
||||
F64 getMean() const { return mMean; }
|
||||
F64 getStandardDeviation() const { return sqrtf(mSumOfSquares / mNumSamples); }
|
||||
F64 getStandardDeviation() const { return sqrt(mSumOfSquares / mNumSamples); }
|
||||
F64 getSumOfSquares() const { return mSumOfSquares; }
|
||||
S32 getSampleCount() const { return mNumSamples; }
|
||||
bool hasValue() const { return mNumSamples > 0; }
|
||||
|
|
@ -307,7 +307,7 @@ namespace LLTrace
|
|||
F64 mMean,
|
||||
mSumOfSquares;
|
||||
|
||||
F32 mMin,
|
||||
F64 mMin,
|
||||
mMax;
|
||||
|
||||
S32 mNumSamples;
|
||||
|
|
@ -322,8 +322,8 @@ namespace LLTrace
|
|||
|
||||
SampleAccumulator()
|
||||
: mSum(0),
|
||||
mMin(F32(NaN)),
|
||||
mMax(F32(NaN)),
|
||||
mMin(NaN),
|
||||
mMax(NaN),
|
||||
mMean(NaN),
|
||||
mSumOfSquares(0),
|
||||
mLastSampleTimeStamp(0),
|
||||
|
|
@ -378,11 +378,11 @@ namespace LLTrace
|
|||
}
|
||||
|
||||
F64 getSum() const { return mSum; }
|
||||
F32 getMin() const { return mMin; }
|
||||
F32 getMax() const { return mMax; }
|
||||
F64 getMin() const { return mMin; }
|
||||
F64 getMax() const { return mMax; }
|
||||
F64 getLastValue() const { return mLastValue; }
|
||||
F64 getMean() const { return mMean; }
|
||||
F64 getStandardDeviation() const { return sqrtf(mSumOfSquares / mTotalSamplingTime); }
|
||||
F64 getStandardDeviation() const { return sqrt(mSumOfSquares / mTotalSamplingTime); }
|
||||
F64 getSumOfSquares() const { return mSumOfSquares; }
|
||||
F64SecondsImplicit getSamplingTime() const { return mTotalSamplingTime; }
|
||||
S32 getSampleCount() const { return mNumSamples; }
|
||||
|
|
@ -402,7 +402,7 @@ namespace LLTrace
|
|||
mLastSampleTimeStamp,
|
||||
mTotalSamplingTime;
|
||||
|
||||
F32 mMin,
|
||||
F64 mMin,
|
||||
mMax;
|
||||
|
||||
S32 mNumSamples;
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ F32 Recording::getPerSec(const StatType<TimeBlockAccumulator::CallCountFacet>& s
|
|||
update();
|
||||
const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()];
|
||||
const TimeBlockAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mStackTimers[stat.getIndex()] : NULL;
|
||||
return (F32)(accumulator.mCalls + (active_accumulator ? active_accumulator->mCalls : 0)) / mElapsedSeconds.value();
|
||||
return (F32)(accumulator.mCalls + (active_accumulator ? active_accumulator->mCalls : 0)) / (F32)mElapsedSeconds.value();
|
||||
}
|
||||
|
||||
bool Recording::hasValue(const StatType<CountAccumulator>& stat)
|
||||
|
|
@ -296,11 +296,11 @@ F64 Recording::getMean( const StatType<SampleAccumulator>& stat )
|
|||
const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
|
||||
if (active_accumulator && active_accumulator->hasValue())
|
||||
{
|
||||
F32 t = 0.0f;
|
||||
F64 t = 0.0;
|
||||
S32 div = accumulator.getSampleCount() + active_accumulator->getSampleCount();
|
||||
if (div > 0)
|
||||
{
|
||||
t = active_accumulator->getSampleCount() / div;
|
||||
t = (F64)active_accumulator->getSampleCount() / (F64)div;
|
||||
}
|
||||
return lerp(accumulator.getMean(), active_accumulator->getMean(), t);
|
||||
}
|
||||
|
|
@ -319,7 +319,7 @@ F64 Recording::getStandardDeviation( const StatType<SampleAccumulator>& stat )
|
|||
if (active_accumulator && active_accumulator->hasValue())
|
||||
{
|
||||
F64 sum_of_squares = SampleAccumulator::mergeSumsOfSquares(accumulator, *active_accumulator);
|
||||
return sqrtf(sum_of_squares / (accumulator.getSamplingTime() + active_accumulator->getSamplingTime()));
|
||||
return sqrt(sum_of_squares / (F64)(accumulator.getSamplingTime() + active_accumulator->getSamplingTime()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -382,11 +382,11 @@ F64 Recording::getMean( const StatType<EventAccumulator>& stat )
|
|||
const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
|
||||
if (active_accumulator && active_accumulator->hasValue())
|
||||
{
|
||||
F32 t = 0.0f;
|
||||
F64 t = 0.0;
|
||||
S32 div = accumulator.getSampleCount() + active_accumulator->getSampleCount();
|
||||
if (div > 0)
|
||||
{
|
||||
t = active_accumulator->getSampleCount() / div;
|
||||
t = (F64)active_accumulator->getSampleCount() / (F64)div;
|
||||
}
|
||||
return lerp(accumulator.getMean(), active_accumulator->getMean(), t);
|
||||
}
|
||||
|
|
@ -405,7 +405,7 @@ F64 Recording::getStandardDeviation( const StatType<EventAccumulator>& stat )
|
|||
if (active_accumulator && active_accumulator->hasValue())
|
||||
{
|
||||
F64 sum_of_squares = EventAccumulator::mergeSumsOfSquares(accumulator, *active_accumulator);
|
||||
return sqrtf(sum_of_squares / (accumulator.getSampleCount() + active_accumulator->getSampleCount()));
|
||||
return sqrt(sum_of_squares / (F64)(accumulator.getSampleCount() + active_accumulator->getSampleCount()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,6 +35,11 @@
|
|||
#include "llpointer.h"
|
||||
#include <limits>
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4244) // possible loss of data on conversions
|
||||
#endif
|
||||
|
||||
class LLStopWatchControlsMixinCommon
|
||||
{
|
||||
public:
|
||||
|
|
@ -714,4 +719,8 @@ namespace LLTrace
|
|||
};
|
||||
}
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // LL_LLTRACERECORDING_H
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@
|
|||
#include "llpreprocessor.h"
|
||||
#include "llerror.h"
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4244) // possible loss of data on conversions
|
||||
#endif
|
||||
|
||||
//lightweight replacement of type traits for simple type equality check
|
||||
template<typename S, typename T>
|
||||
struct LLIsSameType
|
||||
|
|
@ -846,4 +851,8 @@ LL_FORCE_INLINE S2 ll_convert_units(LLUnit<S1, base_unit_name> in, LLUnit<S2, un
|
|||
typedef LLUnit<U64, ns::unit_name> U64##unit_name; \
|
||||
typedef LLUnitImplicit<U64, ns::unit_name> U64##unit_name##Implicit
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif //LL_UNITTYPE_H
|
||||
|
|
|
|||
|
|
@ -81,13 +81,13 @@ class TestEventThrottle: public LLEventThrottleBase
|
|||
public:
|
||||
TestEventThrottle(F32 interval):
|
||||
LLEventThrottleBase(interval),
|
||||
mAlarmRemaining(-1),
|
||||
mTimerRemaining(-1)
|
||||
mAlarmRemaining(-1.f),
|
||||
mTimerRemaining(-1.f)
|
||||
{}
|
||||
TestEventThrottle(LLEventPump& source, F32 interval):
|
||||
LLEventThrottleBase(source, interval),
|
||||
mAlarmRemaining(-1),
|
||||
mTimerRemaining(-1)
|
||||
mAlarmRemaining(-1.f),
|
||||
mTimerRemaining(-1.f)
|
||||
{}
|
||||
|
||||
/*----- implementation of LLEventThrottleBase timing functionality -----*/
|
||||
|
|
@ -100,12 +100,12 @@ public:
|
|||
virtual bool alarmRunning() const /*override*/
|
||||
{
|
||||
// decrementing to exactly 0 should mean the alarm fires
|
||||
return mAlarmRemaining > 0;
|
||||
return mAlarmRemaining > 0.f;
|
||||
}
|
||||
|
||||
virtual void alarmCancel() /*override*/
|
||||
{
|
||||
mAlarmRemaining = -1;
|
||||
mAlarmRemaining = -1.f;
|
||||
}
|
||||
|
||||
virtual void timerSet(F32 interval) /*override*/
|
||||
|
|
@ -116,7 +116,7 @@ public:
|
|||
virtual F32 timerGetRemaining() const /*override*/
|
||||
{
|
||||
// LLTimer.getRemainingTimeF32() never returns negative; 0.0 means expired
|
||||
return (mTimerRemaining > 0.0)? mTimerRemaining : 0.0;
|
||||
return (mTimerRemaining > 0.0f)? mTimerRemaining : 0.0f;
|
||||
}
|
||||
|
||||
/*------------------- methods for manipulating time --------------------*/
|
||||
|
|
|
|||
|
|
@ -1809,7 +1809,7 @@ namespace tut
|
|||
std::string q("\"");
|
||||
std::string qPYTHON(q + PYTHON + q);
|
||||
std::string qscript(q + scriptfile.getName() + q);
|
||||
int rc = _spawnl(_P_WAIT, PYTHON.c_str(), qPYTHON.c_str(), qscript.c_str(),
|
||||
int rc = (int)_spawnl(_P_WAIT, PYTHON.c_str(), qPYTHON.c_str(), qscript.c_str(),
|
||||
std::forward<ARGS>(args)..., NULL);
|
||||
if (rc == -1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@
|
|||
#include "lltracerecording.h"
|
||||
#include "../test/lltut.h"
|
||||
|
||||
#ifdef LL_WINDOWS
|
||||
#pragma warning(disable : 4244) // possible loss of data on conversions
|
||||
#endif
|
||||
|
||||
namespace LLUnits
|
||||
{
|
||||
// using powers of 2 to allow strict floating point equality
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ namespace tut
|
|||
F32 float_val = quatloos_implicit;
|
||||
ensure("implicit units convert implicitly to regular values", float_val == 16);
|
||||
|
||||
S32 int_val = quatloos_implicit;
|
||||
S32 int_val = (S32)quatloos_implicit;
|
||||
ensure("implicit units convert implicitly to regular values", int_val == 16);
|
||||
|
||||
// conversion of implicits
|
||||
|
|
|
|||
|
|
@ -106,17 +106,17 @@ namespace LLCore
|
|||
// Maxium number of policy classes that can be defined.
|
||||
// *TODO: Currently limited to the default class + 1, extend.
|
||||
// (TSN: should this be more dynamically sized. Is there a reason to hard limit the number of policies?)
|
||||
const int HTTP_POLICY_CLASS_LIMIT = 32;
|
||||
constexpr int HTTP_POLICY_CLASS_LIMIT = 32;
|
||||
|
||||
// Debug/informational tracing. Used both
|
||||
// as a global option and in per-request traces.
|
||||
const int HTTP_TRACE_OFF = 0;
|
||||
const int HTTP_TRACE_LOW = 1;
|
||||
const int HTTP_TRACE_CURL_HEADERS = 2;
|
||||
const int HTTP_TRACE_CURL_BODIES = 3;
|
||||
constexpr int HTTP_TRACE_OFF = 0;
|
||||
constexpr int HTTP_TRACE_LOW = 1;
|
||||
constexpr int HTTP_TRACE_CURL_HEADERS = 2;
|
||||
constexpr int HTTP_TRACE_CURL_BODIES = 3;
|
||||
|
||||
const int HTTP_TRACE_MIN = HTTP_TRACE_OFF;
|
||||
const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
|
||||
constexpr int HTTP_TRACE_MIN = HTTP_TRACE_OFF;
|
||||
constexpr int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
|
||||
|
||||
// Request retry limits
|
||||
//
|
||||
|
|
@ -127,41 +127,41 @@ const int HTTP_TRACE_MAX = HTTP_TRACE_CURL_BODIES;
|
|||
// We want to span a few windows to allow transport to slow
|
||||
// after onset of the throttles and then recover without a final
|
||||
// failure. Other systems may need other constants.
|
||||
const int HTTP_RETRY_COUNT_DEFAULT = 5;
|
||||
const int HTTP_RETRY_COUNT_MIN = 0;
|
||||
const int HTTP_RETRY_COUNT_MAX = 100;
|
||||
const HttpTime HTTP_RETRY_BACKOFF_MIN_DEFAULT = 1E6L; // 1 sec
|
||||
const HttpTime HTTP_RETRY_BACKOFF_MAX_DEFAULT = 5E6L; // 5 sec
|
||||
const HttpTime HTTP_RETRY_BACKOFF_MAX = 20E6L; // 20 sec
|
||||
constexpr int HTTP_RETRY_COUNT_DEFAULT = 5;
|
||||
constexpr int HTTP_RETRY_COUNT_MIN = 0;
|
||||
constexpr int HTTP_RETRY_COUNT_MAX = 100;
|
||||
constexpr HttpTime HTTP_RETRY_BACKOFF_MIN_DEFAULT = 1000000UL; // 1 sec
|
||||
constexpr HttpTime HTTP_RETRY_BACKOFF_MAX_DEFAULT = 50000006UL; // 5 sec
|
||||
constexpr HttpTime HTTP_RETRY_BACKOFF_MAX = 20000000UL; // 20 sec
|
||||
|
||||
const int HTTP_REDIRECTS_DEFAULT = 10;
|
||||
constexpr int HTTP_REDIRECTS_DEFAULT = 10;
|
||||
|
||||
// Timeout value used for both connect and protocol exchange.
|
||||
// Retries and time-on-queue are not included and aren't
|
||||
// accounted for.
|
||||
const long HTTP_REQUEST_TIMEOUT_DEFAULT = 30L;
|
||||
const long HTTP_REQUEST_XFER_TIMEOUT_DEFAULT = 0L;
|
||||
const long HTTP_REQUEST_TIMEOUT_MIN = 0L;
|
||||
const long HTTP_REQUEST_TIMEOUT_MAX = 3600L;
|
||||
constexpr long HTTP_REQUEST_TIMEOUT_DEFAULT = 30L;
|
||||
constexpr long HTTP_REQUEST_XFER_TIMEOUT_DEFAULT = 0L;
|
||||
constexpr long HTTP_REQUEST_TIMEOUT_MIN = 0L;
|
||||
constexpr long HTTP_REQUEST_TIMEOUT_MAX = 3600L;
|
||||
|
||||
// Limits on connection counts
|
||||
const int HTTP_CONNECTION_LIMIT_DEFAULT = 8;
|
||||
const int HTTP_CONNECTION_LIMIT_MIN = 1;
|
||||
const int HTTP_CONNECTION_LIMIT_MAX = 256;
|
||||
constexpr int HTTP_CONNECTION_LIMIT_DEFAULT = 8;
|
||||
constexpr int HTTP_CONNECTION_LIMIT_MIN = 1;
|
||||
constexpr int HTTP_CONNECTION_LIMIT_MAX = 256;
|
||||
|
||||
// Pipelining limits
|
||||
const long HTTP_PIPELINING_DEFAULT = 0L;
|
||||
const long HTTP_PIPELINING_MAX = 20L;
|
||||
constexpr long HTTP_PIPELINING_DEFAULT = 0L;
|
||||
constexpr long HTTP_PIPELINING_MAX = 20L;
|
||||
|
||||
// Miscellaneous defaults
|
||||
const bool HTTP_USE_RETRY_AFTER_DEFAULT = true;
|
||||
const long HTTP_THROTTLE_RATE_DEFAULT = 0L;
|
||||
constexpr bool HTTP_USE_RETRY_AFTER_DEFAULT = true;
|
||||
constexpr long HTTP_THROTTLE_RATE_DEFAULT = 0L;
|
||||
|
||||
// Tuning parameters
|
||||
|
||||
// Time worker thread sleeps after a pass through the
|
||||
// request, ready and active queues.
|
||||
const int HTTP_SERVICE_LOOP_SLEEP_NORMAL_MS = 2;
|
||||
constexpr int HTTP_SERVICE_LOOP_SLEEP_NORMAL_MS = 2;
|
||||
|
||||
// Block allocation size (a tuning parameter) is found
|
||||
// in bufferarray.h.
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ namespace LLCore
|
|||
|
||||
void recordDataDown(size_t bytes)
|
||||
{
|
||||
mDataDown.push(bytes);
|
||||
mDataDown.push((F32)bytes);
|
||||
}
|
||||
|
||||
void recordDataUp(size_t bytes)
|
||||
{
|
||||
mDataUp.push(bytes);
|
||||
mDataUp.push((F32)bytes);
|
||||
}
|
||||
|
||||
void recordHTTPRequest() { ++mRequests; }
|
||||
|
|
|
|||
|
|
@ -45,11 +45,10 @@
|
|||
|
||||
bool LLCrashLock::isProcessAlive(U32 pid, const std::string& pname)
|
||||
{
|
||||
std::wstring wpname;
|
||||
wpname = std::wstring(pname.begin(), pname.end());
|
||||
std::wstring wpname = ll_convert_string_to_wide(pname);
|
||||
|
||||
HANDLE snapshot;
|
||||
PROCESSENTRY32 pe32;
|
||||
PROCESSENTRY32 pe32{};
|
||||
|
||||
bool matched = false;
|
||||
|
||||
|
|
@ -65,7 +64,7 @@ bool LLCrashLock::isProcessAlive(U32 pid, const std::string& pname)
|
|||
{
|
||||
do {
|
||||
std::wstring wexecname = pe32.szExeFile;
|
||||
std::string execname = std::string(wexecname.begin(), wexecname.end());
|
||||
std::string execname = ll_convert_wide_to_string(wexecname);
|
||||
if (!wpname.compare(pe32.szExeFile))
|
||||
{
|
||||
if (pid == (U32)pe32.th32ProcessID)
|
||||
|
|
|
|||
|
|
@ -201,15 +201,15 @@ U32 LLDir::deleteDirAndContents(const std::string& dir_name)
|
|||
boost::filesystem::path dir_path(dir_name);
|
||||
#endif
|
||||
|
||||
if (boost::filesystem::exists (dir_path))
|
||||
if (boost::filesystem::exists(dir_path))
|
||||
{
|
||||
if (!boost::filesystem::is_empty (dir_path))
|
||||
if (!boost::filesystem::is_empty(dir_path))
|
||||
{ // Directory has content
|
||||
num_deleted = boost::filesystem::remove_all (dir_path);
|
||||
num_deleted = (U32)boost::filesystem::remove_all(dir_path);
|
||||
}
|
||||
else
|
||||
{ // Directory is empty
|
||||
boost::filesystem::remove (dir_path);
|
||||
boost::filesystem::remove(dir_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -325,8 +325,8 @@ const std::string LLDiskCache::getCacheInfo()
|
|||
{
|
||||
std::ostringstream cache_info;
|
||||
|
||||
F32 max_in_mb = (F32)mMaxSizeBytes / (1024.0 * 1024.0);
|
||||
F32 percent_used = ((F32)dirFileSize(mCacheDir) / (F32)mMaxSizeBytes) * 100.0;
|
||||
F32 max_in_mb = (F32)mMaxSizeBytes / (1024.0f * 1024.0f);
|
||||
F32 percent_used = ((F32)dirFileSize(mCacheDir) / (F32)mMaxSizeBytes) * 100.0f;
|
||||
|
||||
cache_info << std::fixed;
|
||||
cache_info << std::setprecision(1);
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType fi
|
|||
if (file.is_open())
|
||||
{
|
||||
file.seekg(0, std::ios::end);
|
||||
file_size = file.tellg();
|
||||
file_size = (S32)file.tellg();
|
||||
}
|
||||
|
||||
return file_size;
|
||||
|
|
@ -176,7 +176,7 @@ bool LLFileSystem::read(U8* buffer, S32 bytes)
|
|||
}
|
||||
else
|
||||
{
|
||||
mBytesRead = file.gcount();
|
||||
mBytesRead = (S32)file.gcount();
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
|
@ -217,7 +217,7 @@ bool LLFileSystem::write(const U8* buffer, S32 bytes)
|
|||
{
|
||||
ofs.write((const char*)buffer, bytes);
|
||||
|
||||
mPosition = ofs.tellp(); // <FS:Ansariel> Fix asset caching
|
||||
mPosition = (S32)ofs.tellp(); // <FS:Ansariel> Fix asset caching
|
||||
|
||||
success = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
|
|||
bool abs_value = (mFilterData[i][index++].asReal() > 0.0);
|
||||
for (S32 k = 0; k < NUM_VALUES_IN_MAT3; k++)
|
||||
for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++)
|
||||
kernel.mMatrix[k][j] = mFilterData[i][index++].asReal();
|
||||
kernel.mMatrix[k][j] = (F32)mFilterData[i][index++].asReal();
|
||||
convolve(kernel,normalize,abs_value);
|
||||
}
|
||||
else if (filter_name == "colortransform")
|
||||
|
|
@ -262,7 +262,7 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
|
|||
S32 index = 1;
|
||||
for (S32 k = 0; k < NUM_VALUES_IN_MAT3; k++)
|
||||
for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++)
|
||||
transform.mMatrix[k][j] = mFilterData[i][index++].asReal();
|
||||
transform.mMatrix[k][j] = (F32)mFilterData[i][index++].asReal();
|
||||
transform.transpose();
|
||||
colorTransform(transform);
|
||||
}
|
||||
|
|
@ -279,32 +279,32 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
|
|||
|
||||
void LLImageFilter::blendStencil(F32 alpha, U8* pixel, U8 red, U8 green, U8 blue)
|
||||
{
|
||||
F32 inv_alpha = 1.0 - alpha;
|
||||
F32 inv_alpha = 1.0f - alpha;
|
||||
switch (mStencilBlendMode)
|
||||
{
|
||||
case STENCIL_BLEND_MODE_BLEND:
|
||||
// Classic blend of incoming color with the background image
|
||||
pixel[VRED] = inv_alpha * pixel[VRED] + alpha * red;
|
||||
pixel[VGREEN] = inv_alpha * pixel[VGREEN] + alpha * green;
|
||||
pixel[VBLUE] = inv_alpha * pixel[VBLUE] + alpha * blue;
|
||||
pixel[VRED] = (U8)(inv_alpha * pixel[VRED] + alpha * red);
|
||||
pixel[VGREEN] = (U8)(inv_alpha * pixel[VGREEN] + alpha * green);
|
||||
pixel[VBLUE] = (U8)(inv_alpha * pixel[VBLUE] + alpha * blue);
|
||||
break;
|
||||
case STENCIL_BLEND_MODE_ADD:
|
||||
// Add incoming color to the background image
|
||||
pixel[VRED] = llclampb(pixel[VRED] + alpha * red);
|
||||
pixel[VGREEN] = llclampb(pixel[VGREEN] + alpha * green);
|
||||
pixel[VBLUE] = llclampb(pixel[VBLUE] + alpha * blue);
|
||||
pixel[VRED] = (U8)llclampb(pixel[VRED] + alpha * red);
|
||||
pixel[VGREEN] = (U8)llclampb(pixel[VGREEN] + alpha * green);
|
||||
pixel[VBLUE] = (U8)llclampb(pixel[VBLUE] + alpha * blue);
|
||||
break;
|
||||
case STENCIL_BLEND_MODE_ABACK:
|
||||
// Add back background image to the incoming color
|
||||
pixel[VRED] = llclampb(inv_alpha * pixel[VRED] + red);
|
||||
pixel[VGREEN] = llclampb(inv_alpha * pixel[VGREEN] + green);
|
||||
pixel[VBLUE] = llclampb(inv_alpha * pixel[VBLUE] + blue);
|
||||
pixel[VRED] = (U8)llclampb(inv_alpha * pixel[VRED] + red);
|
||||
pixel[VGREEN] = (U8)llclampb(inv_alpha * pixel[VGREEN] + green);
|
||||
pixel[VBLUE] = (U8)llclampb(inv_alpha * pixel[VBLUE] + blue);
|
||||
break;
|
||||
case STENCIL_BLEND_MODE_FADE:
|
||||
// Fade incoming color to black
|
||||
pixel[VRED] = alpha * red;
|
||||
pixel[VGREEN] = alpha * green;
|
||||
pixel[VBLUE] = alpha * blue;
|
||||
pixel[VRED] = (U8)(alpha * red);
|
||||
pixel[VGREEN] = (U8)(alpha * green);
|
||||
pixel[VBLUE] = (U8)(alpha * blue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -348,7 +348,7 @@ void LLImageFilter::colorTransform(const LLMatrix3 &transform)
|
|||
dst.clamp(0.0f,255.0f);
|
||||
|
||||
// Blend result
|
||||
blendStencil(getStencilAlpha(i,j), dst_data, dst.mV[VRED], dst.mV[VGREEN], dst.mV[VBLUE]);
|
||||
blendStencil(getStencilAlpha(i,j), dst_data, (U8)dst.mV[VRED], (U8)dst.mV[VGREEN], (U8)dst.mV[VBLUE]);
|
||||
dst_data += components;
|
||||
}
|
||||
}
|
||||
|
|
@ -463,7 +463,7 @@ void LLImageFilter::convolve(const LLMatrix3 &kernel, bool normalize, bool abs_v
|
|||
dst.clamp(0.0f,255.0f);
|
||||
|
||||
// Blend result
|
||||
blendStencil(getStencilAlpha(i,j), dst_data, dst.mV[VRED], dst.mV[VGREEN], dst.mV[VBLUE]);
|
||||
blendStencil(getStencilAlpha(i,j), dst_data, (U8)dst.mV[VRED], (U8)dst.mV[VGREEN], (U8)dst.mV[VBLUE]);
|
||||
|
||||
// Next pixel
|
||||
dst_data += components;
|
||||
|
|
@ -499,7 +499,7 @@ void LLImageFilter::filterScreen(EScreenMode mode, const F32 wave_length, const
|
|||
S32 width = mImage->getWidth();
|
||||
S32 height = mImage->getHeight();
|
||||
|
||||
F32 wave_length_pixels = wave_length * (F32)(height) / 2.0;
|
||||
F32 wave_length_pixels = wave_length * (F32)(height) / 2.0f;
|
||||
F32 sin = sinf(angle*DEG_TO_RAD);
|
||||
F32 cos = cosf(angle*DEG_TO_RAD);
|
||||
|
||||
|
|
@ -507,7 +507,7 @@ void LLImageFilter::filterScreen(EScreenMode mode, const F32 wave_length, const
|
|||
U8 gamma[256];
|
||||
for (S32 i = 0; i < 256; i++)
|
||||
{
|
||||
F32 gamma_i = llclampf((float)(powf((float)(i)/255.0,1.0/4.0)));
|
||||
F32 gamma_i = llclampf((float)(powf((float)(i)/255.0f,1.0f/4.0f)));
|
||||
gamma[i] = (U8)(255.0 * gamma_i);
|
||||
}
|
||||
|
||||
|
|
@ -525,11 +525,11 @@ void LLImageFilter::filterScreen(EScreenMode mode, const F32 wave_length, const
|
|||
case SCREEN_MODE_2DSINE:
|
||||
di = cos*i + sin*j;
|
||||
dj = -sin*i + cos*j;
|
||||
value = (sinf(2*F_PI*di/wave_length_pixels)*sinf(2*F_PI*dj/wave_length_pixels)+1.0)*255.0/2.0;
|
||||
value = (sinf(2*F_PI*di/wave_length_pixels)*sinf(2*F_PI*dj/wave_length_pixels)+1.0f)*255.0f/2.0f;
|
||||
break;
|
||||
case SCREEN_MODE_LINE:
|
||||
dj = sin*i - cos*j;
|
||||
value = (sinf(2*F_PI*dj/wave_length_pixels)+1.0)*255.0/2.0;
|
||||
value = (sinf(2*F_PI*dj/wave_length_pixels)+1.0f)*255.0f/2.0f;
|
||||
break;
|
||||
}
|
||||
U8 dst_value = (dst_data[VRED] >= (U8)(value) ? gamma[dst_data[VRED] - (U8)(value)] : 0);
|
||||
|
|
@ -556,16 +556,16 @@ void LLImageFilter::setStencil(EStencilShape shape, EStencilBlendMode mode, F32
|
|||
mStencilCenterX = (S32)(mImage->getWidth() + params[0] * (F32)(mImage->getHeight()))/2;
|
||||
mStencilCenterY = (S32)(mImage->getHeight() + params[1] * (F32)(mImage->getHeight()))/2;
|
||||
mStencilWidth = (S32)(params[2] * (F32)(mImage->getHeight()))/2;
|
||||
mStencilGamma = (params[3] <= 0.0 ? 1.0 : params[3]);
|
||||
mStencilGamma = (params[3] <= 0.0f ? 1.0f : params[3]);
|
||||
|
||||
mStencilWavelength = (params[0] <= 0.0 ? 10.0 : params[0] * (F32)(mImage->getHeight()) / 2.0);
|
||||
mStencilWavelength = (params[0] <= 0.0f ? 10.0f : params[0] * (F32)(mImage->getHeight()) / 2.0f);
|
||||
mStencilSine = sinf(params[1]*DEG_TO_RAD);
|
||||
mStencilCosine = cosf(params[1]*DEG_TO_RAD);
|
||||
|
||||
mStencilStartX = ((F32)(mImage->getWidth()) + params[0] * (F32)(mImage->getHeight()))/2.0;
|
||||
mStencilStartY = ((F32)(mImage->getHeight()) + params[1] * (F32)(mImage->getHeight()))/2.0;
|
||||
F32 end_x = ((F32)(mImage->getWidth()) + params[2] * (F32)(mImage->getHeight()))/2.0;
|
||||
F32 end_y = ((F32)(mImage->getHeight()) + params[3] * (F32)(mImage->getHeight()))/2.0;
|
||||
mStencilStartX = ((F32)(mImage->getWidth()) + params[0] * (F32)(mImage->getHeight()))/2.0f;
|
||||
mStencilStartY = ((F32)(mImage->getHeight()) + params[1] * (F32)(mImage->getHeight()))/2.0f;
|
||||
F32 end_x = ((F32)(mImage->getWidth()) + params[2] * (F32)(mImage->getHeight()))/2.0f;
|
||||
F32 end_y = ((F32)(mImage->getHeight()) + params[3] * (F32)(mImage->getHeight()))/2.0f;
|
||||
mStencilGradX = end_x - mStencilStartX;
|
||||
mStencilGradY = end_y - mStencilStartY;
|
||||
mStencilGradN = mStencilGradX*mStencilGradX + mStencilGradY*mStencilGradY;
|
||||
|
|
@ -578,14 +578,14 @@ F32 LLImageFilter::getStencilAlpha(S32 i, S32 j)
|
|||
{
|
||||
// alpha is a modified gaussian value, with a center and fading in a circular pattern toward the edges
|
||||
// The gamma parameter controls the intensity of the drop down from alpha 1.0 (center) to 0.0
|
||||
F32 d_center_square = (i - mStencilCenterX)*(i - mStencilCenterX) + (j - mStencilCenterY)*(j - mStencilCenterY);
|
||||
F32 d_center_square = (F32)((i - mStencilCenterX)*(i - mStencilCenterX) + (j - mStencilCenterY)*(j - mStencilCenterY));
|
||||
alpha = powf(F_E, -(powf((d_center_square/(mStencilWidth*mStencilWidth)),mStencilGamma)/2.0f));
|
||||
}
|
||||
else if (mStencilShape == STENCIL_SHAPE_SCAN_LINES)
|
||||
{
|
||||
// alpha varies according to a squared sine function.
|
||||
F32 d = mStencilSine*i - mStencilCosine*j;
|
||||
alpha = (sinf(2*F_PI*d/mStencilWavelength) > 0.0 ? 1.0 : 0.0);
|
||||
alpha = (sinf(2*F_PI*d/mStencilWavelength) > 0.0f ? 1.0f : 0.0f);
|
||||
}
|
||||
else if (mStencilShape == STENCIL_SHAPE_GRADIENT)
|
||||
{
|
||||
|
|
@ -756,11 +756,11 @@ void LLImageFilter::filterGamma(F32 gamma, const LLColor3& alpha)
|
|||
|
||||
for (S32 i = 0; i < 256; i++)
|
||||
{
|
||||
F32 gamma_i = llclampf((float)(powf((float)(i)/255.0,1.0/gamma)));
|
||||
F32 gamma_i = llclampf((float)(powf((float)(i)/255.0f,1.0f/gamma)));
|
||||
// Blend in with alpha values
|
||||
gamma_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * 255.0 * gamma_i);
|
||||
gamma_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * 255.0 * gamma_i);
|
||||
gamma_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * 255.0 * gamma_i);
|
||||
gamma_red_lut[i] = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * 255.0f * gamma_i);
|
||||
gamma_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * 255.0f * gamma_i);
|
||||
gamma_blue_lut[i] = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * 255.0f * gamma_i);
|
||||
}
|
||||
|
||||
colorCorrect(gamma_red_lut,gamma_green_lut,gamma_blue_lut);
|
||||
|
|
@ -808,23 +808,23 @@ void LLImageFilter::filterLinearize(F32 tail, const LLColor3& alpha)
|
|||
{
|
||||
U8 value_i = (i < min_v ? 0 : 255);
|
||||
// Blend in with alpha values
|
||||
linear_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
|
||||
linear_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
|
||||
linear_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
|
||||
linear_red_lut[i] = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
|
||||
linear_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
|
||||
linear_blue_lut[i] = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Linearize between min and max
|
||||
F32 slope = 255.0 / (F32)(max_v - min_v);
|
||||
F32 slope = 255.0f / (F32)(max_v - min_v);
|
||||
F32 translate = -min_v * slope;
|
||||
for (S32 i = 0; i < 256; i++)
|
||||
{
|
||||
U8 value_i = (U8)(llclampb((S32)(slope*i + translate)));
|
||||
// Blend in with alpha values
|
||||
linear_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
|
||||
linear_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
|
||||
linear_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
|
||||
linear_red_lut[i] = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
|
||||
linear_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
|
||||
linear_blue_lut[i] = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -863,9 +863,9 @@ void LLImageFilter::filterEqualize(S32 nb_classes, const LLColor3& alpha)
|
|||
for (S32 i = 0; i < 256; i++)
|
||||
{
|
||||
// Blend in current_value with alpha values
|
||||
equalize_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * current_value);
|
||||
equalize_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * current_value);
|
||||
equalize_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * current_value);
|
||||
equalize_red_lut[i] = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * current_value);
|
||||
equalize_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * current_value);
|
||||
equalize_blue_lut[i] = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * current_value);
|
||||
if (cumulated_histo[i] >= current_count)
|
||||
{
|
||||
current_count += delta_count;
|
||||
|
|
@ -884,15 +884,15 @@ void LLImageFilter::filterColorize(const LLColor3& color, const LLColor3& alpha)
|
|||
U8 green_lut[256];
|
||||
U8 blue_lut[256];
|
||||
|
||||
F32 red_composite = 255.0 * alpha.mV[0] * color.mV[0];
|
||||
F32 green_composite = 255.0 * alpha.mV[1] * color.mV[1];
|
||||
F32 blue_composite = 255.0 * alpha.mV[2] * color.mV[2];
|
||||
F32 red_composite = 255.0f * alpha.mV[0] * color.mV[0];
|
||||
F32 green_composite = 255.0f * alpha.mV[1] * color.mV[1];
|
||||
F32 blue_composite = 255.0f * alpha.mV[2] * color.mV[2];
|
||||
|
||||
for (S32 i = 0; i < 256; i++)
|
||||
{
|
||||
red_lut[i] = (U8)(llclampb((S32)((1.0 - alpha.mV[0]) * (F32)(i) + red_composite)));
|
||||
green_lut[i] = (U8)(llclampb((S32)((1.0 - alpha.mV[1]) * (F32)(i) + green_composite)));
|
||||
blue_lut[i] = (U8)(llclampb((S32)((1.0 - alpha.mV[2]) * (F32)(i) + blue_composite)));
|
||||
red_lut[i] = (U8)(llclampb((S32)((1.0f - alpha.mV[0]) * (F32)(i) + red_composite)));
|
||||
green_lut[i] = (U8)(llclampb((S32)((1.0f - alpha.mV[1]) * (F32)(i) + green_composite)));
|
||||
blue_lut[i] = (U8)(llclampb((S32)((1.0f - alpha.mV[2]) * (F32)(i) + blue_composite)));
|
||||
}
|
||||
|
||||
colorCorrect(red_lut,green_lut,blue_lut);
|
||||
|
|
@ -904,15 +904,15 @@ void LLImageFilter::filterContrast(F32 slope, const LLColor3& alpha)
|
|||
U8 contrast_green_lut[256];
|
||||
U8 contrast_blue_lut[256];
|
||||
|
||||
F32 translate = 128.0 * (1.0 - slope);
|
||||
F32 translate = 128.0f * (1.0f - slope);
|
||||
|
||||
for (S32 i = 0; i < 256; i++)
|
||||
{
|
||||
U8 value_i = (U8)(llclampb((S32)(slope*i + translate)));
|
||||
// Blend in with alpha values
|
||||
contrast_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
|
||||
contrast_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
|
||||
contrast_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
|
||||
contrast_red_lut[i] = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
|
||||
contrast_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
|
||||
contrast_blue_lut[i] = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
|
||||
}
|
||||
|
||||
colorCorrect(contrast_red_lut,contrast_green_lut,contrast_blue_lut);
|
||||
|
|
@ -924,15 +924,15 @@ void LLImageFilter::filterBrightness(F32 add, const LLColor3& alpha)
|
|||
U8 brightness_green_lut[256];
|
||||
U8 brightness_blue_lut[256];
|
||||
|
||||
S32 add_value = (S32)(add * 255.0);
|
||||
S32 add_value = (S32)(add * 255.0f);
|
||||
|
||||
for (S32 i = 0; i < 256; i++)
|
||||
{
|
||||
U8 value_i = (U8)(llclampb(i + add_value));
|
||||
// Blend in with alpha values
|
||||
brightness_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
|
||||
brightness_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
|
||||
brightness_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
|
||||
brightness_red_lut[i] = (U8)((1.0f - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i);
|
||||
brightness_green_lut[i] = (U8)((1.0f - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i);
|
||||
brightness_blue_lut[i] = (U8)((1.0f - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i);
|
||||
}
|
||||
|
||||
colorCorrect(brightness_red_lut,brightness_green_lut,brightness_blue_lut);
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ public:
|
|||
{
|
||||
// "append" (set) the data we "streamed" (memcopied) for writing to the formatted image
|
||||
// with side-effect of setting the actually encoded size to same
|
||||
compressedImageOut.allocateData(offset);
|
||||
compressedImageOut.allocateData((S32)offset);
|
||||
memcpy(compressedImageOut.getData(), buffer, offset);
|
||||
compressedImageOut.updateData(); // update width, height etc from header
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1268,7 +1268,7 @@ void LLParcel::setExperienceKeyType( const LLUUID& experience_key, U32 type )
|
|||
|
||||
U32 LLParcel::countExperienceKeyType( U32 type )
|
||||
{
|
||||
return std::count_if(
|
||||
return (U32)std::count_if(
|
||||
boost::begin(mExperienceKeys | boost::adaptors::map_values),
|
||||
boost::end(mExperienceKeys | boost::adaptors::map_values),
|
||||
[type](U32 key){ return (key == type); });
|
||||
|
|
|
|||
|
|
@ -278,11 +278,11 @@ LLSD LLSettingsBase::interpolateSDValue(const std::string& key_name, const LLSD
|
|||
{
|
||||
case LLSD::TypeInteger:
|
||||
// lerp between the two values rounding the result to the nearest integer.
|
||||
new_value = LLSD::Integer(llroundf(lerp(value.asReal(), other_value.asReal(), mix)));
|
||||
new_value = LLSD::Integer(llroundf(lerp((F32)value.asReal(), (F32)other_value.asReal(), (F32)mix)));
|
||||
break;
|
||||
case LLSD::TypeReal:
|
||||
// lerp between the two values.
|
||||
new_value = LLSD::Real(lerp(value.asReal(), other_value.asReal(), mix));
|
||||
new_value = LLSD::Real(lerp((F32)value.asReal(), (F32)other_value.asReal(), (F32)mix));
|
||||
break;
|
||||
case LLSD::TypeMap:
|
||||
// deep copy.
|
||||
|
|
@ -297,7 +297,7 @@ LLSD LLSettingsBase::interpolateSDValue(const std::string& key_name, const LLSD
|
|||
{
|
||||
LLQuaternion a(value);
|
||||
LLQuaternion b(other_value);
|
||||
LLQuaternion q = slerp(mix, a, b);
|
||||
LLQuaternion q = slerp((F32)mix, a, b);
|
||||
new_array = q.getValue();
|
||||
}
|
||||
else
|
||||
|
|
@ -308,7 +308,7 @@ LLSD LLSettingsBase::interpolateSDValue(const std::string& key_name, const LLSD
|
|||
for (size_t i = 0; i < len; ++i)
|
||||
{
|
||||
|
||||
new_array[i] = lerp(value[i].asReal(), other_value[i].asReal(), mix);
|
||||
new_array[i] = lerp((F32)value[i].asReal(), (F32)other_value[i].asReal(), (F32)mix);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -693,7 +693,7 @@ void LLSettingsBlender::update(const LLSettingsBase::BlendFactor& blendf)
|
|||
|
||||
F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_in)
|
||||
{
|
||||
LLSettingsBase::TrackPosition blendf = blendf_in;
|
||||
LLSettingsBase::TrackPosition blendf = (F32)blendf_in;
|
||||
llassert(!isnan(blendf));
|
||||
if (blendf >= 1.0)
|
||||
{
|
||||
|
|
@ -744,7 +744,7 @@ bool LLSettingsBlenderTimeDelta::applyTimeDelta(const LLSettingsBase::Seconds& t
|
|||
return false;
|
||||
}
|
||||
|
||||
LLSettingsBase::BlendFactor blendf = calculateBlend(mTimeSpent, mBlendSpan);
|
||||
LLSettingsBase::BlendFactor blendf = calculateBlend((F32)mTimeSpent.value(), mBlendSpan);
|
||||
|
||||
if (fabs(mLastBlendF - blendf) < mBlendFMinDelta)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@ public:
|
|||
LLSettingsBlenderTimeDelta(const LLSettingsBase::ptr_t &target,
|
||||
const LLSettingsBase::ptr_t &initsetting, const LLSettingsBase::ptr_t &endsetting, const LLSettingsBase::Seconds& blend_span) :
|
||||
LLSettingsBlender(target, initsetting, endsetting),
|
||||
mBlendSpan(blend_span),
|
||||
mBlendSpan((F32)blend_span.value()),
|
||||
mLastUpdate(0.0f),
|
||||
mTimeSpent(0.0f),
|
||||
mBlendFMinDelta(MIN_BLEND_DELTA),
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ namespace
|
|||
continue;
|
||||
}
|
||||
|
||||
LLSettingsBase::TrackPosition frame = elem[LLSettingsDay::SETTING_KEYKFRAME].asReal();
|
||||
LLSettingsBase::TrackPosition frame = (F32)elem[LLSettingsDay::SETTING_KEYKFRAME].asReal();
|
||||
if ((frame < 0.0) || (frame > 1.0))
|
||||
{
|
||||
frame = llclamp(frame, 0.0f, 1.0f);
|
||||
|
|
|
|||
|
|
@ -480,19 +480,19 @@ void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
|
|||
// If there is no cloud texture in destination, reduce coverage to imitate disappearance
|
||||
// See LLDrawPoolWLSky::renderSkyClouds... we don't blend present texture with null
|
||||
// Note: Probably can be done by shader
|
||||
cloud_shadow = lerp(mSettings[SETTING_CLOUD_SHADOW].asReal(), (F64)0.f, blendf);
|
||||
cloud_shadow = lerp((F32)mSettings[SETTING_CLOUD_SHADOW].asReal(), 0.f, (F32)blendf);
|
||||
cloud_noise_id_next = cloud_noise_id;
|
||||
}
|
||||
else if (cloud_noise_id.isNull() && !cloud_noise_id_next.isNull())
|
||||
{
|
||||
// Source has no cloud texture, reduce initial coverage to imitate appearance
|
||||
// use same texture as destination
|
||||
cloud_shadow = lerp((F64)0.f, other->mSettings[SETTING_CLOUD_SHADOW].asReal(), blendf);
|
||||
cloud_shadow = lerp(0.f, (F32)other->mSettings[SETTING_CLOUD_SHADOW].asReal(), (F32)blendf);
|
||||
setCloudNoiseTextureId(cloud_noise_id_next);
|
||||
}
|
||||
else
|
||||
{
|
||||
cloud_shadow = lerp(mSettings[SETTING_CLOUD_SHADOW].asReal(), other->mSettings[SETTING_CLOUD_SHADOW].asReal(), blendf);
|
||||
cloud_shadow = lerp((F32)mSettings[SETTING_CLOUD_SHADOW].asReal(), (F32)other->mSettings[SETTING_CLOUD_SHADOW].asReal(), (F32)blendf);
|
||||
}
|
||||
|
||||
LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, other->getParameterMap(), blendf);
|
||||
|
|
@ -923,8 +923,8 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy)
|
|||
if (legacy.has(SETTING_LEGACY_EAST_ANGLE) && legacy.has(SETTING_LEGACY_SUN_ANGLE))
|
||||
{
|
||||
// get counter-clockwise radian angle from clockwise legacy WL east angle...
|
||||
F32 azimuth = -legacy[SETTING_LEGACY_EAST_ANGLE].asReal();
|
||||
F32 altitude = legacy[SETTING_LEGACY_SUN_ANGLE].asReal();
|
||||
F32 azimuth = -(F32)legacy[SETTING_LEGACY_EAST_ANGLE].asReal();
|
||||
F32 altitude = (F32)legacy[SETTING_LEGACY_SUN_ANGLE].asReal();
|
||||
|
||||
LLQuaternion sunquat = convert_azimuth_and_altitude_to_quat(azimuth, altitude);
|
||||
// original WL moon dir was diametrically opposed to the sun dir
|
||||
|
|
@ -958,7 +958,7 @@ void LLSettingsSky::updateSettings()
|
|||
F32 LLSettingsSky::getSunMoonGlowFactor() const
|
||||
{
|
||||
return getIsSunUp() ? 1.0f :
|
||||
getIsMoonUp() ? getMoonBrightness() * 0.25 : 0.0f;
|
||||
getIsMoonUp() ? getMoonBrightness() * 0.25f : 0.0f;
|
||||
}
|
||||
|
||||
bool LLSettingsSky::getIsSunUp() const
|
||||
|
|
@ -1043,11 +1043,11 @@ F32 LLSettingsSky::getFloat(const std::string& key, F32 default_value) const
|
|||
LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT;
|
||||
if (mSettings.has(SETTING_LEGACY_HAZE) && mSettings[SETTING_LEGACY_HAZE].has(key))
|
||||
{
|
||||
return mSettings[SETTING_LEGACY_HAZE][key].asReal();
|
||||
return (F32)mSettings[SETTING_LEGACY_HAZE][key].asReal();
|
||||
}
|
||||
if (mSettings.has(key))
|
||||
{
|
||||
return mSettings[key].asReal();
|
||||
return (F32)mSettings[key].asReal();
|
||||
}
|
||||
return default_value;
|
||||
}
|
||||
|
|
@ -1307,7 +1307,7 @@ void LLSettingsSky::clampColor(LLColor3& color, F32 gamma, F32 scale) const
|
|||
color *= scale/max_color;
|
||||
}
|
||||
LLColor3 linear(color);
|
||||
linear *= 1.0 / scale;
|
||||
linear *= 1.0f / scale;
|
||||
linear = smear(1.0f) - linear;
|
||||
linear = componentPow(linear, gamma);
|
||||
linear *= scale;
|
||||
|
|
@ -1353,7 +1353,7 @@ void LLSettingsSky::calculateLightSettings() const
|
|||
|
||||
F32 haze_horizon = getHazeHorizon();
|
||||
|
||||
sunlight *= 1.0 - cloud_shadow;
|
||||
sunlight *= 1.0f - cloud_shadow;
|
||||
sunlight += tmpAmbient;
|
||||
|
||||
mHazeColor = getBlueHorizon() * getBlueDensity() * sunlight;
|
||||
|
|
@ -1415,22 +1415,22 @@ LLUUID LLSettingsSky::GetDefaultHaloTextureId()
|
|||
|
||||
F32 LLSettingsSky::getPlanetRadius() const
|
||||
{
|
||||
return mSettings[SETTING_PLANET_RADIUS].asReal();
|
||||
return (F32)mSettings[SETTING_PLANET_RADIUS].asReal();
|
||||
}
|
||||
|
||||
F32 LLSettingsSky::getSkyMoistureLevel() const
|
||||
{
|
||||
return mSettings[SETTING_SKY_MOISTURE_LEVEL].asReal();
|
||||
return (F32)mSettings[SETTING_SKY_MOISTURE_LEVEL].asReal();
|
||||
}
|
||||
|
||||
F32 LLSettingsSky::getSkyDropletRadius() const
|
||||
{
|
||||
return mSettings[SETTING_SKY_DROPLET_RADIUS].asReal();
|
||||
return (F32)mSettings[SETTING_SKY_DROPLET_RADIUS].asReal();
|
||||
}
|
||||
|
||||
F32 LLSettingsSky::getSkyIceLevel() const
|
||||
{
|
||||
return mSettings[SETTING_SKY_ICE_LEVEL].asReal();
|
||||
return (F32)mSettings[SETTING_SKY_ICE_LEVEL].asReal();
|
||||
}
|
||||
|
||||
F32 LLSettingsSky::getReflectionProbeAmbiance(bool auto_adjust) const
|
||||
|
|
@ -1440,27 +1440,27 @@ F32 LLSettingsSky::getReflectionProbeAmbiance(bool auto_adjust) const
|
|||
return sAutoAdjustProbeAmbiance;
|
||||
}
|
||||
|
||||
return mSettings[SETTING_REFLECTION_PROBE_AMBIANCE].asReal();
|
||||
return (F32)mSettings[SETTING_REFLECTION_PROBE_AMBIANCE].asReal();
|
||||
}
|
||||
|
||||
F32 LLSettingsSky::getSkyBottomRadius() const
|
||||
{
|
||||
return mSettings[SETTING_SKY_BOTTOM_RADIUS].asReal();
|
||||
return (F32)mSettings[SETTING_SKY_BOTTOM_RADIUS].asReal();
|
||||
}
|
||||
|
||||
F32 LLSettingsSky::getSkyTopRadius() const
|
||||
{
|
||||
return mSettings[SETTING_SKY_TOP_RADIUS].asReal();
|
||||
return (F32)mSettings[SETTING_SKY_TOP_RADIUS].asReal();
|
||||
}
|
||||
|
||||
F32 LLSettingsSky::getSunArcRadians() const
|
||||
{
|
||||
return mSettings[SETTING_SUN_ARC_RADIANS].asReal();
|
||||
return (F32)mSettings[SETTING_SUN_ARC_RADIANS].asReal();
|
||||
}
|
||||
|
||||
F32 LLSettingsSky::getMieAnisotropy() const
|
||||
{
|
||||
return getMieConfig()[SETTING_MIE_ANISOTROPY_FACTOR].asReal();
|
||||
return (F32)getMieConfig()[SETTING_MIE_ANISOTROPY_FACTOR].asReal();
|
||||
}
|
||||
|
||||
LLSD LLSettingsSky::getRayleighConfig() const
|
||||
|
|
@ -1569,7 +1569,7 @@ void LLSettingsSky::setCloudPosDensity2(const LLColor3 &val)
|
|||
|
||||
F32 LLSettingsSky::getCloudScale() const
|
||||
{
|
||||
return mSettings[SETTING_CLOUD_SCALE].asReal();
|
||||
return (F32)mSettings[SETTING_CLOUD_SCALE].asReal();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setCloudScale(F32 val)
|
||||
|
|
@ -1601,7 +1601,7 @@ void LLSettingsSky::setCloudScrollRateY(F32 val)
|
|||
|
||||
F32 LLSettingsSky::getCloudShadow() const
|
||||
{
|
||||
return mSettings[SETTING_CLOUD_SHADOW].asReal();
|
||||
return (F32)mSettings[SETTING_CLOUD_SHADOW].asReal();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setCloudShadow(F32 val)
|
||||
|
|
@ -1611,7 +1611,7 @@ void LLSettingsSky::setCloudShadow(F32 val)
|
|||
|
||||
F32 LLSettingsSky::getCloudVariance() const
|
||||
{
|
||||
return mSettings[SETTING_CLOUD_VARIANCE].asReal();
|
||||
return (F32)mSettings[SETTING_CLOUD_VARIANCE].asReal();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setCloudVariance(F32 val)
|
||||
|
|
@ -1621,7 +1621,7 @@ void LLSettingsSky::setCloudVariance(F32 val)
|
|||
|
||||
F32 LLSettingsSky::getDomeOffset() const
|
||||
{
|
||||
//return mSettings[SETTING_DOME_OFFSET].asReal();
|
||||
//return (F32)mSettings[SETTING_DOME_OFFSET].asReal();
|
||||
return DOME_OFFSET;
|
||||
}
|
||||
|
||||
|
|
@ -1633,7 +1633,7 @@ F32 LLSettingsSky::getDomeRadius() const
|
|||
|
||||
F32 LLSettingsSky::getGamma() const
|
||||
{
|
||||
return mSettings[SETTING_GAMMA].asReal();
|
||||
return (F32)mSettings[SETTING_GAMMA].asReal();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setGamma(F32 val)
|
||||
|
|
@ -1654,7 +1654,7 @@ void LLSettingsSky::setGlow(const LLColor3 &val)
|
|||
|
||||
F32 LLSettingsSky::getMaxY() const
|
||||
{
|
||||
return mSettings[SETTING_MAX_Y].asReal();
|
||||
return (F32)mSettings[SETTING_MAX_Y].asReal();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setMaxY(F32 val)
|
||||
|
|
@ -1674,7 +1674,7 @@ void LLSettingsSky::setMoonRotation(const LLQuaternion &val)
|
|||
|
||||
F32 LLSettingsSky::getMoonScale() const
|
||||
{
|
||||
return mSettings[SETTING_MOON_SCALE].asReal();
|
||||
return (F32)mSettings[SETTING_MOON_SCALE].asReal();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setMoonScale(F32 val)
|
||||
|
|
@ -1692,9 +1692,9 @@ void LLSettingsSky::setMoonTextureId(LLUUID id)
|
|||
setValue(SETTING_MOON_TEXTUREID, id);
|
||||
}
|
||||
|
||||
F32 LLSettingsSky::getMoonBrightness() const
|
||||
F32 LLSettingsSky::getMoonBrightness() const
|
||||
{
|
||||
return mSettings[SETTING_MOON_BRIGHTNESS].asReal();
|
||||
return (F32)mSettings[SETTING_MOON_BRIGHTNESS].asReal();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setMoonBrightness(F32 brightness_factor)
|
||||
|
|
@ -1704,7 +1704,7 @@ void LLSettingsSky::setMoonBrightness(F32 brightness_factor)
|
|||
|
||||
F32 LLSettingsSky::getStarBrightness() const
|
||||
{
|
||||
return mSettings[SETTING_STAR_BRIGHTNESS].asReal();
|
||||
return (F32)mSettings[SETTING_STAR_BRIGHTNESS].asReal();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setStarBrightness(F32 val)
|
||||
|
|
@ -1749,7 +1749,7 @@ void LLSettingsSky::setSunRotation(const LLQuaternion &val)
|
|||
|
||||
F32 LLSettingsSky::getSunScale() const
|
||||
{
|
||||
return mSettings[SETTING_SUN_SCALE].asReal();
|
||||
return (F32)mSettings[SETTING_SUN_SCALE].asReal();
|
||||
}
|
||||
|
||||
void LLSettingsSky::setSunScale(F32 val)
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
//---------------------------------------------------------------------
|
||||
F32 getBlurMultiplier() const
|
||||
{
|
||||
return mSettings[SETTING_BLUR_MULTIPLIER].asReal();
|
||||
return (F32)mSettings[SETTING_BLUR_MULTIPLIER].asReal();
|
||||
}
|
||||
|
||||
void setBlurMultiplier(F32 val)
|
||||
|
|
@ -92,7 +92,7 @@ public:
|
|||
|
||||
F32 getWaterFogDensity() const
|
||||
{
|
||||
return mSettings[SETTING_FOG_DENSITY].asReal();
|
||||
return (F32)mSettings[SETTING_FOG_DENSITY].asReal();
|
||||
}
|
||||
|
||||
F32 getModifiedWaterFogDensity(bool underwater) const;
|
||||
|
|
@ -104,7 +104,7 @@ public:
|
|||
|
||||
F32 getFogMod() const
|
||||
{
|
||||
return mSettings[SETTING_FOG_MOD].asReal();
|
||||
return (F32)mSettings[SETTING_FOG_MOD].asReal();
|
||||
}
|
||||
|
||||
void setFogMod(F32 val)
|
||||
|
|
@ -114,7 +114,7 @@ public:
|
|||
|
||||
F32 getFresnelOffset() const
|
||||
{
|
||||
return mSettings[SETTING_FRESNEL_OFFSET].asReal();
|
||||
return (F32)mSettings[SETTING_FRESNEL_OFFSET].asReal();
|
||||
}
|
||||
|
||||
void setFresnelOffset(F32 val)
|
||||
|
|
@ -124,7 +124,7 @@ public:
|
|||
|
||||
F32 getFresnelScale() const
|
||||
{
|
||||
return mSettings[SETTING_FRESNEL_SCALE].asReal();
|
||||
return (F32)mSettings[SETTING_FRESNEL_SCALE].asReal();
|
||||
}
|
||||
|
||||
void setFresnelScale(F32 val)
|
||||
|
|
@ -164,7 +164,7 @@ public:
|
|||
|
||||
F32 getScaleAbove() const
|
||||
{
|
||||
return mSettings[SETTING_SCALE_ABOVE].asReal();
|
||||
return (F32)mSettings[SETTING_SCALE_ABOVE].asReal();
|
||||
}
|
||||
|
||||
void setScaleAbove(F32 val)
|
||||
|
|
@ -174,7 +174,7 @@ public:
|
|||
|
||||
F32 getScaleBelow() const
|
||||
{
|
||||
return mSettings[SETTING_SCALE_BELOW].asReal();
|
||||
return (F32)mSettings[SETTING_SCALE_BELOW].asReal();
|
||||
}
|
||||
|
||||
void setScaleBelow(F32 val)
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ LLPointer<LLInventoryItem> create_random_inventory_item()
|
|||
S32 price = rand();
|
||||
LLSaleInfo sale_info(LLSaleInfo::FS_COPY, price);
|
||||
U32 flags = rand();
|
||||
S32 creation = time(NULL);
|
||||
S32 creation = (S32)time(NULL);
|
||||
|
||||
LLPointer<LLInventoryItem> item = new LLInventoryItem(
|
||||
item_id,
|
||||
|
|
@ -195,7 +195,7 @@ namespace tut
|
|||
src->setSaleInfo(new_sale_info);
|
||||
|
||||
U32 new_flags = rand();
|
||||
S32 new_creation = time(NULL);
|
||||
S32 new_creation = (S32)time(NULL);
|
||||
|
||||
LLPermissions new_perm;
|
||||
|
||||
|
|
@ -266,7 +266,7 @@ namespace tut
|
|||
src->setSaleInfo(new_sale_info);
|
||||
|
||||
U32 new_flags = rand();
|
||||
S32 new_creation = time(NULL);
|
||||
S32 new_creation = (S32)time(NULL);
|
||||
|
||||
LLPermissions new_perm;
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ private:
|
|||
F32 _exp(const F32& a) const { return exp(a); }
|
||||
F32 _fabs(const F32& a) const { return fabs(a); }
|
||||
F32 _floor(const F32& a) const { return (F32)llfloor(a); }
|
||||
F32 _ceil(const F32& a) const { return llceil(a); }
|
||||
F32 _ceil(const F32& a) const { return (F32)llceil(a); }
|
||||
F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); }
|
||||
|
||||
LLCalc::calc_map_t* mConstants;
|
||||
|
|
|
|||
|
|
@ -186,10 +186,10 @@ inline LLSD LLQuaternion::getValue() const
|
|||
|
||||
inline void LLQuaternion::setValue(const LLSD& sd)
|
||||
{
|
||||
mQ[0] = sd[0].asReal();
|
||||
mQ[1] = sd[1].asReal();
|
||||
mQ[2] = sd[2].asReal();
|
||||
mQ[3] = sd[3].asReal();
|
||||
mQ[0] = (F32)sd[0].asReal();
|
||||
mQ[1] = (F32)sd[1].asReal();
|
||||
mQ[2] = (F32)sd[2].asReal();
|
||||
mQ[3] = (F32)sd[3].asReal();
|
||||
}
|
||||
|
||||
// checker
|
||||
|
|
|
|||
|
|
@ -517,9 +517,9 @@ inline const LLVector3 linearColor3v(const T& a) {
|
|||
template<typename T>
|
||||
const LLColor3& LLColor3::set(const std::vector<T>& v)
|
||||
{
|
||||
for (S32 i = 0; i < llmin((S32)v.size(), 3); ++i)
|
||||
for (size_t i = 0; i < llmin(v.size(), 3); ++i)
|
||||
{
|
||||
mV[i] = v[i];
|
||||
mV[i] = (F32)v[i];
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
|
@ -530,9 +530,9 @@ const LLColor3& LLColor3::set(const std::vector<T>& v)
|
|||
template<typename T>
|
||||
void LLColor3::write(std::vector<T>& v) const
|
||||
{
|
||||
for (int i = 0; i < llmin((S32)v.size(), 3); ++i)
|
||||
for (size_t i = 0; i < llmin(v.size(), 3); ++i)
|
||||
{
|
||||
v[i] = mV[i];
|
||||
v[i] = (T)mV[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -702,9 +702,9 @@ inline const LLColor4 linearColor4(const LLColor4 &a)
|
|||
template<typename T>
|
||||
const LLColor4& LLColor4::set(const std::vector<T>& v)
|
||||
{
|
||||
for (S32 i = 0; i < llmin((S32)v.size(), 4); ++i)
|
||||
for (size_t i = 0; i < llmin(v.size(), 4); ++i)
|
||||
{
|
||||
mV[i] = v[i];
|
||||
mV[i] = (F32)v[i];
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
|
@ -713,9 +713,9 @@ const LLColor4& LLColor4::set(const std::vector<T>& v)
|
|||
template<typename T>
|
||||
void LLColor4::write(std::vector<T>& v) const
|
||||
{
|
||||
for (int i = 0; i < llmin((S32)v.size(), 4); ++i)
|
||||
for (size_t i = 0; i < llmin(v.size(), 4); ++i)
|
||||
{
|
||||
v[i] = mV[i];
|
||||
v[i] = (T)mV[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ class LLVector4
|
|||
|
||||
void setValue(const LLSD& sd)
|
||||
{
|
||||
mV[0] = sd[0].asReal();
|
||||
mV[1] = sd[1].asReal();
|
||||
mV[2] = sd[2].asReal();
|
||||
mV[3] = sd[3].asReal();
|
||||
mV[0] = (F32)sd[0].asReal();
|
||||
mV[1] = (F32)sd[1].asReal();
|
||||
mV[2] = (F32)sd[2].asReal();
|
||||
mV[3] = (F32)sd[3].asReal();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ LLHeapBuffer::~LLHeapBuffer()
|
|||
|
||||
S32 LLHeapBuffer::bytesLeft() const
|
||||
{
|
||||
return (mSize - (mNextFree - mBuffer));
|
||||
return (mSize - (S32)(mNextFree - mBuffer));
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -371,11 +371,11 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
|
|||
return it;
|
||||
}
|
||||
S32 channel = (*it).getChannel();
|
||||
LLSegment segment1(channel, base, (address - base) + 1);
|
||||
LLSegment segment1(channel, base, (S32)((address - base) + 1));
|
||||
*it = segment1;
|
||||
segment_iterator_t rv = it;
|
||||
++it;
|
||||
LLSegment segment2(channel, address + 1, size - (address - base) - 1);
|
||||
LLSegment segment2(channel, address + 1, (S32)(size - (address - base) - 1));
|
||||
mSegments.insert(it, segment2);
|
||||
return rv;
|
||||
}
|
||||
|
|
@ -424,7 +424,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
|
|||
segment = LLSegment(
|
||||
(*rv).getChannel(),
|
||||
address,
|
||||
(*rv).size() - (address - (*rv).data()));
|
||||
(*rv).size() - (S32)(address - (*rv).data()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -533,7 +533,7 @@ S32 LLBufferArray::countAfter(S32 channel, U8* start) const
|
|||
if(++start < ((*it).data() + (*it).size()))
|
||||
{
|
||||
// it's in the same segment
|
||||
offset = start - (*it).data();
|
||||
offset = (S32)(start - (*it).data());
|
||||
}
|
||||
else if(++it == end)
|
||||
{
|
||||
|
|
@ -586,7 +586,7 @@ U8* LLBufferArray::readAfter(
|
|||
&& (*it).isOnChannel(channel))
|
||||
{
|
||||
// copy the data out of this segment
|
||||
S32 bytes_in_segment = (*it).size() - (start - (*it).data());
|
||||
S32 bytes_in_segment = (*it).size() - (S32)(start - (*it).data());
|
||||
bytes_to_copy = llmin(bytes_left, bytes_in_segment);
|
||||
memcpy(dest, start, bytes_to_copy); /*Flawfinder: ignore*/
|
||||
len += bytes_to_copy;
|
||||
|
|
@ -681,7 +681,7 @@ U8* LLBufferArray::seek(
|
|||
{
|
||||
if(delta > 0)
|
||||
{
|
||||
S32 bytes_in_segment = (*it).size() - (start - (*it).data());
|
||||
S32 bytes_in_segment = (*it).size() - (S32)(start - (*it).data());
|
||||
S32 local_delta = llmin(delta, bytes_in_segment);
|
||||
rv += local_delta;
|
||||
delta -= local_delta;
|
||||
|
|
@ -689,7 +689,7 @@ U8* LLBufferArray::seek(
|
|||
}
|
||||
else
|
||||
{
|
||||
S32 bytes_in_segment = start - (*it).data();
|
||||
S32 bytes_in_segment = (S32)(start - (*it).data());
|
||||
S32 local_delta = llmin(llabs(delta), bytes_in_segment);
|
||||
rv -= local_delta;
|
||||
delta += local_delta;
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ streampos LLBufferStreamBuf::seekoff(
|
|||
}
|
||||
|
||||
LLMutexLock lock(mBuffer->getMutex());
|
||||
address = mBuffer->seek(mChannels.in(), base_addr, off);
|
||||
address = mBuffer->seek(mChannels.in(), base_addr, (S32)off);
|
||||
if(address)
|
||||
{
|
||||
LLBufferArray::segment_iterator_t iter;
|
||||
|
|
@ -306,7 +306,7 @@ streampos LLBufferStreamBuf::seekoff(
|
|||
}
|
||||
|
||||
LLMutexLock lock(mBuffer->getMutex());
|
||||
address = mBuffer->seek(mChannels.out(), base_addr, off);
|
||||
address = mBuffer->seek(mChannels.out(), base_addr, (S32)off);
|
||||
if(address)
|
||||
{
|
||||
LLBufferArray::segment_iterator_t iter;
|
||||
|
|
|
|||
|
|
@ -525,13 +525,13 @@ void LLCircuitData::checkPeriodTime()
|
|||
F64Seconds period_length = mt_sec - mPeriodTime;
|
||||
if ( period_length > TARGET_PERIOD_LENGTH)
|
||||
{
|
||||
F32 bps_in = F32Bits(mBytesInThisPeriod).value() / period_length.value();
|
||||
F32 bps_in = F32Bits(mBytesInThisPeriod).value() / (F32)period_length.value();
|
||||
if (bps_in > mPeakBPSIn)
|
||||
{
|
||||
mPeakBPSIn = bps_in;
|
||||
}
|
||||
|
||||
F32 bps_out = F32Bits(mBytesOutThisPeriod).value() / period_length.value();
|
||||
F32 bps_out = F32Bits(mBytesOutThisPeriod).value() / (F32)period_length.value();
|
||||
if (bps_out > mPeakBPSOut)
|
||||
{
|
||||
mPeakBPSOut = bps_out;
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ bool LLHTTPResponder::readHeaderLine(
|
|||
}
|
||||
return false;
|
||||
}
|
||||
S32 offset = -((len - 1) - (newline - dest));
|
||||
S32 offset = -((len - 1) - (S32)(newline - dest));
|
||||
++newline;
|
||||
*newline = '\0';
|
||||
mLastRead = buffer->seek(channels.in(), last, offset);
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S
|
|||
{
|
||||
if (strcmp(COMMON_PROFILE_INPUT_POSITION, v_inp[k]->getSemantic()) == 0)
|
||||
{
|
||||
pos_offset = inputs[j]->getOffset();
|
||||
pos_offset = (S32)inputs[j]->getOffset();
|
||||
|
||||
const domURIFragmentType& uri = v_inp[k]->getSource();
|
||||
daeElementRef elem = uri.getElement();
|
||||
|
|
@ -116,7 +116,7 @@ bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S
|
|||
|
||||
if (strcmp(COMMON_PROFILE_INPUT_NORMAL, v_inp[k]->getSemantic()) == 0)
|
||||
{
|
||||
norm_offset = inputs[j]->getOffset();
|
||||
norm_offset = (S32)inputs[j]->getOffset();
|
||||
|
||||
const domURIFragmentType& uri = v_inp[k]->getSource();
|
||||
daeElementRef elem = uri.getElement();
|
||||
|
|
@ -128,14 +128,14 @@ bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S
|
|||
if (strcmp(COMMON_PROFILE_INPUT_NORMAL, inputs[j]->getSemantic()) == 0)
|
||||
{
|
||||
//found normal array for this triangle list
|
||||
norm_offset = inputs[j]->getOffset();
|
||||
norm_offset = (S32)inputs[j]->getOffset();
|
||||
const domURIFragmentType& uri = inputs[j]->getSource();
|
||||
daeElementRef elem = uri.getElement();
|
||||
norm_source = (domSource*) elem.cast();
|
||||
}
|
||||
else if (strcmp(COMMON_PROFILE_INPUT_TEXCOORD, inputs[j]->getSemantic()) == 0)
|
||||
{ //found texCoords
|
||||
tc_offset = inputs[j]->getOffset();
|
||||
tc_offset = (S32)inputs[j]->getOffset();
|
||||
const domURIFragmentType& uri = inputs[j]->getSource();
|
||||
daeElementRef elem = uri.getElement();
|
||||
tc_source = (domSource*) elem.cast();
|
||||
|
|
@ -201,8 +201,8 @@ LLModel::EModelStatus load_face_from_dom_triangles(
|
|||
return LLModel::BAD_ELEMENT;
|
||||
}
|
||||
// VFExtents change
|
||||
face.mExtents[0].set(v[0], v[1], v[2]);
|
||||
face.mExtents[1].set(v[0], v[1], v[2]);
|
||||
face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]);
|
||||
face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]);
|
||||
}
|
||||
|
||||
LLVolumeFace::VertexMapData::PointMap point_map;
|
||||
|
|
@ -223,22 +223,22 @@ LLModel::EModelStatus load_face_from_dom_triangles(
|
|||
LLVolumeFace::VertexData cv;
|
||||
if (pos_source)
|
||||
{
|
||||
cv.setPosition(LLVector4a(v[idx[i+pos_offset]*3+0],
|
||||
v[idx[i+pos_offset]*3+1],
|
||||
v[idx[i+pos_offset]*3+2]));
|
||||
cv.setPosition(LLVector4a((F32)v[idx[i+pos_offset]*3+0],
|
||||
(F32)v[idx[i+pos_offset]*3+1],
|
||||
(F32)v[idx[i+pos_offset]*3+2]));
|
||||
}
|
||||
|
||||
if (tc_source)
|
||||
{
|
||||
cv.mTexCoord.setVec(tc[idx[i+tc_offset]*2+0],
|
||||
tc[idx[i+tc_offset]*2+1]);
|
||||
cv.mTexCoord.setVec((F32)tc[idx[i+tc_offset]*2+0],
|
||||
(F32)tc[idx[i+tc_offset]*2+1]);
|
||||
}
|
||||
|
||||
if (norm_source)
|
||||
{
|
||||
cv.setNormal(LLVector4a(n[idx[i+norm_offset]*3+0],
|
||||
n[idx[i+norm_offset]*3+1],
|
||||
n[idx[i+norm_offset]*3+2]));
|
||||
cv.setNormal(LLVector4a((F32)n[idx[i+norm_offset]*3+0],
|
||||
(F32)n[idx[i+norm_offset]*3+1],
|
||||
(F32)n[idx[i+norm_offset]*3+2]));
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
|
|
@ -326,8 +326,8 @@ LLModel::EModelStatus load_face_from_dom_triangles(
|
|||
|
||||
face = LLVolumeFace();
|
||||
// VFExtents change
|
||||
face.mExtents[0].set(v[0], v[1], v[2]);
|
||||
face.mExtents[1].set(v[0], v[1], v[2]);
|
||||
face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]);
|
||||
face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]);
|
||||
|
||||
verts.clear();
|
||||
indices.clear();
|
||||
|
|
@ -416,8 +416,8 @@ LLModel::EModelStatus load_face_from_dom_polylist(
|
|||
{
|
||||
v = pos_source->getFloat_array()->getValue();
|
||||
// VFExtents change
|
||||
face.mExtents[0].set(v[0], v[1], v[2]);
|
||||
face.mExtents[1].set(v[0], v[1], v[2]);
|
||||
face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]);
|
||||
face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]);
|
||||
}
|
||||
|
||||
if (tc_source)
|
||||
|
|
@ -445,9 +445,9 @@ LLModel::EModelStatus load_face_from_dom_polylist(
|
|||
|
||||
if (pos_source)
|
||||
{
|
||||
cv.getPosition().set(v[idx[cur_idx+pos_offset]*3+0],
|
||||
v[idx[cur_idx+pos_offset]*3+1],
|
||||
v[idx[cur_idx+pos_offset]*3+2]);
|
||||
cv.getPosition().set((F32)v[idx[cur_idx+pos_offset]*3+0],
|
||||
(F32)v[idx[cur_idx+pos_offset]*3+1],
|
||||
(F32)v[idx[cur_idx+pos_offset]*3+2]);
|
||||
if (!cv.getPosition().isFinite3())
|
||||
{
|
||||
LL_WARNS() << "Found NaN while loading position data from DAE-Model, invalid model." << LL_ENDL;
|
||||
|
|
@ -465,7 +465,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(
|
|||
|
||||
if (idx_y < tc.getCount())
|
||||
{
|
||||
cv.mTexCoord.setVec(tc[idx_x], tc[idx_y]);
|
||||
cv.mTexCoord.setVec((F32)tc[idx_x], (F32)tc[idx_y]);
|
||||
}
|
||||
else if (log_tc_msg)
|
||||
{
|
||||
|
|
@ -479,9 +479,9 @@ LLModel::EModelStatus load_face_from_dom_polylist(
|
|||
|
||||
if (norm_source)
|
||||
{
|
||||
cv.getNormal().set(n[idx[cur_idx+norm_offset]*3+0],
|
||||
n[idx[cur_idx+norm_offset]*3+1],
|
||||
n[idx[cur_idx+norm_offset]*3+2]);
|
||||
cv.getNormal().set((F32)n[idx[cur_idx+norm_offset]*3+0],
|
||||
(F32)n[idx[cur_idx+norm_offset]*3+1],
|
||||
(F32)n[idx[cur_idx+norm_offset]*3+2]);
|
||||
|
||||
if (!cv.getNormal().isFinite3())
|
||||
{
|
||||
|
|
@ -607,8 +607,8 @@ LLModel::EModelStatus load_face_from_dom_polylist(
|
|||
|
||||
face = LLVolumeFace();
|
||||
// VFExtents change
|
||||
face.mExtents[0].set(v[0], v[1], v[2]);
|
||||
face.mExtents[1].set(v[0], v[1], v[2]);
|
||||
face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]);
|
||||
face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]);
|
||||
verts.clear();
|
||||
indices.clear();
|
||||
point_map.clear();
|
||||
|
|
@ -669,7 +669,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
|||
|
||||
if (strcmp(COMMON_PROFILE_INPUT_VERTEX, inputs[i]->getSemantic()) == 0)
|
||||
{ //found vertex array
|
||||
v_offset = inputs[i]->getOffset();
|
||||
v_offset = (S32)inputs[i]->getOffset();
|
||||
|
||||
const domURIFragmentType& uri = inputs[i]->getSource();
|
||||
daeElementRef elem = uri.getElement();
|
||||
|
|
@ -697,7 +697,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
|||
}
|
||||
else if (strcmp(COMMON_PROFILE_INPUT_NORMAL, inputs[i]->getSemantic()) == 0)
|
||||
{
|
||||
n_offset = inputs[i]->getOffset();
|
||||
n_offset = (S32)inputs[i]->getOffset();
|
||||
//found normal array for this triangle list
|
||||
const domURIFragmentType& uri = inputs[i]->getSource();
|
||||
daeElementRef elem = uri.getElement();
|
||||
|
|
@ -710,7 +710,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
|||
}
|
||||
else if (strcmp(COMMON_PROFILE_INPUT_TEXCOORD, inputs[i]->getSemantic()) == 0 && inputs[i]->getSet() == 0)
|
||||
{ //found texCoords
|
||||
t_offset = inputs[i]->getOffset();
|
||||
t_offset = (S32)inputs[i]->getOffset();
|
||||
const domURIFragmentType& uri = inputs[i]->getSource();
|
||||
daeElementRef elem = uri.getElement();
|
||||
domSource* src = (domSource*) elem.cast();
|
||||
|
|
@ -745,11 +745,11 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
|||
|
||||
if (v)
|
||||
{
|
||||
U32 v_idx = idx[j*stride+v_offset]*3;
|
||||
U32 v_idx = (U32)idx[j*stride+v_offset]*3;
|
||||
v_idx = llclamp(v_idx, (U32) 0, (U32) v->getCount());
|
||||
vert.getPosition().set(v->get(v_idx),
|
||||
v->get(v_idx+1),
|
||||
v->get(v_idx+2));
|
||||
vert.getPosition().set((F32)v->get(v_idx),
|
||||
(F32)v->get(v_idx+1),
|
||||
(F32)v->get(v_idx+2));
|
||||
}
|
||||
|
||||
//bounds check n and t lookups because some FBX to DAE converters
|
||||
|
|
@ -757,11 +757,11 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
|||
//for a particular channel
|
||||
if (n && n->getCount() > 0)
|
||||
{
|
||||
U32 n_idx = idx[j*stride+n_offset]*3;
|
||||
U32 n_idx = (U32)idx[j*stride+n_offset]*3;
|
||||
n_idx = llclamp(n_idx, (U32) 0, (U32) n->getCount());
|
||||
vert.getNormal().set(n->get(n_idx),
|
||||
n->get(n_idx+1),
|
||||
n->get(n_idx+2));
|
||||
vert.getNormal().set((F32)n->get(n_idx),
|
||||
(F32)n->get(n_idx+1),
|
||||
(F32)n->get(n_idx+2));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -771,10 +771,10 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
|||
|
||||
if (t && t->getCount() > 0)
|
||||
{
|
||||
U32 t_idx = idx[j*stride+t_offset]*2;
|
||||
U32 t_idx = (U32)idx[j*stride+t_offset]*2;
|
||||
t_idx = llclamp(t_idx, (U32) 0, (U32) t->getCount());
|
||||
vert.mTexCoord.setVec(t->get(t_idx),
|
||||
t->get(t_idx+1));
|
||||
vert.mTexCoord.setVec((F32)t->get(t_idx),
|
||||
(F32)t->get(t_idx+1));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1026,7 +1026,7 @@ bool LLDAELoader::OpenFile(const std::string& filename)
|
|||
|
||||
if (unit)
|
||||
{
|
||||
F32 meter = unit->getMeter();
|
||||
F32 meter = (F32)unit->getMeter();
|
||||
mTransform.mMatrix[0][0] = meter;
|
||||
mTransform.mMatrix[1][1] = meter;
|
||||
mTransform.mMatrix[2][2] = meter;
|
||||
|
|
@ -1241,7 +1241,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
|
|||
{
|
||||
for(int j = 0; j < 4; j++)
|
||||
{
|
||||
mat.mMatrix[i][j] = dom_value[i + j*4];
|
||||
mat.mMatrix[i][j] = (F32)dom_value[i + j*4];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1463,7 +1463,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
|
|||
{
|
||||
for(int j = 0; j < 4; j++)
|
||||
{
|
||||
mat.mMatrix[i][j] = transform[k*16 + i + j*4];
|
||||
mat.mMatrix[i][j] = (F32)transform[k*16 + i + j*4];
|
||||
}
|
||||
}
|
||||
model->mSkinInfo.mInvBindMatrix.push_back(LLMatrix4a(mat));
|
||||
|
|
@ -1581,7 +1581,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
|
|||
LL_ERRS() << "Invalid position array size." << LL_ENDL;
|
||||
}
|
||||
|
||||
LLVector3 v(pos[j], pos[j+1], pos[j+2]);
|
||||
LLVector3 v((F32)pos[j], (F32)pos[j+1], (F32)pos[j+2]);
|
||||
|
||||
//transform from COLLADA space to volume space
|
||||
v = v * inverse_normalized_transformation;
|
||||
|
|
@ -1621,15 +1621,15 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
|
|||
U32 c_idx = 0;
|
||||
for (size_t vc_idx = 0; vc_idx < vcount.getCount(); ++vc_idx)
|
||||
{ //for each vertex
|
||||
daeUInt count = vcount[vc_idx];
|
||||
daeUInt count = (daeUInt)vcount[vc_idx];
|
||||
|
||||
//create list of weights that influence this vertex
|
||||
LLModel::weight_list weight_list;
|
||||
|
||||
for (daeUInt i = 0; i < count; ++i)
|
||||
{ //for each weight
|
||||
daeInt joint_idx = v[c_idx++];
|
||||
daeInt weight_idx = v[c_idx++];
|
||||
daeInt joint_idx = (daeInt)v[c_idx++];
|
||||
daeInt weight_idx = (daeInt)v[c_idx++];
|
||||
|
||||
if (joint_idx == -1)
|
||||
{
|
||||
|
|
@ -1637,7 +1637,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
|
|||
continue;
|
||||
}
|
||||
|
||||
F32 weight_value = w[weight_idx];
|
||||
F32 weight_value = (F32)w[weight_idx];
|
||||
|
||||
weight_list.push_back(LLModel::JointWeight(joint_idx, weight_value));
|
||||
}
|
||||
|
|
@ -1807,7 +1807,7 @@ bool LLDAELoader::verifyController( domController* pController )
|
|||
{
|
||||
//Skin is reference directly by geometry and get the vertex count from skin
|
||||
domSkin::domVertex_weights* pVertexWeights = pSkin->getVertex_weights();
|
||||
U32 vertexWeightsCount = pVertexWeights->getCount();
|
||||
U32 vertexWeightsCount = (U32)pVertexWeights->getCount();
|
||||
domGeometry* pGeometry = (domGeometry*) (domElement*) uri.getElement();
|
||||
domMesh* pMesh = pGeometry->getMesh();
|
||||
|
||||
|
|
@ -1825,7 +1825,7 @@ bool LLDAELoader::verifyController( domController* pController )
|
|||
{
|
||||
xsAnyURI src = pVertices->getInput_array()[0]->getSource();
|
||||
domSource* pSource = (domSource*) (domElement*) src.getElement();
|
||||
U32 verticesCount = pSource->getTechnique_common()->getAccessor()->getCount();
|
||||
U32 verticesCount = (U32)pSource->getTechnique_common()->getAccessor()->getCount();
|
||||
result = verifyCount( verticesCount, vertexWeightsCount );
|
||||
if ( !result )
|
||||
{
|
||||
|
|
@ -1845,7 +1845,7 @@ bool LLDAELoader::verifyController( domController* pController )
|
|||
U32 sum = 0;
|
||||
for (size_t i=0; i<vcountCount; i++)
|
||||
{
|
||||
sum += pVertexWeights->getVcount()->getValue()[i];
|
||||
sum += (U32)pVertexWeights->getVcount()->getValue()[i];
|
||||
}
|
||||
result = verifyCount( sum * static_cast<U32>(inputs.getCount()), (domInt) static_cast<int>(pVertexWeights->getV()->getValue().getCount()) );
|
||||
}
|
||||
|
|
@ -1860,7 +1860,7 @@ bool LLDAELoader::verifyController( domController* pController )
|
|||
void LLDAELoader::extractTranslation( domTranslate* pTranslate, LLMatrix4& transform )
|
||||
{
|
||||
domFloat3 jointTrans = pTranslate->getValue();
|
||||
LLVector3 singleJointTranslation( jointTrans[0], jointTrans[1], jointTrans[2] );
|
||||
LLVector3 singleJointTranslation((F32)jointTrans[0], (F32)jointTrans[1], (F32)jointTrans[2]);
|
||||
transform.setTranslation( singleJointTranslation );
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -1872,7 +1872,7 @@ void LLDAELoader::extractTranslationViaElement( daeElement* pTranslateElement, L
|
|||
{
|
||||
domTranslate* pTranslateChild = static_cast<domTranslate*>( pTranslateElement );
|
||||
domFloat3 translateChild = pTranslateChild->getValue();
|
||||
LLVector3 singleJointTranslation( translateChild[0], translateChild[1], translateChild[2] );
|
||||
LLVector3 singleJointTranslation((F32)translateChild[0], (F32)translateChild[1], (F32)translateChild[2]);
|
||||
transform.setTranslation( singleJointTranslation );
|
||||
}
|
||||
}
|
||||
|
|
@ -1894,7 +1894,7 @@ void LLDAELoader::extractTranslationViaSID( daeElement* pElement, LLMatrix4& tra
|
|||
{
|
||||
for( int j = 0; j < 4; j++ )
|
||||
{
|
||||
workingTransform.mMatrix[i][j] = domArray[i + j*4];
|
||||
workingTransform.mMatrix[i][j] = (F32)domArray[i + j*4];
|
||||
}
|
||||
}
|
||||
LLVector3 trans = workingTransform.getTranslation();
|
||||
|
|
@ -1957,7 +1957,7 @@ void LLDAELoader::processJointNode( domNode* pNode, JointTransformMap& jointTran
|
|||
{
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
workingTransform.mMatrix[i][j] = domArray[i + j * 4];
|
||||
workingTransform.mMatrix[i][j] = (F32)domArray[i + j * 4];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2023,7 +2023,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
|
|||
domFloat3 dom_value = translate->getValue();
|
||||
|
||||
LLMatrix4 translation;
|
||||
translation.setTranslation(LLVector3(dom_value[0], dom_value[1], dom_value[2]));
|
||||
translation.setTranslation(LLVector3((F32)dom_value[0], (F32)dom_value[1], (F32)dom_value[2]));
|
||||
|
||||
translation *= mTransform;
|
||||
mTransform = translation;
|
||||
|
|
@ -2036,7 +2036,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
|
|||
domFloat4 dom_value = rotate->getValue();
|
||||
|
||||
LLMatrix4 rotation;
|
||||
rotation.initRotTrans(dom_value[3] * DEG_TO_RAD, LLVector3(dom_value[0], dom_value[1], dom_value[2]), LLVector3(0, 0, 0));
|
||||
rotation.initRotTrans((F32)dom_value[3] * DEG_TO_RAD, LLVector3((F32)dom_value[0], (F32)dom_value[1], (F32)dom_value[2]), LLVector3(0, 0, 0));
|
||||
|
||||
rotation *= mTransform;
|
||||
mTransform = rotation;
|
||||
|
|
@ -2049,7 +2049,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
|
|||
domFloat3 dom_value = scale->getValue();
|
||||
|
||||
|
||||
LLVector3 scale_vector = LLVector3(dom_value[0], dom_value[1], dom_value[2]);
|
||||
LLVector3 scale_vector = LLVector3((F32)dom_value[0], (F32)dom_value[1], (F32)dom_value[2]);
|
||||
scale_vector.abs(); // Set all values positive, since we don't currently support mirrored meshes
|
||||
LLMatrix4 scaling;
|
||||
scaling.initScale(scale_vector);
|
||||
|
|
@ -2070,7 +2070,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
|
|||
{
|
||||
for(int j = 0; j < 4; j++)
|
||||
{
|
||||
matrix_transform.mMatrix[i][j] = dom_value[i + j*4];
|
||||
matrix_transform.mMatrix[i][j] = (F32)dom_value[i + j*4];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2338,7 +2338,7 @@ LLImportMaterial LLDAELoader::profileToMaterial(domProfile_COMMON* material, DAE
|
|||
if (color)
|
||||
{
|
||||
domFx_color_common domfx_color = color->getValue();
|
||||
LLColor4 value = LLColor4(domfx_color[0], domfx_color[1], domfx_color[2], domfx_color[3]);
|
||||
LLColor4 value = LLColor4((F32)domfx_color[0], (F32)domfx_color[1], (F32)domfx_color[2], (F32)domfx_color[3]);
|
||||
mat.mDiffuseColor = value;
|
||||
}
|
||||
}
|
||||
|
|
@ -2450,7 +2450,7 @@ LLColor4 LLDAELoader::getDaeColor(daeElement* element)
|
|||
if (color)
|
||||
{
|
||||
domFx_color_common domfx_color = color->getValue();
|
||||
value = LLColor4(domfx_color[0], domfx_color[1], domfx_color[2], domfx_color[3]);
|
||||
value = LLColor4((F32)domfx_color[0], (F32)domfx_color[1], (F32)domfx_color[2], (F32)domfx_color[3]);
|
||||
}
|
||||
|
||||
return value;
|
||||
|
|
|
|||
|
|
@ -790,7 +790,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data)
|
|||
const LLSD& mf = data["mf"];
|
||||
if (mf.isReal())
|
||||
{
|
||||
mMetallicFactor = mf.asReal();
|
||||
mMetallicFactor = (F32)mf.asReal();
|
||||
if (mMetallicFactor == getDefaultMetallicFactor())
|
||||
{
|
||||
// HACK -- nudge by epsilon if we receive a default value (indicates override to default)
|
||||
|
|
@ -801,7 +801,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data)
|
|||
const LLSD& rf = data["rf"];
|
||||
if (rf.isReal())
|
||||
{
|
||||
mRoughnessFactor = rf.asReal();
|
||||
mRoughnessFactor = (F32)rf.asReal();
|
||||
if (mRoughnessFactor == getDefaultRoughnessFactor())
|
||||
{
|
||||
// HACK -- nudge by epsilon if we receive a default value (indicates override to default)
|
||||
|
|
@ -819,7 +819,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data)
|
|||
const LLSD& ac = data["ac"];
|
||||
if (ac.isReal())
|
||||
{
|
||||
mAlphaCutoff = ac.asReal();
|
||||
mAlphaCutoff = (F32)ac.asReal();
|
||||
if (mAlphaCutoff == getDefaultAlphaCutoff())
|
||||
{
|
||||
// HACK -- nudge by epsilon if we receive a default value (indicates override to default)
|
||||
|
|
@ -854,7 +854,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data)
|
|||
const LLSD& r = ti[i]["r"];
|
||||
if (r.isReal())
|
||||
{
|
||||
mTextureTransform[i].mRotation = r.asReal();
|
||||
mTextureTransform[i].mRotation = (F32)r.asReal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1487,7 +1487,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
|
|||
{
|
||||
for (U32 k = 0; k < 4; k++)
|
||||
{
|
||||
mat.mMatrix[j][k] = skin["inverse_bind_matrix"][i][j*4+k].asReal();
|
||||
mat.mMatrix[j][k] = (F32)skin["inverse_bind_matrix"][i][j*4+k].asReal();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1510,7 +1510,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
|
|||
{
|
||||
for (U32 k = 0; k < 4; k++)
|
||||
{
|
||||
mat.mMatrix[j][k] = skin["bind_shape_matrix"][j*4+k].asReal();
|
||||
mat.mMatrix[j][k] = (F32)skin["bind_shape_matrix"][j*4+k].asReal();
|
||||
}
|
||||
}
|
||||
mBindShapeMatrix.loadu(mat);
|
||||
|
|
@ -1525,7 +1525,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
|
|||
{
|
||||
for (U32 k = 0; k < 4; k++)
|
||||
{
|
||||
mat.mMatrix[j][k] = skin["alt_inverse_bind_matrix"][i][j*4+k].asReal();
|
||||
mat.mMatrix[j][k] = (F32)skin["alt_inverse_bind_matrix"][i][j*4+k].asReal();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1535,7 +1535,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
|
|||
|
||||
if (skin.has("pelvis_offset"))
|
||||
{
|
||||
mPelvisOffset = skin["pelvis_offset"].asReal();
|
||||
mPelvisOffset = (F32)skin["pelvis_offset"].asReal();
|
||||
}
|
||||
|
||||
if (skin.has("lock_scale_if_joint_position"))
|
||||
|
|
@ -1618,7 +1618,7 @@ void LLMeshSkinInfo::updateHash()
|
|||
|
||||
for (size_t i = 0, count = mInvBindMatrix.size() * 16; i < count; ++i)
|
||||
{
|
||||
S32 t = llround(src[i] * 10000.f);
|
||||
S32 t = ll_round(src[i] * 10000.f);
|
||||
hash.update((const void*)&t, sizeof(S32));
|
||||
}
|
||||
//hash.update((const void*)mInvBindMatrix.data(), sizeof(LLMatrix4a) * mInvBindMatrix.size());
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ F32 LLTreeParams::ShapeRatio(EShapeRatio shape, F32 ratio)
|
|||
case (SR_SPHERICAL):
|
||||
return (.2f + .8f * sinf(F_PI*ratio));
|
||||
case (SR_HEMISPHERICAL):
|
||||
return (.2f + .8f * sinf(.5*F_PI*ratio));
|
||||
return (.2f + .8f * sinf(.5f*F_PI*ratio));
|
||||
case (SR_CYLINDRICAL):
|
||||
return (1);
|
||||
case (SR_TAPERED_CYLINDRICAL):
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ unsigned long ft_read_cb(FT_Stream stream, unsigned long offset, unsigned char *
|
|||
llifstream *file_stream = static_cast<llifstream *>(stream->descriptor.pointer);
|
||||
file_stream->seekg(offset, std::ios::beg);
|
||||
file_stream->read((char*)buffer, count);
|
||||
return file_stream->gcount();
|
||||
return (unsigned long)file_stream->gcount();
|
||||
}
|
||||
|
||||
void ft_close_cb(FT_Stream stream) {
|
||||
|
|
|
|||
|
|
@ -136,18 +136,18 @@ FT_Error LLFontFreeTypeSvgRenderer::OnPresetGlypthSlot(FT_GlyphSlot glyph_slot,
|
|||
float svg_scale = llmin(svg_x_scale, svg_y_scale);
|
||||
datap->Scale = svg_scale;
|
||||
|
||||
glyph_slot->bitmap.width = floorf(svg_width) * svg_scale;
|
||||
glyph_slot->bitmap.rows = floorf(svg_height) * svg_scale;
|
||||
glyph_slot->bitmap.width = (unsigned int)(floorf(svg_width) * svg_scale);
|
||||
glyph_slot->bitmap.rows = (unsigned int)(floorf(svg_height) * svg_scale);
|
||||
glyph_slot->bitmap_left = (document->metrics.x_ppem - glyph_slot->bitmap.width) / 2;
|
||||
glyph_slot->bitmap_top = glyph_slot->face->size->metrics.ascender / 64.f;
|
||||
glyph_slot->bitmap_top = (FT_Int)(glyph_slot->face->size->metrics.ascender / 64.f);
|
||||
glyph_slot->bitmap.pitch = glyph_slot->bitmap.width * 4;
|
||||
glyph_slot->bitmap.pixel_mode = FT_PIXEL_MODE_BGRA;
|
||||
|
||||
/* Copied as-is from fcft (MIT license) */
|
||||
|
||||
// Compute all the bearings and set them correctly. The outline is scaled already, we just need to use the bounding box.
|
||||
float horiBearingX = 0.;
|
||||
float horiBearingY = -glyph_slot->bitmap_top;
|
||||
float horiBearingX = 0.f;
|
||||
float horiBearingY = -(float)glyph_slot->bitmap_top;
|
||||
|
||||
// XXX parentheses correct?
|
||||
float vertBearingX = glyph_slot->metrics.horiBearingX / 64.0f - glyph_slot->metrics.horiAdvance / 64.0f / 2;
|
||||
|
|
@ -156,13 +156,13 @@ FT_Error LLFontFreeTypeSvgRenderer::OnPresetGlypthSlot(FT_GlyphSlot glyph_slot,
|
|||
// Do conversion in two steps to avoid 'bad function cast' warning
|
||||
glyph_slot->metrics.width = glyph_slot->bitmap.width * 64;
|
||||
glyph_slot->metrics.height = glyph_slot->bitmap.rows * 64;
|
||||
glyph_slot->metrics.horiBearingX = horiBearingX * 64;
|
||||
glyph_slot->metrics.horiBearingY = horiBearingY * 64;
|
||||
glyph_slot->metrics.vertBearingX = vertBearingX * 64;
|
||||
glyph_slot->metrics.vertBearingY = vertBearingY * 64;
|
||||
glyph_slot->metrics.horiBearingX = (FT_Pos)(horiBearingX * 64);
|
||||
glyph_slot->metrics.horiBearingY = (FT_Pos)(horiBearingY * 64);
|
||||
glyph_slot->metrics.vertBearingX = (FT_Pos)(vertBearingX * 64);
|
||||
glyph_slot->metrics.vertBearingY = (FT_Pos)(vertBearingY * 64);
|
||||
if (glyph_slot->metrics.vertAdvance == 0)
|
||||
{
|
||||
glyph_slot->metrics.vertAdvance = glyph_slot->bitmap.rows * 1.2f * 64;
|
||||
glyph_slot->metrics.vertAdvance = (FT_Pos)(glyph_slot->bitmap.rows * 1.2f * 64);
|
||||
}
|
||||
|
||||
return FT_Err_Ok;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ S32 LLFontGL::getNumFaces(const std::string& filename)
|
|||
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,
|
||||
ShadowType shadow, S32 max_chars, F32* right_x, bool use_ellipses, bool use_color) const
|
||||
{
|
||||
LLRectf rect_float(rect.mLeft, rect.mTop, rect.mRight, rect.mBottom);
|
||||
LLRectf rect_float((F32)rect.mLeft, (F32)rect.mTop, (F32)rect.mRight, (F32)rect.mBottom);
|
||||
return render(wstr, begin_offset, rect_float, color, halign, valign, style, shadow, max_chars, right_x, use_ellipses, use_color);
|
||||
}
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRectf& rec
|
|||
y = rect.mBottom;
|
||||
break;
|
||||
}
|
||||
return render(wstr, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, rect.getWidth(), right_x, use_ellipses, use_color);
|
||||
return render(wstr, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, (S32)rect.getWidth(), right_x, use_ellipses, use_color);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
|
|||
// *HACK: Fallback fonts don't render, so we can use that to suppress
|
||||
// creation of OpenGL textures for test apps. JC
|
||||
bool is_fallback = !is_first_found || !mCreateGLTextures;
|
||||
F32 extra_scale = (is_fallback)?fallback_scale:1.0;
|
||||
F32 extra_scale = (is_fallback) ? fallback_scale : 1.0f;
|
||||
F32 point_size_scale = extra_scale * point_size;
|
||||
bool is_font_loaded = false;
|
||||
for(string_vec_t::iterator font_search_path_it = font_search_paths.begin();
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ void LLGLSLShader::dumpStats()
|
|||
tris_sec /= seconds;
|
||||
|
||||
F32 pct_samples = (F32)((F64)mSamplesDrawn / (F64)sTotalSamplesDrawn) * 100.f;
|
||||
F32 samples_sec = (F32)mSamplesDrawn / 1000000000.0;
|
||||
F32 samples_sec = (F32)(mSamplesDrawn / 1000000000.0);
|
||||
samples_sec /= seconds;
|
||||
|
||||
F32 pct_binds = (F32)mBinds / (F32)sTotalBinds * 100.f;
|
||||
|
|
@ -1265,7 +1265,7 @@ void LLGLSLShader::uniform1i(U32 index, GLint x)
|
|||
if (iter == mValue.end() || iter->second.mV[0] != x)
|
||||
{
|
||||
glUniform1i(mUniform[index], x);
|
||||
mValue[mUniform[index]] = LLVector4(x, 0.f, 0.f, 0.f);
|
||||
mValue[mUniform[index]] = LLVector4((F32)x, 0.f, 0.f, 0.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1405,7 +1405,7 @@ void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v)
|
|||
if (mUniform[index] >= 0)
|
||||
{
|
||||
const auto& iter = mValue.find(mUniform[index]);
|
||||
LLVector4 vec(v[0], 0.f, 0.f, 0.f);
|
||||
LLVector4 vec((F32)v[0], 0.f, 0.f, 0.f);
|
||||
if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
|
||||
{
|
||||
glUniform1iv(mUniform[index], count, v);
|
||||
|
|
@ -1432,7 +1432,7 @@ void LLGLSLShader::uniform4iv(U32 index, U32 count, const GLint* v)
|
|||
if (mUniform[index] >= 0)
|
||||
{
|
||||
const auto& iter = mValue.find(mUniform[index]);
|
||||
LLVector4 vec(v[0], v[1], v[2], v[3]);
|
||||
LLVector4 vec((F32)v[0], (F32)v[1], (F32)v[2], (F32)v[3]);
|
||||
if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
|
||||
{
|
||||
glUniform1iv(mUniform[index], count, v);
|
||||
|
|
@ -1702,7 +1702,7 @@ void LLGLSLShader::uniform1i(const LLStaticHashedString& uniform, GLint v)
|
|||
if (location >= 0)
|
||||
{
|
||||
const auto& iter = mValue.find(location);
|
||||
LLVector4 vec(v, 0.f, 0.f, 0.f);
|
||||
LLVector4 vec((F32)v, 0.f, 0.f, 0.f);
|
||||
if (iter == mValue.end() || shouldChange(iter->second, vec))
|
||||
{
|
||||
glUniform1i(location, v);
|
||||
|
|
@ -1718,7 +1718,7 @@ void LLGLSLShader::uniform1iv(const LLStaticHashedString& uniform, U32 count, co
|
|||
|
||||
if (location >= 0)
|
||||
{
|
||||
LLVector4 vec(v[0], 0, 0, 0);
|
||||
LLVector4 vec((F32)v[0], 0.f, 0.f, 0.f);
|
||||
const auto& iter = mValue.find(location);
|
||||
if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
|
||||
{
|
||||
|
|
@ -1736,7 +1736,7 @@ void LLGLSLShader::uniform4iv(const LLStaticHashedString& uniform, U32 count, co
|
|||
|
||||
if (location >= 0)
|
||||
{
|
||||
LLVector4 vec(v[0], v[1], v[2], v[3]);
|
||||
LLVector4 vec((F32)v[0], (F32)v[1], (F32)v[2], (F32)v[3]);
|
||||
const auto& iter = mValue.find(location);
|
||||
if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
|
||||
{
|
||||
|
|
@ -1755,7 +1755,7 @@ void LLGLSLShader::uniform2i(const LLStaticHashedString& uniform, GLint i, GLint
|
|||
if (location >= 0)
|
||||
{
|
||||
const auto& iter = mValue.find(location);
|
||||
LLVector4 vec(i, j, 0.f, 0.f);
|
||||
LLVector4 vec((F32)i, (F32)j, 0.f, 0.f);
|
||||
if (iter == mValue.end() || shouldChange(iter->second, vec))
|
||||
{
|
||||
glUniform2i(location, i, j);
|
||||
|
|
|
|||
|
|
@ -738,7 +738,7 @@ bool LLImageGL::setImage(const U8* data_in, bool data_hasmips /* = false */, S32
|
|||
}
|
||||
if (is_compressed)
|
||||
{
|
||||
S32 tex_size = dataFormatBytes(mFormatPrimary, w, h);
|
||||
GLsizei tex_size = (GLsizei)dataFormatBytes(mFormatPrimary, w, h);
|
||||
glCompressedTexImage2D(mTarget, gl_level, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
|
||||
stop_glerror();
|
||||
}
|
||||
|
|
@ -941,7 +941,7 @@ bool LLImageGL::setImage(const U8* data_in, bool data_hasmips /* = false */, S32
|
|||
S32 h = getHeight();
|
||||
if (is_compressed)
|
||||
{
|
||||
S32 tex_size = dataFormatBytes(mFormatPrimary, w, h);
|
||||
GLsizei tex_size = (GLsizei)dataFormatBytes(mFormatPrimary, w, h);
|
||||
glCompressedTexImage2D(mTarget, 0, mFormatPrimary, w, h, 0, tex_size, (GLvoid *)data_in);
|
||||
stop_glerror();
|
||||
}
|
||||
|
|
@ -2418,7 +2418,7 @@ bool LLImageGL::scaleDown(S32 desired_discard)
|
|||
if (size > sScratchPBOSize)
|
||||
{
|
||||
glBufferData(GL_PIXEL_PACK_BUFFER, size, NULL, GL_STREAM_COPY);
|
||||
sScratchPBOSize = size;
|
||||
sScratchPBOSize = (U32)size;
|
||||
}
|
||||
|
||||
glGetTexImage(mTarget, mip, mFormatPrimary, mFormatType, nullptr);
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ void LLPostProcess::viewOrthogonal(unsigned int width, unsigned int height)
|
|||
gGL.matrixMode(LLRender::MM_PROJECTION);
|
||||
gGL.pushMatrix();
|
||||
gGL.loadIdentity();
|
||||
gGL.ortho( 0.f, (GLdouble) width , (GLdouble) height , 0.f, -1.f, 1.f );
|
||||
gGL.ortho( 0.f, (GLfloat) width , (GLfloat) height , 0.f, -1.f, 1.f );
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
gGL.loadIdentity();
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
{
|
||||
// add in offset of current image to current UI translation
|
||||
const LLVector3 ui_scale = gGL.getUIScale();
|
||||
const LLVector3 ui_translation = (gGL.getUITranslation() + LLVector3(x, y, 0.f)).scaledVec(ui_scale);
|
||||
const LLVector3 ui_translation = (gGL.getUITranslation() + LLVector3((F32)x, (F32)y, 0.f)).scaledVec(ui_scale);
|
||||
|
||||
F32 uv_width = uv_outer_rect.getWidth();
|
||||
F32 uv_height = uv_outer_rect.getHeight();
|
||||
|
|
@ -375,8 +375,8 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
uv_outer_rect.mLeft + (center_rect.mRight * uv_width),
|
||||
uv_outer_rect.mBottom + (center_rect.mBottom * uv_height));
|
||||
|
||||
F32 image_width = image->getWidth(0);
|
||||
F32 image_height = image->getHeight(0);
|
||||
F32 image_width = (F32)image->getWidth(0);
|
||||
F32 image_height = (F32)image->getHeight(0);
|
||||
|
||||
S32 image_natural_width = ll_round(image_width * uv_width);
|
||||
S32 image_natural_height = ll_round(image_height * uv_height);
|
||||
|
|
@ -413,10 +413,10 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
draw_center_rect.setCenterAndSize(uv_center_rect.getCenterX() * width, uv_center_rect.getCenterY() * height, scaled_width, scaled_height);
|
||||
}
|
||||
|
||||
draw_center_rect.mLeft = ll_round(ui_translation.mV[VX] + (F32)draw_center_rect.mLeft * ui_scale.mV[VX]);
|
||||
draw_center_rect.mTop = ll_round(ui_translation.mV[VY] + (F32)draw_center_rect.mTop * ui_scale.mV[VY]);
|
||||
draw_center_rect.mRight = ll_round(ui_translation.mV[VX] + (F32)draw_center_rect.mRight * ui_scale.mV[VX]);
|
||||
draw_center_rect.mBottom = ll_round(ui_translation.mV[VY] + (F32)draw_center_rect.mBottom * ui_scale.mV[VY]);
|
||||
draw_center_rect.mLeft = (F32)ll_round(ui_translation.mV[VX] + (F32)draw_center_rect.mLeft * ui_scale.mV[VX]);
|
||||
draw_center_rect.mTop = (F32)ll_round(ui_translation.mV[VY] + (F32)draw_center_rect.mTop * ui_scale.mV[VY]);
|
||||
draw_center_rect.mRight = (F32)ll_round(ui_translation.mV[VX] + (F32)draw_center_rect.mRight * ui_scale.mV[VX]);
|
||||
draw_center_rect.mBottom = (F32)ll_round(ui_translation.mV[VY] + (F32)draw_center_rect.mBottom * ui_scale.mV[VY]);
|
||||
|
||||
LLRectf draw_outer_rect(ui_translation.mV[VX],
|
||||
ui_translation.mV[VY] + height * ui_scale.mV[VY],
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, LLT
|
|||
|
||||
if (mGenerateMipMaps != LLTexUnit::TMG_NONE) {
|
||||
// Calculate the number of mip levels based upon resolution that we should have.
|
||||
mMipLevels = 1 + floor(log10((float)llmax(mResX, mResY))/log10(2.0));
|
||||
mMipLevels = 1 + (U32)floor(log10((float)llmax(mResX, mResY)) / log10(2.0));
|
||||
}
|
||||
|
||||
if (depth)
|
||||
|
|
|
|||
|
|
@ -1003,7 +1003,7 @@ void LLShaderMgr::initShaderCache(bool enabled, const LLUUID& old_cache_version,
|
|||
ProgramBinaryData binary_info = ProgramBinaryData();
|
||||
binary_info.mBinaryFormat = data_pair.second["binary_format"].asInteger();
|
||||
binary_info.mBinaryLength = data_pair.second["binary_size"].asInteger();
|
||||
binary_info.mLastUsedTime = data_pair.second["last_used"].asReal();
|
||||
binary_info.mLastUsedTime = (F32)data_pair.second["last_used"].asReal();
|
||||
mShaderBinaryCache.insert_or_assign(LLUUID(data_pair.first), binary_info);
|
||||
}
|
||||
}
|
||||
|
|
@ -1034,7 +1034,7 @@ void LLShaderMgr::persistShaderCacheMetadata()
|
|||
LLSD out = LLSD::emptyMap();
|
||||
|
||||
static const F32 LRU_TIME = (60.f * 60.f) * 24.f * 7.f; // 14 days
|
||||
const F32 current_time = LLTimer::getTotalSeconds();
|
||||
const F32 current_time = (F32)LLTimer::getTotalSeconds();
|
||||
for (auto it = mShaderBinaryCache.begin(); it != mShaderBinaryCache.end();)
|
||||
{
|
||||
const ProgramBinaryData& shader_metadata = it->second;
|
||||
|
|
@ -1093,7 +1093,7 @@ bool LLShaderMgr::loadCachedProgramBinary(LLGLSLShader* shader)
|
|||
glGetProgramiv(shader->mProgramObject, GL_LINK_STATUS, &success);
|
||||
if (error == GL_NO_ERROR && success == GL_TRUE)
|
||||
{
|
||||
binary_iter->second.mLastUsedTime = LLTimer::getTotalSeconds();
|
||||
binary_iter->second.mLastUsedTime = (F32)LLTimer::getTotalSeconds();
|
||||
LL_INFOS() << "Loaded cached binary for shader: " << shader->mName << LL_ENDL;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1131,7 +1131,7 @@ bool LLShaderMgr::saveCachedProgramBinary(LLGLSLShader* shader)
|
|||
fwrite(program_binary.data(), sizeof(U8), program_binary.size(), outfile);
|
||||
outfile.close();
|
||||
|
||||
binary_info.mLastUsedTime = LLTimer::getTotalSeconds();
|
||||
binary_info.mLastUsedTime = (F32)LLTimer::getTotalSeconds();
|
||||
|
||||
mShaderBinaryCache.insert_or_assign(shader->mShaderHash, binary_info);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, c
|
|||
|
||||
LLRender2D::getInstance()->pushMatrix();
|
||||
{
|
||||
LLVector3 rect_origin = origin_agent + (rect.mLeft * x_axis) + (rect.mBottom * y_axis);
|
||||
LLVector3 rect_origin = origin_agent + ((F32)rect.mLeft * x_axis) + ((F32)rect.mBottom * y_axis);
|
||||
LLRender2D::getInstance()->translate(rect_origin.mV[VX],
|
||||
rect_origin.mV[VY],
|
||||
rect_origin.mV[VZ]);
|
||||
|
|
@ -100,8 +100,8 @@ void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, c
|
|||
(rect.getHeight() - (border_height * border_scale * 0.5f)) / (F32)rect.getHeight(),
|
||||
(rect.getWidth() - (border_width * border_scale * 0.5f)) / (F32)rect.getWidth(),
|
||||
(border_height * border_scale * 0.5f) / (F32)rect.getHeight()),
|
||||
rect.getWidth() * x_axis,
|
||||
rect.getHeight() * y_axis);
|
||||
(F32)rect.getWidth() * x_axis,
|
||||
(F32)rect.getHeight() * y_axis);
|
||||
|
||||
} LLRender2D::getInstance()->popMatrix();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,10 +197,10 @@ void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, cons
|
|||
F32 x = LLFontGL::sCurOrigin.mX + centerX - width * 0.5f;
|
||||
F32 y = LLFontGL::sCurOrigin.mY + centerY - height * 0.5f;
|
||||
|
||||
LLRectf screen_rect(ll_round(x),
|
||||
ll_round(y),
|
||||
ll_round(x) + width,
|
||||
ll_round(y) + height);
|
||||
LLRectf screen_rect((F32)ll_round(x),
|
||||
(F32)ll_round(y),
|
||||
(F32)ll_round(x) + width,
|
||||
(F32)ll_round(y) + height);
|
||||
|
||||
LLVector3 vertices[4];
|
||||
vertices[0] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f);
|
||||
|
|
@ -302,7 +302,7 @@ void LLBadge::draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
badge_center_x = location_offset_horiz;
|
||||
badge_center_x = (F32)location_offset_horiz;
|
||||
}
|
||||
|
||||
// Compute y position
|
||||
|
|
@ -319,7 +319,7 @@ void LLBadge::draw()
|
|||
}
|
||||
else
|
||||
{
|
||||
badge_center_y = location_offset_vert;
|
||||
badge_center_y = (F32)location_offset_vert;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ LLButton::LLButton(const LLButton::Params& p)
|
|||
// Likewise, missing "p.button_flash_rate" is replaced by gSavedSettings.getF32("FlashPeriod").
|
||||
// Note: flashing should be allowed in settings.xml (boolean key "EnableButtonFlashing").
|
||||
S32 flash_count = p.button_flash_count.isProvided()? p.button_flash_count : 0;
|
||||
F32 flash_rate = p.button_flash_rate.isProvided()? p.button_flash_rate : 0.0;
|
||||
F32 flash_rate = p.button_flash_rate.isProvided()? p.button_flash_rate : 0.0f;
|
||||
mFlashingTimer = new LLFlashTimer ((LLFlashTimer::callback_t)NULL, flash_count, flash_rate);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ void LLConsole::setLinePersistTime(F32 seconds)
|
|||
void LLConsole::reshape(S32 width, S32 height, bool called_from_parent)
|
||||
{
|
||||
S32 new_width = llmax(50, llmin(getRect().getWidth(), width));
|
||||
S32 new_height = llmax(llfloor(mFont->getLineHeight()) + 15, llmin(getRect().getHeight(), height));
|
||||
S32 new_height = llmax(mFont->getLineHeight() + 15, llmin(getRect().getHeight(), height));
|
||||
|
||||
if ( mConsoleWidth == new_width
|
||||
&& mConsoleHeight == new_height )
|
||||
|
|
@ -186,7 +186,7 @@ void LLConsole::draw()
|
|||
LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
|
||||
color.mV[VALPHA] *= console_opacity;
|
||||
|
||||
F32 line_height = mFont->getLineHeight();
|
||||
F32 line_height = (F32)mFont->getLineHeight();
|
||||
|
||||
for(paragraph_it = mParagraphs.rbegin(); paragraph_it != mParagraphs.rend(); paragraph_it++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
LLF32UICtrl::LLF32UICtrl(const Params& p)
|
||||
: LLUICtrl(p),
|
||||
mInitialValue(p.initial_value().asReal()),
|
||||
mInitialValue((F32)p.initial_value().asReal()),
|
||||
mMinValue(p.min_value),
|
||||
mMaxValue(p.max_value),
|
||||
mIncrement(p.increment)
|
||||
|
|
@ -47,5 +47,5 @@ LLF32UICtrl::LLF32UICtrl(const Params& p)
|
|||
|
||||
F32 LLF32UICtrl::getValueF32() const
|
||||
{
|
||||
return mViewModel->getValue().asReal();
|
||||
return (F32)mViewModel->getValue().asReal();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -960,8 +960,8 @@ bool LLFloater::applyRectControl()
|
|||
&& !x_control->isDefault()
|
||||
&& !y_control->isDefault())
|
||||
{
|
||||
mPosition.mX = x_control->getValue().asReal();
|
||||
mPosition.mY = y_control->getValue().asReal();
|
||||
mPosition.mX = (LL_COORD_FLOATER::value_t)x_control->getValue().asReal();
|
||||
mPosition.mY = (LL_COORD_FLOATER::value_t)y_control->getValue().asReal();
|
||||
mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
|
||||
applyRelativePosition();
|
||||
|
||||
|
|
@ -3618,7 +3618,7 @@ void LLFloater::applyRelativePosition()
|
|||
|
||||
|
||||
LLCoordFloater::LLCoordFloater(F32 x, F32 y, LLFloater& floater)
|
||||
: coord_t((S32)x, (S32)y)
|
||||
: coord_t(x, y)
|
||||
{
|
||||
mFloater = floater.getHandle();
|
||||
}
|
||||
|
|
@ -3661,28 +3661,28 @@ LLCoordCommon LL_COORD_FLOATER::convertToCommon() const
|
|||
LLCoordCommon out;
|
||||
if (self.mX < -0.5f)
|
||||
{
|
||||
out.mX = ll_round(rescale(self.mX, -1.f, -0.5f, snap_rect.mLeft - (floater_width - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mLeft));
|
||||
out.mX = ll_round(rescale(self.mX, -1.f, -0.5f, (F32)(snap_rect.mLeft - (floater_width - FLOATER_MIN_VISIBLE_PIXELS)), (F32)snap_rect.mLeft));
|
||||
}
|
||||
else if (self.mX > 0.5f)
|
||||
{
|
||||
out.mX = ll_round(rescale(self.mX, 0.5f, 1.f, snap_rect.mRight - floater_width, snap_rect.mRight - FLOATER_MIN_VISIBLE_PIXELS));
|
||||
out.mX = ll_round(rescale(self.mX, 0.5f, 1.f, (F32)(snap_rect.mRight - floater_width), (F32)(snap_rect.mRight - FLOATER_MIN_VISIBLE_PIXELS)));
|
||||
}
|
||||
else
|
||||
{
|
||||
out.mX = ll_round(rescale(self.mX, -0.5f, 0.5f, snap_rect.mLeft, snap_rect.mRight - floater_width));
|
||||
out.mX = ll_round(rescale(self.mX, -0.5f, 0.5f, (F32)snap_rect.mLeft, (F32)(snap_rect.mRight - floater_width)));
|
||||
}
|
||||
|
||||
if (self.mY < -0.5f)
|
||||
{
|
||||
out.mY = ll_round(rescale(self.mY, -1.f, -0.5f, snap_rect.mBottom - (floater_height - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mBottom));
|
||||
out.mY = ll_round(rescale(self.mY, -1.f, -0.5f, (F32)(snap_rect.mBottom - (floater_height - FLOATER_MIN_VISIBLE_PIXELS)), (F32)snap_rect.mBottom));
|
||||
}
|
||||
else if (self.mY > 0.5f)
|
||||
{
|
||||
out.mY = ll_round(rescale(self.mY, 0.5f, 1.f, snap_rect.mTop - floater_height, snap_rect.mTop - FLOATER_MIN_VISIBLE_PIXELS));
|
||||
out.mY = ll_round(rescale(self.mY, 0.5f, 1.f, (F32)(snap_rect.mTop - floater_height), (F32)(snap_rect.mTop - FLOATER_MIN_VISIBLE_PIXELS)));
|
||||
}
|
||||
else
|
||||
{
|
||||
out.mY = ll_round(rescale(self.mY, -0.5f, 0.5f, snap_rect.mBottom, snap_rect.mTop - floater_height));
|
||||
out.mY = ll_round(rescale(self.mY, -0.5f, 0.5f, (F32)snap_rect.mBottom, (F32)(snap_rect.mTop - floater_height)));
|
||||
}
|
||||
|
||||
// return center point instead of lower left
|
||||
|
|
@ -3709,27 +3709,27 @@ void LL_COORD_FLOATER::convertFromCommon(const LLCoordCommon& from)
|
|||
|
||||
if (from_x < snap_rect.mLeft)
|
||||
{
|
||||
self.mX = rescale(from_x, snap_rect.mLeft - (floater_width - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mLeft, -1.f, -0.5f);
|
||||
self.mX = rescale((F32)from_x, (F32)(snap_rect.mLeft - (floater_width - FLOATER_MIN_VISIBLE_PIXELS)), (F32)snap_rect.mLeft, -1.f, -0.5f);
|
||||
}
|
||||
else if (from_x + floater_width > snap_rect.mRight)
|
||||
{
|
||||
self.mX = rescale(from_x, snap_rect.mRight - floater_width, snap_rect.mRight - FLOATER_MIN_VISIBLE_PIXELS, 0.5f, 1.f);
|
||||
self.mX = rescale((F32)from_x, (F32)(snap_rect.mRight - floater_width), (F32)(snap_rect.mRight - FLOATER_MIN_VISIBLE_PIXELS), 0.5f, 1.f);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.mX = rescale(from_x, snap_rect.mLeft, snap_rect.mRight - floater_width, -0.5f, 0.5f);
|
||||
self.mX = rescale((F32)from_x, (F32)snap_rect.mLeft, (F32)(snap_rect.mRight - floater_width), -0.5f, 0.5f);
|
||||
}
|
||||
|
||||
if (from_y < snap_rect.mBottom)
|
||||
{
|
||||
self.mY = rescale(from_y, snap_rect.mBottom - (floater_height - FLOATER_MIN_VISIBLE_PIXELS), snap_rect.mBottom, -1.f, -0.5f);
|
||||
self.mY = rescale((F32)from_y, (F32)(snap_rect.mBottom - (floater_height - FLOATER_MIN_VISIBLE_PIXELS)), (F32)snap_rect.mBottom, -1.f, -0.5f);
|
||||
}
|
||||
else if (from_y + floater_height > snap_rect.mTop)
|
||||
{
|
||||
self.mY = rescale(from_y, snap_rect.mTop - floater_height, snap_rect.mTop - FLOATER_MIN_VISIBLE_PIXELS, 0.5f, 1.f);
|
||||
self.mY = rescale((F32)from_y, (F32)(snap_rect.mTop - floater_height), (F32)(snap_rect.mTop - FLOATER_MIN_VISIBLE_PIXELS), 0.5f, 1.f);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.mY = rescale(from_y, snap_rect.mBottom, snap_rect.mTop - floater_height, -0.5f, 0.5f);
|
||||
self.mY = rescale((F32)from_y, (F32)snap_rect.mBottom, (F32)(snap_rect.mTop - floater_height), -0.5f, 0.5f);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -950,7 +950,7 @@ void LLFolderViewItem::draw()
|
|||
S32 filter_offset = static_cast<S32>(mViewModelItem->getFilterStringOffset());
|
||||
if (filter_string_length > 0)
|
||||
{
|
||||
S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD);
|
||||
S32 bottom = getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD;
|
||||
S32 top = getRect().getHeight() - TOP_PAD;
|
||||
if(mLabelSuffix.empty() || (font == suffix_font))
|
||||
{
|
||||
|
|
@ -966,8 +966,8 @@ void LLFolderViewItem::draw()
|
|||
S32 label_filter_length = llmin((S32)mLabel.size() - filter_offset, (S32)filter_string_length);
|
||||
if(label_filter_length > 0)
|
||||
{
|
||||
S32 left = ll_round(text_left) + font->getWidthF32(mLabel, 0, llmin(filter_offset, (S32)mLabel.size())) - 2;
|
||||
S32 right = left + font->getWidthF32(mLabel, filter_offset, label_filter_length) + 2;
|
||||
S32 left = (S32)(ll_round(text_left) + font->getWidthF32(mLabel, 0, llmin(filter_offset, (S32)mLabel.size()))) - 2;
|
||||
S32 right = left + (S32)font->getWidthF32(mLabel, filter_offset, label_filter_length) + 2;
|
||||
LLUIImage* box_image = default_params.selection_image;
|
||||
LLRect box_rect(left, top, right, bottom);
|
||||
box_image->draw(box_rect, sFilterBGColor);
|
||||
|
|
@ -976,8 +976,8 @@ void LLFolderViewItem::draw()
|
|||
if(suffix_filter_length > 0)
|
||||
{
|
||||
S32 suffix_offset = llmax(0, filter_offset - (S32)mLabel.size());
|
||||
S32 left = ll_round(text_left) + font->getWidthF32(mLabel, 0, static_cast<S32>(mLabel.size())) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset) - 2;
|
||||
S32 right = left + suffix_font->getWidthF32(mLabelSuffix, suffix_offset, suffix_filter_length) + 2;
|
||||
S32 left = (S32)(ll_round(text_left) + font->getWidthF32(mLabel, 0, static_cast<S32>(mLabel.size())) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset))- 2;
|
||||
S32 right = left + (S32)suffix_font->getWidthF32(mLabelSuffix, suffix_offset, suffix_filter_length) + 2;
|
||||
LLUIImage* box_image = default_params.selection_image;
|
||||
LLRect box_rect(left, top, right, bottom);
|
||||
box_image->draw(box_rect, sFilterBGColor);
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
{
|
||||
if( *cur == '\n' )
|
||||
{
|
||||
LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, cur-base);
|
||||
LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, (S32)(cur - base));
|
||||
text_segment->setToken( 0 );
|
||||
insertSegment( *seg_list, text_segment, text_len, style, editor);
|
||||
cur++;
|
||||
|
|
@ -532,13 +532,13 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
LLKeywordToken* cur_token = *iter;
|
||||
if( cur_token->isHead( cur ) )
|
||||
{
|
||||
S32 seg_start = cur - base;
|
||||
S32 seg_start = (S32)(cur - base);
|
||||
while( *cur && *cur != '\n' )
|
||||
{
|
||||
// skip the rest of the line
|
||||
cur++;
|
||||
}
|
||||
S32 seg_end = cur - base;
|
||||
S32 seg_end = (S32)(cur - base);
|
||||
|
||||
//create segments from seg_start to seg_end
|
||||
insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, style, editor);
|
||||
|
|
@ -582,7 +582,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
S32 between_delimiters = 0;
|
||||
S32 seg_end = 0;
|
||||
|
||||
seg_start = cur - base;
|
||||
seg_start = (S32)(cur - base);
|
||||
cur += cur_delimiter->getLengthHead();
|
||||
|
||||
LLKeywordToken::ETokenType type = cur_delimiter->getType();
|
||||
|
|
@ -669,7 +669,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
{
|
||||
p++;
|
||||
}
|
||||
S32 seg_len = p - cur;
|
||||
S32 seg_len = (S32)(p - cur);
|
||||
if( seg_len > 0 )
|
||||
{
|
||||
WStringMapIndex word( cur, seg_len );
|
||||
|
|
@ -677,7 +677,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
if( map_iter != mWordTokenMap.end() )
|
||||
{
|
||||
LLKeywordToken* cur_token = map_iter->second;
|
||||
S32 seg_start = cur - base;
|
||||
S32 seg_start = (S32)(cur - base);
|
||||
S32 seg_end = seg_start + seg_len;
|
||||
|
||||
// LL_INFOS("SyntaxLSL") << "Seg: [" << word.c_str() << "]" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ void LLLayoutPanel::setTargetDim(S32 value)
|
|||
|
||||
S32 LLLayoutPanel::getVisibleDim() const
|
||||
{
|
||||
F32 min_dim = getRelevantMinDim();
|
||||
F32 min_dim = (F32)getRelevantMinDim();
|
||||
return ll_round(mVisibleAmt
|
||||
* (min_dim
|
||||
+ (((F32)mTargetDim - min_dim) * (1.f - mCollapseAmt))));
|
||||
|
|
@ -445,7 +445,7 @@ void LLLayoutStack::updateLayout()
|
|||
|
||||
for (LLLayoutPanel* panelp : mPanels)
|
||||
{
|
||||
F32 panel_dim = llmax(panelp->getExpandedMinDim(), panelp->mTargetDim);
|
||||
F32 panel_dim = (F32)llmax(panelp->getExpandedMinDim(), panelp->mTargetDim);
|
||||
|
||||
LLRect panel_rect;
|
||||
if (mOrientation == HORIZONTAL)
|
||||
|
|
@ -465,7 +465,7 @@ void LLLayoutStack::updateLayout()
|
|||
|
||||
LLRect resize_bar_rect(panel_rect);
|
||||
F32 panel_spacing = (F32)mPanelSpacing * panelp->getVisibleAmount();
|
||||
F32 panel_visible_dim = panelp->getVisibleDim();
|
||||
F32 panel_visible_dim = (F32)panelp->getVisibleDim();
|
||||
S32 panel_spacing_round = (S32)(ll_round(panel_spacing));
|
||||
|
||||
if (mOrientation == HORIZONTAL)
|
||||
|
|
|
|||
|
|
@ -2109,7 +2109,7 @@ void LLLineEditor::draw()
|
|||
if (0 == mText.length() && (mReadOnly || mShowLabelFocused))
|
||||
{
|
||||
mGLFont->render(mLabel.getWString(), 0,
|
||||
mTextLeftEdge, (F32)text_bottom,
|
||||
(F32)mTextLeftEdge, (F32)text_bottom,
|
||||
label_color,
|
||||
LLFontGL::LEFT,
|
||||
LLFontGL::BOTTOM,
|
||||
|
|
@ -2134,7 +2134,7 @@ void LLLineEditor::draw()
|
|||
if (0 == mText.length())
|
||||
{
|
||||
mGLFont->render(mLabel.getWString(), 0,
|
||||
mTextLeftEdge, (F32)text_bottom,
|
||||
(F32)mTextLeftEdge, (F32)text_bottom,
|
||||
label_color,
|
||||
LLFontGL::LEFT,
|
||||
LLFontGL::BOTTOM,
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ void LLScrollListBar::setValue(const LLSD& value)
|
|||
{
|
||||
if (value.has("ratio"))
|
||||
{
|
||||
mRatio = value["ratio"].asReal();
|
||||
mRatio = (F32)value["ratio"].asReal();
|
||||
}
|
||||
if (value.has("bottom"))
|
||||
{
|
||||
|
|
@ -239,7 +239,7 @@ S32 LLScrollListBar::getWidth() const
|
|||
void LLScrollListBar::draw(const LLColor4& color, const LLColor4& highlight_color) const
|
||||
{
|
||||
S32 bar_width = getWidth() - mLeftPad - mRightPad;
|
||||
S32 left = bar_width - bar_width * mRatio;
|
||||
S32 left = (S32)(bar_width - bar_width * mRatio);
|
||||
left = llclamp(left, mLeftPad, getWidth() - mRightPad - 1);
|
||||
|
||||
gl_rect_2d(left, mBottom, getWidth() - mRightPad, mBottom - 1, mColor);
|
||||
|
|
@ -637,7 +637,7 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight
|
|||
switch (mFontAlignment)
|
||||
{
|
||||
case LLFontGL::LEFT:
|
||||
start_text_x = icon_space + 1;
|
||||
start_text_x = icon_space + 1.f;
|
||||
start_icon_x = 1;
|
||||
break;
|
||||
case LLFontGL::RIGHT:
|
||||
|
|
@ -647,7 +647,7 @@ void LLScrollListIconText::draw(const LLColor4& color, const LLColor4& highlight
|
|||
case LLFontGL::HCENTER:
|
||||
F32 center = (F32)getWidth()* 0.5f;
|
||||
start_text_x = center + ((F32)icon_space * 0.5f);
|
||||
start_icon_x = center - (((F32)icon_space + mFont->getWidth(mText.getString())) * 0.5f);
|
||||
start_icon_x = (S32)(center - (((F32)icon_space + mFont->getWidth(mText.getString())) * 0.5f));
|
||||
break;
|
||||
}
|
||||
mFont->render(mText.getWString(), 0,
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ void LLSpellChecker::removeDictionary(const std::string& dict_language)
|
|||
{
|
||||
LLFile::remove(dict_aff);
|
||||
}
|
||||
dict_map.erase(it - dict_map.beginArray());
|
||||
dict_map.erase((LLSD::Integer)(it - dict_map.beginArray()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ F32 calc_tick_value(F32 min, F32 max)
|
|||
S32 num_whole_digits = llceil(logf(llabs(min + possible_tick_value)) * OO_LN10);
|
||||
for (S32 digit_count = -(num_whole_digits - 1); digit_count < 6; digit_count++)
|
||||
{
|
||||
F32 test_tick_value = min + (possible_tick_value * pow(10.0, digit_count));
|
||||
F32 test_tick_value = min + (possible_tick_value * (F32)pow(10.0, digit_count));
|
||||
|
||||
if (is_approx_equal((F32)(S32)test_tick_value, test_tick_value))
|
||||
{
|
||||
|
|
@ -99,7 +99,7 @@ void calc_auto_scale_range(F32& min, F32& max, F32& tick)
|
|||
: llceil(logf(llabs(min)) * OO_LN10);
|
||||
|
||||
const S32 num_digits = llmax(num_digits_max, num_digits_min);
|
||||
const F32 power_of_10 = pow(10.0, num_digits - 1);
|
||||
const F32 power_of_10 = (F32)pow(10.0, num_digits - 1);
|
||||
const F32 starting_max = power_of_10 * ((max < 0.f) ? -1 : 1);
|
||||
const F32 starting_min = power_of_10 * ((min < 0.f) ? -1 : 1);
|
||||
|
||||
|
|
@ -313,13 +313,13 @@ void LLStatBar::draw()
|
|||
const LLTrace::StatType<LLTrace::CountAccumulator>& count_stat = *mStat.countStatp;
|
||||
|
||||
unit_label = std::string(count_stat.getUnitLabel()) + "/s";
|
||||
current = last_frame_recording.getPerSec(count_stat);
|
||||
min = frame_recording.getPeriodMinPerSec(count_stat, num_frames);
|
||||
max = frame_recording.getPeriodMaxPerSec(count_stat, num_frames);
|
||||
mean = frame_recording.getPeriodMeanPerSec(count_stat, num_frames);
|
||||
current = (F32)last_frame_recording.getPerSec(count_stat);
|
||||
min = (F32)frame_recording.getPeriodMinPerSec(count_stat, num_frames);
|
||||
max = (F32)frame_recording.getPeriodMaxPerSec(count_stat, num_frames);
|
||||
mean = (F32)frame_recording.getPeriodMeanPerSec(count_stat, num_frames);
|
||||
if (mShowMedian)
|
||||
{
|
||||
display_value = frame_recording.getPeriodMedianPerSec(count_stat, num_frames);
|
||||
display_value = (F32)frame_recording.getPeriodMedianPerSec(count_stat, num_frames);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -332,10 +332,10 @@ void LLStatBar::draw()
|
|||
const LLTrace::StatType<LLTrace::EventAccumulator>& event_stat = *mStat.eventStatp;
|
||||
|
||||
unit_label = mUnitLabel.empty() ? event_stat.getUnitLabel() : mUnitLabel;
|
||||
current = last_frame_recording.getLastValue(event_stat);
|
||||
min = frame_recording.getPeriodMin(event_stat, num_frames);
|
||||
max = frame_recording.getPeriodMax(event_stat, num_frames);
|
||||
mean = frame_recording.getPeriodMean(event_stat, num_frames);
|
||||
current = (F32)last_frame_recording.getLastValue(event_stat);
|
||||
min = (F32)frame_recording.getPeriodMin(event_stat, num_frames);
|
||||
max = (F32)frame_recording.getPeriodMax(event_stat, num_frames);
|
||||
mean = (F32)frame_recording.getPeriodMean(event_stat, num_frames);
|
||||
display_value = mean;
|
||||
}
|
||||
break;
|
||||
|
|
@ -344,15 +344,15 @@ void LLStatBar::draw()
|
|||
const LLTrace::StatType<LLTrace::SampleAccumulator>& sample_stat = *mStat.sampleStatp;
|
||||
|
||||
unit_label = mUnitLabel.empty() ? sample_stat.getUnitLabel() : mUnitLabel;
|
||||
current = last_frame_recording.getLastValue(sample_stat);
|
||||
min = frame_recording.getPeriodMin(sample_stat, num_frames);
|
||||
max = frame_recording.getPeriodMax(sample_stat, num_frames);
|
||||
mean = frame_recording.getPeriodMean(sample_stat, num_frames);
|
||||
current = (F32)last_frame_recording.getLastValue(sample_stat);
|
||||
min = (F32)frame_recording.getPeriodMin(sample_stat, num_frames);
|
||||
max = (F32)frame_recording.getPeriodMax(sample_stat, num_frames);
|
||||
mean = (F32)frame_recording.getPeriodMean(sample_stat, num_frames);
|
||||
num_rapid_changes = calc_num_rapid_changes(frame_recording, sample_stat, RAPID_CHANGE_WINDOW);
|
||||
|
||||
if (mShowMedian)
|
||||
{
|
||||
display_value = frame_recording.getPeriodMedian(sample_stat, num_frames);
|
||||
display_value = (F32)frame_recording.getPeriodMedian(sample_stat, num_frames);
|
||||
}
|
||||
else if (num_rapid_changes / RAPID_CHANGE_WINDOW.value() > MAX_RAPID_CHANGES_PER_SEC)
|
||||
{
|
||||
|
|
@ -450,8 +450,8 @@ void LLStatBar::draw()
|
|||
}
|
||||
|
||||
F32 span = (mOrientation == HORIZONTAL)
|
||||
? (bar_rect.getWidth())
|
||||
: (bar_rect.getHeight());
|
||||
? (F32)(bar_rect.getWidth())
|
||||
: (F32)(bar_rect.getHeight());
|
||||
|
||||
if (mDisplayHistory && mStat.valid)
|
||||
{
|
||||
|
|
@ -471,18 +471,18 @@ void LLStatBar::draw()
|
|||
switch(mStatType)
|
||||
{
|
||||
case STAT_COUNT:
|
||||
min_value = recording.getPerSec(*mStat.countStatp);
|
||||
min_value = (F32)recording.getPerSec(*mStat.countStatp);
|
||||
max_value = min_value;
|
||||
num_samples = recording.getSampleCount(*mStat.countStatp);
|
||||
break;
|
||||
case STAT_EVENT:
|
||||
min_value = recording.getMin(*mStat.eventStatp);
|
||||
max_value = recording.getMax(*mStat.eventStatp);
|
||||
min_value = (F32)recording.getMin(*mStat.eventStatp);
|
||||
max_value = (F32)recording.getMax(*mStat.eventStatp);
|
||||
num_samples = recording.getSampleCount(*mStat.eventStatp);
|
||||
break;
|
||||
case STAT_SAMPLE:
|
||||
min_value = recording.getMin(*mStat.sampleStatp);
|
||||
max_value = recording.getMax(*mStat.sampleStatp);
|
||||
min_value = (F32)recording.getMin(*mStat.sampleStatp);
|
||||
max_value = (F32)recording.getMax(*mStat.sampleStatp);
|
||||
num_samples = recording.getSampleCount(*mStat.sampleStatp);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -70,11 +70,11 @@ void LLStatGraph::draw()
|
|||
|
||||
if (mPerSec)
|
||||
{
|
||||
mValue = recording.getPerSec(*mNewStatFloatp);
|
||||
mValue = (F32)recording.getPerSec(*mNewStatFloatp);
|
||||
}
|
||||
else
|
||||
{
|
||||
mValue = recording.getSum(*mNewStatFloatp);
|
||||
mValue = (F32)recording.getSum(*mNewStatFloatp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2189,7 +2189,7 @@ void LLTabContainer::setTabVisibility( LLPanel const *aPanel, bool aVisible )
|
|||
LLTabTuple const *pTT = *itr;
|
||||
if( pTT->mVisible )
|
||||
{
|
||||
this->selectTab( itr - mTabList.begin() );
|
||||
this->selectTab((S32)(itr - mTabList.begin()));
|
||||
foundTab = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -401,8 +401,8 @@ std::vector<LLRect> LLTextBase::getSelectionRects()
|
|||
|
||||
// Use F32 otherwise a string of multiple segments
|
||||
// will accumulate a large error
|
||||
F32 left_precise = line_iter->mRect.mLeft;
|
||||
F32 right_precise = line_iter->mRect.mLeft;
|
||||
F32 left_precise = (F32)line_iter->mRect.mLeft;
|
||||
F32 right_precise = (F32)line_iter->mRect.mLeft;
|
||||
|
||||
for (; segment_iter != mSegments.end(); ++segment_iter, segment_offset = 0)
|
||||
{
|
||||
|
|
@ -448,8 +448,8 @@ std::vector<LLRect> LLTextBase::getSelectionRects()
|
|||
}
|
||||
|
||||
LLRect selection_rect;
|
||||
selection_rect.mLeft = left_precise;
|
||||
selection_rect.mRight = right_precise;
|
||||
selection_rect.mLeft = (S32)left_precise;
|
||||
selection_rect.mRight = (S32)right_precise;
|
||||
selection_rect.mBottom = line_iter->mRect.mBottom;
|
||||
selection_rect.mTop = line_iter->mRect.mTop;
|
||||
|
||||
|
|
@ -598,7 +598,7 @@ void LLTextBase::drawCursor()
|
|||
|
||||
// Make sure the IME is in the right place
|
||||
LLRect screen_pos = calcScreenRect();
|
||||
LLCoordGL ime_pos( screen_pos.mLeft + llfloor(cursor_rect.mLeft), screen_pos.mBottom + llfloor(cursor_rect.mTop) );
|
||||
LLCoordGL ime_pos( screen_pos.mLeft + cursor_rect.mLeft, screen_pos.mBottom + cursor_rect.mTop );
|
||||
|
||||
ime_pos.mX = (S32) (ime_pos.mX * LLUI::getScaleFactor().mV[VX]);
|
||||
ime_pos.mY = (S32) (ime_pos.mY * LLUI::getScaleFactor().mV[VY]);
|
||||
|
|
@ -755,9 +755,9 @@ void LLTextBase::drawText()
|
|||
line_end = next_start;
|
||||
}
|
||||
|
||||
LLRectf text_rect(line.mRect.mLeft, line.mRect.mTop, line.mRect.mRight, line.mRect.mBottom);
|
||||
text_rect.mRight = mDocumentView->getRect().getWidth(); // clamp right edge to document extents
|
||||
text_rect.translate(mDocumentView->getRect().mLeft, mDocumentView->getRect().mBottom); // adjust by scroll position
|
||||
LLRectf text_rect((F32)line.mRect.mLeft, (F32)line.mRect.mTop, (F32)line.mRect.mRight, (F32)line.mRect.mBottom);
|
||||
text_rect.mRight = (F32)mDocumentView->getRect().getWidth(); // clamp right edge to document extents
|
||||
text_rect.translate((F32)mDocumentView->getRect().mLeft, (F32)mDocumentView->getRect().mBottom); // adjust by scroll position
|
||||
|
||||
// draw a single line of text
|
||||
S32 seg_start = line_start;
|
||||
|
|
@ -802,13 +802,13 @@ void LLTextBase::drawText()
|
|||
S32 squiggle_start = 0, squiggle_end = 0, pony = 0;
|
||||
cur_segment->getDimensions(seg_start - cur_segment->getStart(), misspell_start - seg_start, squiggle_start, pony);
|
||||
cur_segment->getDimensions(misspell_start - cur_segment->getStart(), misspell_end - misspell_start, squiggle_end, pony);
|
||||
squiggle_start += text_rect.mLeft;
|
||||
squiggle_start += (S32)text_rect.mLeft;
|
||||
|
||||
pony = (squiggle_end + 3) / 6;
|
||||
squiggle_start += squiggle_end / 2 - pony * 3;
|
||||
squiggle_end = squiggle_start + pony * 6;
|
||||
|
||||
S32 squiggle_bottom = text_rect.mBottom + (S32)cur_segment->getStyle()->getFont()->getDescenderHeight();
|
||||
S32 squiggle_bottom = (S32)text_rect.mBottom + (S32)cur_segment->getStyle()->getFont()->getDescenderHeight();
|
||||
|
||||
gGL.color4ub(255, 0, 0, 200);
|
||||
while (squiggle_start + 1 < squiggle_end)
|
||||
|
|
@ -1674,7 +1674,7 @@ void LLTextBase::reflow()
|
|||
segment_set_t::iterator seg_iter = mSegments.begin();
|
||||
S32 seg_offset = 0;
|
||||
S32 line_start_index = 0;
|
||||
const F32 text_available_width = mVisibleTextRect.getWidth() - mHPad; // reserve room for margin
|
||||
const F32 text_available_width = (F32)(mVisibleTextRect.getWidth() - mHPad); // reserve room for margin
|
||||
F32 remaining_pixels = text_available_width;
|
||||
S32 line_count = 0;
|
||||
|
||||
|
|
@ -1881,7 +1881,7 @@ S32 LLTextBase::getLineNumFromDocIndex( S32 doc_index, bool include_wordwrap) co
|
|||
line_list_t::const_iterator iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), doc_index, line_end_compare());
|
||||
if (include_wordwrap)
|
||||
{
|
||||
return iter - mLineInfoList.begin();
|
||||
return (S32)(iter - mLineInfoList.begin());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1918,7 +1918,7 @@ S32 LLTextBase::getFirstVisibleLine() const
|
|||
// binary search for line that starts before top of visible buffer
|
||||
line_list_t::const_iterator iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mTop, compare_bottom());
|
||||
|
||||
return iter - mLineInfoList.begin();
|
||||
return (S32)(iter - mLineInfoList.begin());
|
||||
}
|
||||
|
||||
std::pair<S32, S32> LLTextBase::getVisibleLines(bool require_fully_visible)
|
||||
|
|
@ -1940,7 +1940,7 @@ std::pair<S32, S32> LLTextBase::getVisibleLines(bool require_fully_visible)
|
|||
first_iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mTop, compare_bottom());
|
||||
last_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mBottom, compare_top());
|
||||
}
|
||||
return std::pair<S32, S32>(first_iter - mLineInfoList.begin(), last_iter - mLineInfoList.begin());
|
||||
return std::pair<S32, S32>((S32)(first_iter - mLineInfoList.begin()), (S32)(last_iter - mLineInfoList.begin()));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2608,7 +2608,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, bool round,
|
|||
}
|
||||
|
||||
S32 pos = getLength();
|
||||
F32 start_x = line_iter->mRect.mLeft + doc_rect.mLeft;
|
||||
F32 start_x = (F32)(line_iter->mRect.mLeft + doc_rect.mLeft);
|
||||
|
||||
segment_set_t::iterator line_seg_iter;
|
||||
S32 line_seg_offset;
|
||||
|
|
@ -2626,7 +2626,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, bool round,
|
|||
|
||||
if(newline)
|
||||
{
|
||||
pos = segment_line_start + segmentp->getOffset(local_x - start_x, line_seg_offset, segment_line_length, round);
|
||||
pos = segment_line_start + segmentp->getOffset(local_x - (S32)start_x, line_seg_offset, segment_line_length, round);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -2656,7 +2656,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, bool round,
|
|||
}
|
||||
else
|
||||
{
|
||||
offset = segmentp->getOffset(local_x - start_x, line_seg_offset, segment_line_length, round);
|
||||
offset = segmentp->getOffset(local_x - (S32)start_x, line_seg_offset, segment_line_length, round);
|
||||
}
|
||||
pos = segment_line_start + offset;
|
||||
break;
|
||||
|
|
@ -2703,7 +2703,7 @@ LLRect LLTextBase::getDocRectFromDocIndex(S32 pos) const
|
|||
getSegmentAndOffset(line_iter->mDocIndexStart, &line_seg_iter, &line_seg_offset);
|
||||
getSegmentAndOffset(pos, &cursor_seg_iter, &cursor_seg_offset);
|
||||
|
||||
F32 doc_left_precise = line_iter->mRect.mLeft;
|
||||
F32 doc_left_precise = (F32)line_iter->mRect.mLeft;
|
||||
|
||||
while(line_seg_iter != mSegments.end())
|
||||
{
|
||||
|
|
@ -2734,7 +2734,7 @@ LLRect LLTextBase::getDocRectFromDocIndex(S32 pos) const
|
|||
}
|
||||
|
||||
LLRect doc_rect;
|
||||
doc_rect.mLeft = doc_left_precise;
|
||||
doc_rect.mLeft = (S32)doc_left_precise;
|
||||
doc_rect.mBottom = line_iter->mRect.mBottom;
|
||||
doc_rect.mTop = line_iter->mRect.mTop;
|
||||
|
||||
|
|
@ -3720,7 +3720,7 @@ bool LLInlineViewSegment::getDimensionsF32(S32 first_char, S32 num_chars, F32& w
|
|||
}
|
||||
else
|
||||
{
|
||||
width = mLeftPad + mRightPad + mView->getRect().getWidth();
|
||||
width = (F32)(mLeftPad + mRightPad + mView->getRect().getWidth());
|
||||
height = mBottomPad + mTopPad + mView->getRect().getHeight();
|
||||
}
|
||||
|
||||
|
|
@ -3871,10 +3871,10 @@ F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 select
|
|||
S32 style_image_width = image->getWidth();
|
||||
// Text is drawn from the top of the draw_rect downward
|
||||
|
||||
S32 text_center = draw_rect.mTop - (draw_rect.getHeight() / 2);
|
||||
S32 text_center = (S32)(draw_rect.mTop - (draw_rect.getHeight() / 2.f));
|
||||
// Align image to center of draw rect
|
||||
S32 image_bottom = text_center - (style_image_height / 2);
|
||||
image->draw(draw_rect.mLeft, image_bottom,
|
||||
image->draw((S32)draw_rect.mLeft, image_bottom,
|
||||
style_image_width, style_image_height, color);
|
||||
|
||||
const S32 IMAGE_HPAD = 3;
|
||||
|
|
|
|||
|
|
@ -2315,17 +2315,17 @@ void LLTextEditor::drawPreeditMarker()
|
|||
if (mPreeditStandouts[i])
|
||||
{
|
||||
gl_rect_2d(preedit_left + preedit_standout_gap,
|
||||
text_rect.mBottom + mFont->getDescenderHeight() - 1,
|
||||
text_rect.mBottom + (S32)mFont->getDescenderHeight() - 1,
|
||||
preedit_right - preedit_standout_gap - 1,
|
||||
text_rect.mBottom + mFont->getDescenderHeight() - 1 - preedit_standout_thickness,
|
||||
text_rect.mBottom + (S32)mFont->getDescenderHeight() - 1 - preedit_standout_thickness,
|
||||
(mCursorColor.get() * preedit_standout_brightness + mWriteableBgColor.get() * (1 - preedit_standout_brightness)).setAlpha(1.0f));
|
||||
}
|
||||
else
|
||||
{
|
||||
gl_rect_2d(preedit_left + preedit_marker_gap,
|
||||
text_rect.mBottom + mFont->getDescenderHeight() - 1,
|
||||
text_rect.mBottom + (S32)mFont->getDescenderHeight() - 1,
|
||||
preedit_right - preedit_marker_gap - 1,
|
||||
text_rect.mBottom + mFont->getDescenderHeight() - 1 - preedit_marker_thickness,
|
||||
text_rect.mBottom + (S32)mFont->getDescenderHeight() - 1 - preedit_marker_thickness,
|
||||
(mCursorColor.get() * preedit_marker_brightness + mWriteableBgColor.get() * (1 - preedit_marker_brightness)).setAlpha(1.0f));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,19 +217,19 @@ void LLVirtualTrackball::draw()
|
|||
|
||||
S32 halfwidth = mTouchArea->getRect().getWidth() / 2;
|
||||
S32 halfheight = mTouchArea->getRect().getHeight() / 2;
|
||||
draw_point.mV[VX] = (draw_point.mV[VX] + 1.0) * halfwidth + mTouchArea->getRect().mLeft;
|
||||
draw_point.mV[VY] = (draw_point.mV[VY] + 1.0) * halfheight + mTouchArea->getRect().mBottom;
|
||||
draw_point.mV[VX] = (draw_point.mV[VX] + 1.0f) * halfwidth + mTouchArea->getRect().mLeft;
|
||||
draw_point.mV[VY] = (draw_point.mV[VY] + 1.0f) * halfheight + mTouchArea->getRect().mBottom;
|
||||
bool upper_hemisphere = (draw_point.mV[VZ] >= 0.f);
|
||||
|
||||
mImgSphere->draw(mTouchArea->getRect(), upper_hemisphere ? UI_VERTEX_COLOR : UI_VERTEX_COLOR % 0.5f);
|
||||
drawThumb(draw_point.mV[VX], draw_point.mV[VY], mThumbMode, upper_hemisphere);
|
||||
drawThumb((S32)draw_point.mV[VX], (S32)draw_point.mV[VY], mThumbMode, upper_hemisphere);
|
||||
|
||||
|
||||
if (LLView::sDebugRects)
|
||||
{
|
||||
gGL.color4fv(LLColor4::red.mV);
|
||||
gl_circle_2d(mTouchArea->getRect().getCenterX(), mTouchArea->getRect().getCenterY(), mImgSphere->getWidth() / 2, 60, false);
|
||||
gl_circle_2d(draw_point.mV[VX], draw_point.mV[VY], mImgSunFront->getWidth() / 2, 12, false);
|
||||
gl_circle_2d((F32)mTouchArea->getRect().getCenterX(), (F32)mTouchArea->getRect().getCenterY(), (F32)mImgSphere->getWidth() / 2.f, 60, false);
|
||||
gl_circle_2d(draw_point.mV[VX], draw_point.mV[VY], (F32)mImgSunFront->getWidth() / 2.f, 12, false);
|
||||
}
|
||||
|
||||
// hide the direction labels when disabled
|
||||
|
|
@ -392,20 +392,20 @@ bool LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
|
|||
{ // trackball (move to roll) mode
|
||||
LLQuaternion delta;
|
||||
|
||||
F32 rotX = x - mPrevX;
|
||||
F32 rotY = y - mPrevY;
|
||||
F32 rotX = (F32)(x - mPrevX);
|
||||
F32 rotY = (F32)(y - mPrevY);
|
||||
|
||||
if (abs(rotX) > 1)
|
||||
{
|
||||
F32 direction = (rotX < 0) ? -1 : 1;
|
||||
delta.setAngleAxis(mIncrementMouse * abs(rotX), 0, direction, 0); // changing X - rotate around Y axis
|
||||
F32 direction = (rotX < 0) ? -1.f : 1.f;
|
||||
delta.setAngleAxis(mIncrementMouse * abs(rotX), 0.f, direction, 0.f); // changing X - rotate around Y axis
|
||||
mValue *= delta;
|
||||
}
|
||||
|
||||
if (abs(rotY) > 1)
|
||||
{
|
||||
F32 direction = (rotY < 0) ? 1 : -1; // reverse for Y (value increases from bottom to top)
|
||||
delta.setAngleAxis(mIncrementMouse * abs(rotY), direction, 0, 0); // changing Y - rotate around X axis
|
||||
F32 direction = (rotY < 0) ? 1.f : -1.f; // reverse for Y (value increases from bottom to top)
|
||||
delta.setAngleAxis(mIncrementMouse * abs(rotY), direction, 0.f, 0.f); // changing Y - rotate around X axis
|
||||
mValue *= delta;
|
||||
}
|
||||
}
|
||||
|
|
@ -416,10 +416,10 @@ bool LLVirtualTrackball::handleHover(S32 x, S32 y, MASK mask)
|
|||
return true; // don't drag outside the circle
|
||||
}
|
||||
|
||||
F32 radius = mTouchArea->getRect().getWidth() / 2;
|
||||
F32 xx = x - mTouchArea->getRect().getCenterX();
|
||||
F32 yy = y - mTouchArea->getRect().getCenterY();
|
||||
F32 dist = sqrt(pow(xx, 2) + pow(yy, 2));
|
||||
F32 radius = (F32)mTouchArea->getRect().getWidth() / 2.f;
|
||||
F32 xx = (F32)(x - mTouchArea->getRect().getCenterX());
|
||||
F32 yy = (F32)(y - mTouchArea->getRect().getCenterY());
|
||||
F32 dist = (F32)(sqrt(pow(xx, 2) + pow(yy, 2)));
|
||||
|
||||
F32 azimuth = llclamp(acosf(xx / dist), 0.0f, F_PI);
|
||||
F32 altitude = llclamp(acosf(dist / radius), 0.0f, F_PI_BY_TWO);
|
||||
|
|
|
|||
|
|
@ -159,15 +159,15 @@ void drawArrow(S32 tailX, S32 tailY, S32 tipX, S32 tipY, LLColor4 color)
|
|||
|
||||
S32 arrowLength = (abs(dx) < ARROW_LENGTH_LONG && abs(dy) < ARROW_LENGTH_LONG) ? ARROW_LENGTH_SHORT : ARROW_LENGTH_LONG;
|
||||
|
||||
F32 theta = std::atan2(dy, dx);
|
||||
F32 theta = (F32)std::atan2(dy, dx);
|
||||
|
||||
F32 rad = ARROW_ANGLE * std::atan(1) * 4 / 180;
|
||||
F32 rad = (F32)(ARROW_ANGLE * std::atan(1) * 4 / 180);
|
||||
F32 x = tipX - arrowLength * cos(theta + rad);
|
||||
F32 y = tipY - arrowLength * sin(theta + rad);
|
||||
F32 rad2 = -1 * ARROW_ANGLE * std::atan(1) * 4 / 180;
|
||||
F32 rad2 = (F32)(-1 * ARROW_ANGLE * std::atan(1) * 4 / 180);
|
||||
F32 x2 = tipX - arrowLength * cos(theta + rad2);
|
||||
F32 y2 = tipY - arrowLength * sin(theta + rad2);
|
||||
gl_triangle_2d(tipX, tipY, x, y, x2, y2, color, true);
|
||||
gl_triangle_2d(tipX, tipY, (S32)x, (S32)y, (S32)x2, (S32)y2, color, true);
|
||||
}
|
||||
|
||||
void LLXYVector::draw()
|
||||
|
|
@ -179,18 +179,18 @@ void LLXYVector::draw()
|
|||
|
||||
if (mLogarithmic)
|
||||
{
|
||||
pointX = (log(llabs(mValueX) + 1)) / mLogScaleX;
|
||||
pointX = (S32)((log(llabs(mValueX) + 1)) / mLogScaleX);
|
||||
pointX *= (mValueX < 0) ? -1 : 1;
|
||||
pointX += centerX;
|
||||
|
||||
pointY = (log(llabs(mValueY) + 1)) / mLogScaleY;
|
||||
pointY = (S32)((log(llabs(mValueY) + 1)) / mLogScaleY);
|
||||
pointY *= (mValueY < 0) ? -1 : 1;
|
||||
pointY += centerY;
|
||||
}
|
||||
else // linear
|
||||
{
|
||||
pointX = centerX + (mValueX * mTouchArea->getRect().getWidth() / (2 * mMaxValueX));
|
||||
pointY = centerY + (mValueY * mTouchArea->getRect().getHeight() / (2 * mMaxValueY));
|
||||
pointX = centerX + (S32)(mValueX * mTouchArea->getRect().getWidth() / (2 * mMaxValueX));
|
||||
pointY = centerY + (S32)(mValueY * mTouchArea->getRect().getHeight() / (2 * mMaxValueY));
|
||||
}
|
||||
|
||||
// fill
|
||||
|
|
@ -223,7 +223,7 @@ void LLXYVector::draw()
|
|||
}
|
||||
|
||||
// draw center circle
|
||||
gl_circle_2d(centerX, centerY, CENTER_CIRCLE_RADIUS, 12, true);
|
||||
gl_circle_2d((F32)centerX, (F32)centerY, CENTER_CIRCLE_RADIUS, 12, true);
|
||||
|
||||
LLView::draw();
|
||||
}
|
||||
|
|
@ -232,7 +232,7 @@ void LLXYVector::onEditChange()
|
|||
{
|
||||
if (getEnabled())
|
||||
{
|
||||
setValueAndCommit(mXEntry->getValue().asReal(), mYEntry->getValue().asReal());
|
||||
setValueAndCommit((F32)mXEntry->getValue().asReal(), (F32)mYEntry->getValue().asReal());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -240,7 +240,7 @@ void LLXYVector::setValue(const LLSD& value)
|
|||
{
|
||||
if (value.isArray())
|
||||
{
|
||||
setValue(value[0].asReal(), value[1].asReal());
|
||||
setValue((F32)value[0].asReal(), (F32)value[1].asReal());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
|
|||
|
||||
//convert BSTR to std::string
|
||||
std::wstring ws(caption, SysStringLen(caption));
|
||||
std::string caption_str(ws.begin(), ws.end());
|
||||
std::string caption_str = ll_convert_wide_to_string(ws);
|
||||
LLStringUtil::toLower(caption_str);
|
||||
|
||||
bool found = false;
|
||||
|
|
@ -395,7 +395,7 @@ std::string LLDXHardware::getDriverVersionWMI(EGPUVendor vendor)
|
|||
|
||||
//convert BSTR to std::string
|
||||
std::wstring ws(driverVersion, SysStringLen(driverVersion));
|
||||
std::string str(ws.begin(), ws.end());
|
||||
std::string str = ll_convert_wide_to_string(ws);
|
||||
LL_INFOS("AppInit") << " DriverVersion : " << str << LL_ENDL;
|
||||
|
||||
if (mDriverVersion.empty())
|
||||
|
|
|
|||
|
|
@ -1809,7 +1809,7 @@ void* LLWindowWin32::createSharedContext()
|
|||
mMaxGLVersion = llclamp(mMaxGLVersion, 3.f, 4.6f);
|
||||
|
||||
S32 version_major = llfloor(mMaxGLVersion);
|
||||
S32 version_minor = llround((mMaxGLVersion-version_major)*10);
|
||||
S32 version_minor = (S32)llround((mMaxGLVersion-version_major)*10);
|
||||
|
||||
S32 attribs[] =
|
||||
{
|
||||
|
|
@ -2464,12 +2464,12 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
|
|||
{
|
||||
window_imp->mKeyCharCode = 0; // don't know until wm_char comes in next
|
||||
window_imp->mKeyScanCode = (l_param >> 16) & 0xff;
|
||||
window_imp->mKeyVirtualKey = w_param;
|
||||
window_imp->mKeyVirtualKey = (U32)w_param;
|
||||
window_imp->mRawMsg = u_msg;
|
||||
window_imp->mRawWParam = w_param;
|
||||
window_imp->mRawLParam = l_param;
|
||||
window_imp->mRawWParam = (U32)w_param;
|
||||
window_imp->mRawLParam = (U32)l_param;
|
||||
|
||||
gKeyboard->handleKeyDown(w_param, mask);
|
||||
gKeyboard->handleKeyDown((U16)w_param, mask);
|
||||
});
|
||||
if (eat_keystroke) return 0; // skip DefWindowProc() handling if we're consuming the keypress
|
||||
break;
|
||||
|
|
@ -2484,14 +2484,14 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
|
|||
window_imp->post([=]()
|
||||
{
|
||||
window_imp->mKeyScanCode = (l_param >> 16) & 0xff;
|
||||
window_imp->mKeyVirtualKey = w_param;
|
||||
window_imp->mKeyVirtualKey = (U32)w_param;
|
||||
window_imp->mRawMsg = u_msg;
|
||||
window_imp->mRawWParam = w_param;
|
||||
window_imp->mRawLParam = l_param;
|
||||
window_imp->mRawWParam = (U32)w_param;
|
||||
window_imp->mRawLParam = (U32)l_param;
|
||||
|
||||
{
|
||||
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_KEYUP");
|
||||
gKeyboard->handleKeyUp(w_param, mask);
|
||||
gKeyboard->handleKeyUp((U16)w_param, mask);
|
||||
}
|
||||
});
|
||||
if (eat_keystroke) return 0; // skip DefWindowProc() handling if we're consuming the keypress
|
||||
|
|
@ -2531,7 +2531,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
|
|||
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_IME_COMPOSITION");
|
||||
if (LLWinImm::isAvailable() && window_imp->mPreeditor)
|
||||
{
|
||||
WINDOW_IMP_POST(window_imp->handleCompositionMessage(l_param));
|
||||
WINDOW_IMP_POST(window_imp->handleCompositionMessage((U32)l_param));
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
|
@ -2552,10 +2552,10 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
|
|||
LL_PROFILE_ZONE_NAMED_CATEGORY_WIN32("mwp - WM_CHAR");
|
||||
window_imp->post([=]()
|
||||
{
|
||||
window_imp->mKeyCharCode = w_param;
|
||||
window_imp->mKeyCharCode = (U32)w_param;
|
||||
window_imp->mRawMsg = u_msg;
|
||||
window_imp->mRawWParam = w_param;
|
||||
window_imp->mRawLParam = l_param;
|
||||
window_imp->mRawWParam = (U32)w_param;
|
||||
window_imp->mRawLParam = (U32)l_param;
|
||||
|
||||
// Should really use WM_UNICHAR eventually, but it requires a specific Windows version and I need
|
||||
// to figure out how that works. - Doug
|
||||
|
|
@ -2979,7 +2979,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
|
|||
|
||||
window_imp->post([=]()
|
||||
{
|
||||
window_imp->mCallbacks->handleDataCopy(window_imp, myType, data);
|
||||
window_imp->mCallbacks->handleDataCopy(window_imp, (S32)myType, data);
|
||||
delete[] data;
|
||||
});
|
||||
};
|
||||
|
|
@ -3039,8 +3039,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
|
|||
S32 width = GetSystemMetrics(v_desktop ? SM_CXVIRTUALSCREEN : SM_CXSCREEN);
|
||||
S32 height = GetSystemMetrics(v_desktop ? SM_CYVIRTUALSCREEN : SM_CYSCREEN);
|
||||
|
||||
absolute_x = (raw->data.mouse.lLastX / 65535.0f) * width;
|
||||
absolute_y = (raw->data.mouse.lLastY / 65535.0f) * height;
|
||||
absolute_x = (S32)((raw->data.mouse.lLastX / 65535.0f) * width);
|
||||
absolute_y = (S32)((raw->data.mouse.lLastY / 65535.0f) * height);
|
||||
}
|
||||
|
||||
window_imp->mRawMouseDelta.mX += absolute_x - prev_absolute_x;
|
||||
|
|
@ -3061,8 +3061,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
|
|||
}
|
||||
else
|
||||
{
|
||||
window_imp->mRawMouseDelta.mX += round((F32)raw->data.mouse.lLastX * (F32)speed / DEFAULT_SPEED);
|
||||
window_imp->mRawMouseDelta.mY -= round((F32)raw->data.mouse.lLastY * (F32)speed / DEFAULT_SPEED);
|
||||
window_imp->mRawMouseDelta.mX += (S32)round((F32)raw->data.mouse.lLastX * (F32)speed / DEFAULT_SPEED);
|
||||
window_imp->mRawMouseDelta.mY -= (S32)round((F32)raw->data.mouse.lLastY * (F32)speed / DEFAULT_SPEED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4658,7 +4658,7 @@ void LLWindowWin32::LLWindowWin32Thread::checkDXMem()
|
|||
DXGI_ADAPTER_DESC desc;
|
||||
p_dxgi_adapter->GetDesc(&desc);
|
||||
std::wstring description_w((wchar_t*)desc.Description);
|
||||
std::string description(description_w.begin(), description_w.end());
|
||||
std::string description = ll_convert_wide_to_string(description_w);
|
||||
LL_INFOS("Window") << "Graphics adapter index: " << graphics_adapter_index << ", "
|
||||
<< "Description: " << description << ", "
|
||||
<< "DeviceId: " << desc.DeviceId << ", "
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string)
|
|||
mTextureWidth = texture_width;
|
||||
mTextureHeight = texture_height;
|
||||
|
||||
libvlc_time_t time = 1000.0 * mCurTime;
|
||||
libvlc_time_t time = (libvlc_time_t)(1000.0 * mCurTime);
|
||||
|
||||
playMedia();
|
||||
|
||||
|
|
@ -655,7 +655,7 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string)
|
|||
{
|
||||
if (mLibVLCMediaPlayer)
|
||||
{
|
||||
libvlc_time_t time = 1000.0 * message_in.getValueReal("time");
|
||||
libvlc_time_t time = (libvlc_time_t)(1000.0 * message_in.getValueReal("time"));
|
||||
libvlc_media_player_set_time(mLibVLCMediaPlayer, time);
|
||||
time = libvlc_media_player_get_time(mLibVLCMediaPlayer);
|
||||
if (time < 0)
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ namespace LL
|
|||
|
||||
void Buffer::erase(Asset& asset, S32 offset, S32 length)
|
||||
{
|
||||
S32 idx = this - &asset.mBuffers[0];
|
||||
S32 idx = (S32)(this - &asset.mBuffers[0]);
|
||||
|
||||
mData.erase(mData.begin() + offset, mData.begin() + offset + length);
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ bool Buffer::save(Asset& asset, const std::string& folder)
|
|||
{
|
||||
if (mName.empty())
|
||||
{
|
||||
S32 idx = this - &asset.mBuffers[0];
|
||||
S32 idx = (S32)(this - &asset.mBuffers[0]);
|
||||
mUri = llformat("buffer_%d.bin", idx);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -127,8 +127,8 @@ void Animation::apply(Asset& asset, float time)
|
|||
bool Animation::Sampler::prep(Asset& asset)
|
||||
{
|
||||
Accessor& accessor = asset.mAccessors[mInput];
|
||||
mMinTime = accessor.mMin[0];
|
||||
mMaxTime = accessor.mMax[0];
|
||||
mMinTime = (F32)accessor.mMin[0];
|
||||
mMaxTime = (F32)accessor.mMax[0];
|
||||
|
||||
mFrameTimes.resize(accessor.mCount);
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ void Node::updateTransforms(Asset& asset, const mat4& parentMatrix)
|
|||
|
||||
mAssetMatrixInv = glm::inverse(mAssetMatrix);
|
||||
|
||||
S32 my_index = this - &asset.mNodes[0];
|
||||
S32 my_index = (S32)(this - &asset.mNodes[0]);
|
||||
|
||||
for (auto& childIndex : mChildren)
|
||||
{
|
||||
|
|
@ -271,11 +271,11 @@ S32 Asset::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
|
|||
local_end = p;
|
||||
|
||||
// pointer math to get the node index
|
||||
node_hit = &node - &mNodes[0];
|
||||
node_hit = (S32)(&node - &mNodes[0]);
|
||||
llassert(&mNodes[node_hit] == &node);
|
||||
|
||||
//pointer math to get the primitive index
|
||||
primitive_hit = &primitive - &mesh.mPrimitives[0];
|
||||
primitive_hit = (S32)(&primitive - &mesh.mPrimitives[0]);
|
||||
llassert(&mesh.mPrimitives[primitive_hit] == &primitive);
|
||||
}
|
||||
}
|
||||
|
|
@ -1028,7 +1028,7 @@ bool Image::save(Asset& asset, const std::string& folder)
|
|||
const std::string& delim = gDirUtilp->getDirDelimiter();
|
||||
if (name.empty())
|
||||
{
|
||||
S32 idx = this - asset.mImages.data();
|
||||
S32 idx = (S32)(this - asset.mImages.data());
|
||||
name = llformat("image_%d", idx);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ namespace LL
|
|||
template<>
|
||||
inline void copyVec3<U16, LLColor4U>(U16* src, LLColor4U& dst)
|
||||
{
|
||||
dst.set(src[0], src[1], src[2], 255);
|
||||
dst.set((U8)(src[0]), (U8)(src[1]), (U8)(src[2]), 255);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
@ -193,13 +193,13 @@ namespace LL
|
|||
template<>
|
||||
inline void copyVec4<U16, LLColor4U>(U16* src, LLColor4U& dst)
|
||||
{
|
||||
dst.set(src[0], src[1], src[2], src[3]);
|
||||
dst.set((U8)(src[0]), (U8)(src[1]), (U8)(src[2]), ((U8)src[3]));
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void copyVec4<F32, LLColor4U>(F32* src, LLColor4U& dst)
|
||||
{
|
||||
dst.set(src[0]*255, src[1]*255, src[2]*255, src[3]*255);
|
||||
dst.set((U8)(src[0]*255.f), (U8)(src[1]*255.f), (U8)(src[2]*255.f), (U8)(src[3]*255.f));
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
@ -902,7 +902,7 @@ namespace LL
|
|||
{
|
||||
if (src.is_int64())
|
||||
{
|
||||
dst = src.get_int64();
|
||||
dst = (U32)src.get_int64();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -957,7 +957,7 @@ namespace LL
|
|||
{
|
||||
if (src.is_int64())
|
||||
{
|
||||
dst = src.get_int64();
|
||||
dst = (U32)src.get_int64();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -782,7 +782,7 @@ void GLTFSceneManager::bind(Asset& asset, Material& material)
|
|||
bindTexture(asset, TextureType::EMISSIVE, material.mEmissiveTexture, LLViewerFetchedTexture::sWhiteImagep);
|
||||
}
|
||||
|
||||
shader->uniform1i(LLShaderMgr::GLTF_MATERIAL_ID, &material - &asset.mMaterials[0]);
|
||||
shader->uniform1i(LLShaderMgr::GLTF_MATERIAL_ID, (GLint)(&material - &asset.mMaterials[0]));
|
||||
}
|
||||
|
||||
LLMatrix4a inverse(const LLMatrix4a& mat)
|
||||
|
|
|
|||
|
|
@ -150,9 +150,9 @@ void LLAccountingCostManager::accountingCostCoro(std::string url,
|
|||
F32 networkCost = 0.0f;
|
||||
F32 simulationCost = 0.0f;
|
||||
|
||||
physicsCost = selected["physics"].asReal();
|
||||
networkCost = selected["streaming"].asReal();
|
||||
simulationCost = selected["simulation"].asReal();
|
||||
physicsCost = (F32)selected["physics"].asReal();
|
||||
networkCost = (F32)selected["streaming"].asReal();
|
||||
simulationCost = (F32)selected["simulation"].asReal();
|
||||
|
||||
SelectionCost selectionCost( physicsCost, networkCost, simulationCost);
|
||||
|
||||
|
|
|
|||
|
|
@ -2662,9 +2662,9 @@ void LLAgent::setStartPositionSuccess(const LLSD &result)
|
|||
(!result["HomeLocation"]["LocationPos"].has("Z")))
|
||||
break;
|
||||
|
||||
agent_pos.mV[VX] = result["HomeLocation"]["LocationPos"]["X"].asInteger();
|
||||
agent_pos.mV[VY] = result["HomeLocation"]["LocationPos"]["Y"].asInteger();
|
||||
agent_pos.mV[VZ] = result["HomeLocation"]["LocationPos"]["Z"].asInteger();
|
||||
agent_pos.mV[VX] = (F32)result["HomeLocation"]["LocationPos"]["X"].asInteger();
|
||||
agent_pos.mV[VY] = (F32)result["HomeLocation"]["LocationPos"]["Y"].asInteger();
|
||||
agent_pos.mV[VZ] = (F32)result["HomeLocation"]["LocationPos"]["Z"].asInteger();
|
||||
|
||||
error = false;
|
||||
|
||||
|
|
@ -2778,7 +2778,7 @@ bool LLAgent::canAccessMaturityInRegion( U64 region_handle ) const
|
|||
|
||||
bool LLAgent::canAccessMaturityAtGlobal( LLVector3d pos_global ) const
|
||||
{
|
||||
U64 region_handle = to_region_handle_global( pos_global.mdV[0], pos_global.mdV[1] );
|
||||
U64 region_handle = to_region_handle_global((F32)pos_global.mdV[0], (F32)pos_global.mdV[1]);
|
||||
return canAccessMaturityInRegion( region_handle );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2114,14 +2114,14 @@ void LLAgentCamera::handleScrollWheel(S32 clicks)
|
|||
F32 camera_offset_initial_mag = getCameraOffsetInitial().magVec();
|
||||
|
||||
F32 current_zoom_fraction = mTargetCameraDistance / (camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale"));
|
||||
current_zoom_fraction *= 1.f - pow(ROOT_ROOT_TWO, clicks);
|
||||
current_zoom_fraction *= 1.f - (F32)pow(ROOT_ROOT_TWO, clicks);
|
||||
|
||||
cameraOrbitIn(current_zoom_fraction * camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale"));
|
||||
}
|
||||
else
|
||||
{
|
||||
F32 current_zoom_fraction = (F32)mCameraFocusOffsetTarget.magVec();
|
||||
cameraOrbitIn(current_zoom_fraction * (1.f - pow(ROOT_ROOT_TWO, clicks)));
|
||||
cameraOrbitIn(current_zoom_fraction * (1.f - (F32)pow(ROOT_ROOT_TWO, clicks)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,9 +156,9 @@ void LLAgentListener::requestTeleport(LLSD const & event_data) const
|
|||
else
|
||||
{
|
||||
std::string url = LLSLURL(event_data["regionname"],
|
||||
LLVector3(event_data["x"].asReal(),
|
||||
event_data["y"].asReal(),
|
||||
event_data["z"].asReal())).getSLURLString();
|
||||
LLVector3((F32)event_data["x"].asReal(),
|
||||
(F32)event_data["y"].asReal(),
|
||||
(F32)event_data["z"].asReal())).getSLURLString();
|
||||
LLURLDispatcher::dispatch(url, LLCommandHandler::NAV_TYPE_CLICKED, NULL, false);
|
||||
}
|
||||
}
|
||||
|
|
@ -344,7 +344,7 @@ void LLAgentListener::startAutoPilot(LLSD const & event_data)
|
|||
F32 rotation_threshold = 0.03f;
|
||||
if (event_data.has("rotation_threshold"))
|
||||
{
|
||||
rotation_threshold = event_data["rotation_threshold"].asReal();
|
||||
rotation_threshold = (F32)event_data["rotation_threshold"].asReal();
|
||||
}
|
||||
|
||||
bool allow_flying = true;
|
||||
|
|
@ -357,7 +357,7 @@ void LLAgentListener::startAutoPilot(LLSD const & event_data)
|
|||
F32 stop_distance = 0.f;
|
||||
if (event_data.has("stop_distance"))
|
||||
{
|
||||
stop_distance = event_data["stop_distance"].asReal();
|
||||
stop_distance = (F32)event_data["stop_distance"].asReal();
|
||||
}
|
||||
|
||||
// Clear follow target, this is doing a path
|
||||
|
|
@ -446,7 +446,7 @@ void LLAgentListener::startFollowPilot(LLSD const & event_data)
|
|||
F32 stop_distance = 0.f;
|
||||
if (event_data.has("stop_distance"))
|
||||
{
|
||||
stop_distance = event_data["stop_distance"].asReal();
|
||||
stop_distance = (F32)event_data["stop_distance"].asReal();
|
||||
}
|
||||
|
||||
if (target_id.notNull())
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ void LLAgentPilot::loadXML(const std::string& filename)
|
|||
Action action;
|
||||
action.mTime = record["time"].asReal();
|
||||
action.mType = (EActionType)record["type"].asInteger();
|
||||
action.mCameraView = record["camera_view"].asReal();
|
||||
action.mCameraView = (F32)record["camera_view"].asReal();
|
||||
action.mTarget = ll_vector3d_from_sd(record["target"]);
|
||||
action.mCameraOrigin = ll_vector3_from_sd(record["camera_origin"]);
|
||||
action.mCameraXAxis = ll_vector3_from_sd(record["camera_xaxis"]);
|
||||
|
|
@ -297,8 +297,8 @@ void LLAgentPilot::moveCamera()
|
|||
S32 start_index = llmax(mCurrentAction-1,0);
|
||||
S32 end_index = mCurrentAction;
|
||||
F32 t = 0.0;
|
||||
F32 timedelta = mActions[end_index].mTime - mActions[start_index].mTime;
|
||||
F32 tickelapsed = mTimer.getElapsedTimeF32()-mActions[start_index].mTime;
|
||||
F32 timedelta = (F32)(mActions[end_index].mTime - mActions[start_index].mTime);
|
||||
F32 tickelapsed = mTimer.getElapsedTimeF32()-(F32)mActions[start_index].mTime;
|
||||
if (timedelta > 0.0)
|
||||
{
|
||||
t = tickelapsed/timedelta;
|
||||
|
|
|
|||
|
|
@ -3934,7 +3934,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
|
|||
LL_WARNS("Avatar") << "Bake retry count exceeded!" << LL_ENDL;
|
||||
break;
|
||||
}
|
||||
F32 timeout = pow(BAKE_RETRY_TIMEOUT, static_cast<float>(retryCount)) - 1.0;
|
||||
F32 timeout = pow(BAKE_RETRY_TIMEOUT, static_cast<float>(retryCount)) - 1.0f;
|
||||
|
||||
LL_WARNS("Avatar") << "Bake retry #" << retryCount << " in " << timeout << " seconds." << LL_ENDL;
|
||||
|
||||
|
|
@ -4329,7 +4329,7 @@ LLAppearanceMgr::LLAppearanceMgr():
|
|||
outfit_observer.addCOFSavedCallback(boost::bind(
|
||||
&LLAppearanceMgr::setOutfitLocked, this, false));
|
||||
|
||||
mUnlockOutfitTimer.reset(new LLOutfitUnLockTimer(gSavedSettings.getS32(
|
||||
mUnlockOutfitTimer.reset(new LLOutfitUnLockTimer((F32)gSavedSettings.getS32(
|
||||
"OutfitOperationsTimeout")));
|
||||
|
||||
gIdleCallbacks.addFunction(&LLAttachmentsMgr::onIdle, NULL);
|
||||
|
|
|
|||
|
|
@ -456,7 +456,7 @@ void idle_afk_check()
|
|||
{
|
||||
// check idle timers
|
||||
F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32();
|
||||
F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
|
||||
F32 afk_timeout = (F32)gSavedSettings.getS32("AFKTimeout");
|
||||
if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK())
|
||||
{
|
||||
LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;
|
||||
|
|
@ -1959,7 +1959,7 @@ bool LLAppViewer::cleanup()
|
|||
LL_INFOS() << "Saving Data" << LL_ENDL;
|
||||
|
||||
// Store the time of our current logoff
|
||||
gSavedPerAccountSettings.setU32("LastLogoff", time_corrected());
|
||||
gSavedPerAccountSettings.setU32("LastLogoff", (U32)time_corrected());
|
||||
|
||||
if (LLEnvironment::instanceExists())
|
||||
{
|
||||
|
|
@ -2332,7 +2332,7 @@ void LLAppViewer::initLoggingAndGetLastDuration()
|
|||
int log_stat_result = LLFile::stat(log_file, &log_file_stat);
|
||||
if (0 == start_stat_result && 0 == log_stat_result)
|
||||
{
|
||||
int elapsed_seconds = log_file_stat.st_ctime - start_marker_stat.st_ctime;
|
||||
int elapsed_seconds = (int)(log_file_stat.st_ctime - start_marker_stat.st_ctime);
|
||||
// only report a last run time if the last viewer was the same version
|
||||
// because this stat will be counted against this version
|
||||
if (markerIsSameVersion(start_marker_file_name))
|
||||
|
|
@ -3434,7 +3434,7 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||
info["LIBVLC_VERSION"] = "Undefined";
|
||||
#endif
|
||||
|
||||
S32 packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
|
||||
S32 packets_in = (S32)LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
|
||||
if (packets_in > 0)
|
||||
{
|
||||
info["PACKETS_LOST"] = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST);
|
||||
|
|
|
|||
|
|
@ -695,7 +695,7 @@ bool LLAvatarPropertiesProcessor::isPendingRequest(const LLUUID& avatar_id, EAva
|
|||
if (it == mRequestTimestamps.end()) return false;
|
||||
|
||||
// We found a request, check if it has timed out
|
||||
U32 now = time(nullptr);
|
||||
U32 now = (U32)time(nullptr);
|
||||
const U32 REQUEST_EXPIRE_SECS = 5;
|
||||
U32 expires = it->second + REQUEST_EXPIRE_SECS;
|
||||
|
||||
|
|
@ -709,7 +709,7 @@ bool LLAvatarPropertiesProcessor::isPendingRequest(const LLUUID& avatar_id, EAva
|
|||
void LLAvatarPropertiesProcessor::addPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type)
|
||||
{
|
||||
timestamp_map_t::key_type key = std::make_pair(avatar_id, type);
|
||||
U32 now = time(nullptr);
|
||||
U32 now = (U32)time(nullptr);
|
||||
// Add or update existing (expired) request
|
||||
mRequestTimestamps[ key ] = now;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64
|
|||
// Going to request each 15 seconds either way, so don't wait
|
||||
// too long and don't repeat
|
||||
httpOpts->setRetries(0);
|
||||
httpOpts->setTimeout(SECS_BETWEEN_REGION_REQUEST);
|
||||
httpOpts->setTimeout((unsigned int)SECS_BETWEEN_REGION_REQUEST);
|
||||
|
||||
LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts);
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ void LLAvatarRenderNotifier::updateNotificationRegion(U32 agentcount, U32 overLi
|
|||
// save current values for later use
|
||||
mLatestAgentsCount = agentcount > overLimit ? agentcount - 1 : agentcount; // subtract self
|
||||
mLatestOverLimitAgents = overLimit;
|
||||
mLatestOverLimitPct = mLatestAgentsCount != 0 ? ((F32)overLimit / (F32)mLatestAgentsCount) * 100.0 : 0;
|
||||
mLatestOverLimitPct = mLatestAgentsCount != 0 ? ((F32)overLimit / (F32)mLatestAgentsCount) * 100.0f : 0.f;
|
||||
|
||||
if (mAgentsCount == mLatestAgentsCount
|
||||
&& mOverLimitAgents == mLatestOverLimitAgents)
|
||||
|
|
@ -191,7 +191,7 @@ void LLAvatarRenderNotifier::updateNotificationRegion(U32 agentcount, U32 overLi
|
|||
|
||||
// default timeout before next notification
|
||||
static LLCachedControl<U32> pop_up_delay(gSavedSettings, "ComplexityChangesPopUpDelay", 300);
|
||||
mPopUpDelayTimer.resetWithExpiry(pop_up_delay);
|
||||
mPopUpDelayTimer.resetWithExpiry((F32)pop_up_delay);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -500,6 +500,6 @@ void LLHUDRenderNotifier::displayHUDNotification(EWarnLevel warn_type, LLUUID ob
|
|||
.name("HUDComplexityWarning")
|
||||
.expiry(expire_date)
|
||||
.substitutions(msg_args));
|
||||
mHUDPopUpDelayTimer.resetWithExpiry(pop_up_delay);
|
||||
mHUDPopUpDelayTimer.resetWithExpiry((F32)pop_up_delay);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ void LLChannelManager::onLoginCompleted()
|
|||
mStartUpChannel->setMouseDownCallback(boost::bind(&LLFloaterNotificationsTabbed::onStartUpToastClick, LLFloaterNotificationsTabbed::getInstance(), _2, _3, _4));
|
||||
|
||||
mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
|
||||
mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
|
||||
mStartUpChannel->createStartUpToast(away_notifications, (F32)gSavedSettings.getS32("StartUpToastLifeTime"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ public:
|
|||
if (mTime > 0) // have frame time
|
||||
{
|
||||
time_t current_time = time_corrected();
|
||||
time_t message_time = current_time - LLFrameTimer::getElapsedSeconds() + mTime;
|
||||
time_t message_time = (time_t)(current_time - LLFrameTimer::getElapsedSeconds() + mTime);
|
||||
|
||||
time_string = "[" + LLTrans::getString("TimeMonth") + "]/["
|
||||
+ LLTrans::getString("TimeDay") + "]/["
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
|
|||
std::string color_name = notification["text_color"].asString();
|
||||
|
||||
LLColor4 textColor = LLUIColorTable::instance().getColor(color_name);
|
||||
textColor.mV[VALPHA] =notification["color_alpha"].asReal();
|
||||
textColor.mV[VALPHA] = (F32)notification["color_alpha"].asReal();
|
||||
|
||||
S32 font_size = notification["font_size"].asInteger();
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
|
|||
std::string color_name = notification["text_color"].asString();
|
||||
|
||||
LLColor4 textColor = LLUIColorTable::instance().getColor(color_name);
|
||||
textColor.mV[VALPHA] =notification["color_alpha"].asReal();
|
||||
textColor.mV[VALPHA] = (F32)notification["color_alpha"].asReal();
|
||||
|
||||
S32 font_size = notification["font_size"].asInteger();
|
||||
|
||||
|
|
|
|||
|
|
@ -211,5 +211,5 @@ S32 LLDateUtil::secondsSinceEpochFromString(const std::string& format, const std
|
|||
// is calculated with no time zone corrections.
|
||||
time_duration diff = time_t_date - time_t_epoch;
|
||||
|
||||
return diff.total_seconds();
|
||||
return (S32)diff.total_seconds();
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue