Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings
parent
cb3bd8865a
commit
b42f9d836b
|
|
@ -422,7 +422,7 @@ const LLVector4a* LLDriverParam::getNextDistortion(U32 *index, LLPolyMesh **po
|
|||
|
||||
S32 LLDriverParam::getDrivenParamsCount() const
|
||||
{
|
||||
return mDriven.size();
|
||||
return static_cast<S32>(mDriven.size());
|
||||
}
|
||||
|
||||
const LLViewerVisualParam* LLDriverParam::getDrivenParam(S32 index) const
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ LLTexLayer* LLLocalTextureObject::getTexLayer(const std::string &name)
|
|||
|
||||
U32 LLLocalTextureObject::getNumTexLayers() const
|
||||
{
|
||||
return mTexLayers.size();
|
||||
return static_cast<U32>(mTexLayers.size());
|
||||
}
|
||||
|
||||
LLUUID LLLocalTextureObject::getID() const
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ LLPolyMorphData::~LLPolyMorphData()
|
|||
bool LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
|
||||
{
|
||||
S32 numVertices;
|
||||
S32 numRead;
|
||||
size_t numRead;
|
||||
|
||||
numRead = fread(&numVertices, sizeof(S32), 1, fp);
|
||||
llendianswizzle(&numVertices, sizeof(S32), 1);
|
||||
|
|
@ -384,7 +384,7 @@ bool LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
|
|||
if (!mMorphData)
|
||||
{
|
||||
const std::string driven_tag = "_Driven";
|
||||
U32 pos = morph_param_name.find(driven_tag);
|
||||
auto pos = morph_param_name.find(driven_tag);
|
||||
if (pos > 0)
|
||||
{
|
||||
morph_param_name = morph_param_name.substr(0,pos);
|
||||
|
|
|
|||
|
|
@ -744,7 +744,7 @@ void LLWearable::writeToAvatar(LLAvatarAppearance* avatarp)
|
|||
std::string terse_F32_to_string(F32 f)
|
||||
{
|
||||
std::string r = llformat("%.2f", f);
|
||||
S32 len = r.length();
|
||||
auto len = r.length();
|
||||
|
||||
// "1.20" -> "1.2"
|
||||
// "24.00" -> "24."
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ U32 LLWearableData::getWearableCount(const LLWearableType::EType type) const
|
|||
return 0;
|
||||
}
|
||||
const wearableentry_vec_t& wearable_vec = wearable_iter->second;
|
||||
return wearable_vec.size();
|
||||
return static_cast<U32>(wearable_vec.size());
|
||||
}
|
||||
|
||||
U32 LLWearableData::getWearableCount(const U32 tex_index) const
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ bool LLVorbisDecodeState::finishDecode()
|
|||
ov_clear(&mVF);
|
||||
|
||||
// write "data" chunk length, in little-endian format
|
||||
S32 data_length = mWAVBuffer.size() - WAV_HEADER_SIZE;
|
||||
S32 data_length = static_cast<S32>(mWAVBuffer.size()) - WAV_HEADER_SIZE;
|
||||
mWAVBuffer[40] = (data_length) & 0x000000FF;
|
||||
mWAVBuffer[41] = (data_length >> 8) & 0x000000FF;
|
||||
mWAVBuffer[42] = (data_length >> 16) & 0x000000FF;
|
||||
|
|
@ -463,7 +463,7 @@ bool LLVorbisDecodeState::finishDecode()
|
|||
{
|
||||
memcpy(&mWAVBuffer[WAV_HEADER_SIZE], pcmout, (2 * fade_length)); /*Flawfinder: ignore*/
|
||||
}
|
||||
S32 near_end = mWAVBuffer.size() - (2 * fade_length);
|
||||
S32 near_end = static_cast<S32>(mWAVBuffer.size()) - (2 * fade_length);
|
||||
if ((S32)mWAVBuffer.size() >= ( near_end + 2* fade_length))
|
||||
{
|
||||
memcpy(pcmout, &mWAVBuffer[near_end], (2 * fade_length)); /*Flawfinder: ignore*/
|
||||
|
|
@ -491,7 +491,7 @@ bool LLVorbisDecodeState::finishDecode()
|
|||
return true; // we've finished
|
||||
}
|
||||
mBytesRead = -1;
|
||||
mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, mWAVBuffer.size(),
|
||||
mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, static_cast<S32>(mWAVBuffer.size()),
|
||||
new WriteResponder(this));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ LLCharacter::~LLCharacter()
|
|||
delete param;
|
||||
}
|
||||
|
||||
U32 i ;
|
||||
U32 size = sInstances.size() ;
|
||||
size_t i ;
|
||||
size_t size = sInstances.size() ;
|
||||
for(i = 0 ; i < size ; i++)
|
||||
{
|
||||
if(sInstances[i] == this)
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ bool LLGestureList::trigger(KEY key, MASK mask)
|
|||
U8 *LLGestureList::serialize(U8 *buffer) const
|
||||
{
|
||||
// a single S32 serves as the header that tells us how many to read
|
||||
U32 count = mList.size();
|
||||
auto count = mList.size();
|
||||
htolememcpy(buffer, &count, MVT_S32, 4);
|
||||
buffer += sizeof(count);
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public:
|
|||
bool triggerAndReviseString(const std::string &string, std::string* revised_string);
|
||||
|
||||
// Used for construction from UI
|
||||
S32 count() const { return mList.size(); }
|
||||
S32 count() const { return static_cast<S32>(mList.size()); }
|
||||
virtual LLGesture* get(S32 i) const { return mList.at(i); }
|
||||
virtual void put(LLGesture* gesture) { mList.push_back( gesture ); }
|
||||
void deleteAll();
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ void LLVector3OverrideMap::showJointVector3Overrides( std::ostringstream& os ) c
|
|||
|
||||
U32 LLVector3OverrideMap::count() const
|
||||
{
|
||||
return m_map.size();
|
||||
return static_cast<U32>(m_map.size());
|
||||
}
|
||||
|
||||
void LLVector3OverrideMap::add(const LLUUID& mesh_id, const LLVector3& pos)
|
||||
|
|
@ -86,7 +86,7 @@ void LLVector3OverrideMap::add(const LLUUID& mesh_id, const LLVector3& pos)
|
|||
|
||||
bool LLVector3OverrideMap::remove(const LLUUID& mesh_id)
|
||||
{
|
||||
U32 remove_count = m_map.erase(mesh_id);
|
||||
auto remove_count = m_map.erase(mesh_id);
|
||||
return (remove_count > 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -430,8 +430,9 @@ void LLKeyframeMotion::JointMotion::update(LLJointState* joint_state, F32 time,
|
|||
//-----------------------------------------------------------------------------
|
||||
LLKeyframeMotion::LLKeyframeMotion(const LLUUID &id)
|
||||
: LLMotion(id),
|
||||
mJointMotionList(NULL),
|
||||
mPelvisp(NULL),
|
||||
mJointMotionList(nullptr),
|
||||
mPelvisp(nullptr),
|
||||
mCharacter(nullptr),
|
||||
mLastSkeletonSerialNum(0),
|
||||
mLastUpdateTime(0.f),
|
||||
mLastLoopedTime(0.f),
|
||||
|
|
@ -2079,7 +2080,7 @@ bool LLKeyframeMotion::serialize(LLDataPacker& dp) const
|
|||
JointMotion* joint_motionp = mJointMotionList->getJointMotion(i);
|
||||
success &= dp.packString(joint_motionp->mJointName, "joint_name");
|
||||
success &= dp.packS32(joint_motionp->mPriority, "joint_priority");
|
||||
success &= dp.packS32(joint_motionp->mRotationCurve.mKeys.size(), "num_rot_keys");
|
||||
success &= dp.packS32(static_cast<S32>(joint_motionp->mRotationCurve.mKeys.size()), "num_rot_keys");
|
||||
|
||||
LL_DEBUGS("BVH") << "Joint " << i
|
||||
<< " name: " << joint_motionp->mJointName
|
||||
|
|
@ -2105,7 +2106,7 @@ bool LLKeyframeMotion::serialize(LLDataPacker& dp) const
|
|||
LL_DEBUGS("BVH") << " rot: t " << rot_key.mTime << " angles " << rot_angles.mV[VX] <<","<< rot_angles.mV[VY] <<","<< rot_angles.mV[VZ] << LL_ENDL;
|
||||
}
|
||||
|
||||
success &= dp.packS32(joint_motionp->mPositionCurve.mKeys.size(), "num_pos_keys");
|
||||
success &= dp.packS32(static_cast<S32>(joint_motionp->mPositionCurve.mKeys.size()), "num_pos_keys");
|
||||
for (PositionCurve::key_map_t::value_type& pos_pair : joint_motionp->mPositionCurve.mKeys)
|
||||
{
|
||||
PositionKey& pos_key = pos_pair.second;
|
||||
|
|
@ -2125,7 +2126,7 @@ bool LLKeyframeMotion::serialize(LLDataPacker& dp) const
|
|||
}
|
||||
}
|
||||
|
||||
success &= dp.packS32(mJointMotionList->mConstraints.size(), "num_constraints");
|
||||
success &= dp.packS32(static_cast<S32>(mJointMotionList->mConstraints.size()), "num_constraints");
|
||||
LL_DEBUGS("BVH") << "num_constraints " << mJointMotionList->mConstraints.size() << LL_ENDL;
|
||||
for (JointConstraintSharedData* shared_constraintp : mJointMotionList->mConstraints)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ public:
|
|||
~JointMotionList();
|
||||
U32 dumpDiagInfo();
|
||||
JointMotion* getJointMotion(U32 index) const { llassert(index < mJointMotionArray.size()); return mJointMotionArray[index]; }
|
||||
U32 getNumJointMotions() const { return mJointMotionArray.size(); }
|
||||
U32 getNumJointMotions() const { return static_cast<U32>(mJointMotionArray.size()); }
|
||||
};
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -156,11 +156,11 @@ LLMotionController::~LLMotionController()
|
|||
|
||||
void LLMotionController::incMotionCounts(S32& num_motions, S32& num_loading_motions, S32& num_loaded_motions, S32& num_active_motions, S32& num_deprecated_motions)
|
||||
{
|
||||
num_motions += mAllMotions.size();
|
||||
num_loading_motions += mLoadingMotions.size();
|
||||
num_loaded_motions += mLoadedMotions.size();
|
||||
num_active_motions += mActiveMotions.size();
|
||||
num_deprecated_motions += mDeprecatedMotions.size();
|
||||
num_motions += static_cast<S32>(mAllMotions.size());
|
||||
num_loading_motions += static_cast<S32>(mLoadingMotions.size());
|
||||
num_loaded_motions += static_cast<S32>(mLoadedMotions.size());
|
||||
num_active_motions += static_cast<S32>(mActiveMotions.size());
|
||||
num_deprecated_motions += static_cast<S32>(mDeprecatedMotions.size());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -222,7 +222,7 @@ void LLMotionController::purgeExcessMotions()
|
|||
}
|
||||
|
||||
// clean up all inactive, loaded motions
|
||||
for (LLUUID motion_id : motions_to_kill)
|
||||
for (const LLUUID& motion_id : motions_to_kill)
|
||||
{
|
||||
// look up the motion again by ID to get canonical instance
|
||||
// and kill it only if that one is inactive
|
||||
|
|
@ -233,7 +233,7 @@ void LLMotionController::purgeExcessMotions()
|
|||
}
|
||||
}
|
||||
|
||||
U32 loaded_count = mLoadedMotions.size();
|
||||
U32 loaded_count = static_cast<U32>(mLoadedMotions.size());
|
||||
if (loaded_count > (2 * MAX_MOTION_INSTANCES) && loaded_count > mLastCountAfterPurge)
|
||||
{
|
||||
LL_WARNS_ONCE("Animation") << loaded_count << " Loaded Motions. Amount of motions is over limit." << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -199,9 +199,9 @@ bool LLApp::parseCommandOptions(int argc, char** argv)
|
|||
|
||||
#if LL_WINDOWS
|
||||
//Windows changed command line parsing. Deal with it.
|
||||
S32 slen = value.length() - 1;
|
||||
S32 start = 0;
|
||||
S32 end = slen;
|
||||
size_t slen = value.length() - 1;
|
||||
size_t start = 0;
|
||||
size_t end = slen;
|
||||
if (argv[ii][start]=='"')start++;
|
||||
if (argv[ii][end]=='"')end--;
|
||||
if (start!=0 || end!=slen)
|
||||
|
|
@ -264,9 +264,9 @@ bool LLApp::parseCommandOptions(int argc, wchar_t** wargv)
|
|||
|
||||
#if LL_WINDOWS
|
||||
//Windows changed command line parsing. Deal with it.
|
||||
S32 slen = value.length() - 1;
|
||||
S32 start = 0;
|
||||
S32 end = slen;
|
||||
size_t slen = value.length() - 1;
|
||||
size_t start = 0;
|
||||
size_t end = slen;
|
||||
if (wargv[ii][start]=='"')start++;
|
||||
if (wargv[ii][end]=='"')end--;
|
||||
if (start!=0 || end!=slen)
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ const char *LLFile::tmpdir()
|
|||
sep = '\\';
|
||||
|
||||
std::vector<wchar_t> utf16path(MAX_PATH + 1);
|
||||
GetTempPathW(utf16path.size(), &utf16path[0]);
|
||||
GetTempPathW(static_cast<DWORD>(utf16path.size()), &utf16path[0]);
|
||||
utf8path = ll_convert_wide_to_string(&utf16path[0]);
|
||||
#else
|
||||
sep = '/';
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public:
|
|||
typedef typename std::vector<Type>::size_type size_type;
|
||||
protected:
|
||||
std::vector<Type> mVector;
|
||||
std::map<Key, U32> mIndexMap;
|
||||
std::map<Key, size_t> mIndexMap;
|
||||
|
||||
public:
|
||||
LLIndexedVector() { mVector.reserve(BlockSize); }
|
||||
|
|
@ -68,10 +68,10 @@ public:
|
|||
|
||||
Type& operator[](const Key& k)
|
||||
{
|
||||
typename std::map<Key, U32>::const_iterator iter = mIndexMap.find(k);
|
||||
typename std::map<Key, size_t>::const_iterator iter = mIndexMap.find(k);
|
||||
if (iter == mIndexMap.end())
|
||||
{
|
||||
U32 n = mVector.size();
|
||||
auto n = mVector.size();
|
||||
mIndexMap[k] = n;
|
||||
mVector.push_back(Type());
|
||||
llassert(mVector.size() == mIndexMap.size());
|
||||
|
|
@ -85,7 +85,7 @@ public:
|
|||
|
||||
const_iterator find(const Key& k) const
|
||||
{
|
||||
typename std::map<Key, U32>::const_iterator iter = mIndexMap.find(k);
|
||||
typename std::map<Key, size_t>::const_iterator iter = mIndexMap.find(k);
|
||||
if(iter == mIndexMap.end())
|
||||
{
|
||||
return mVector.end();
|
||||
|
|
|
|||
|
|
@ -122,23 +122,6 @@
|
|||
|
||||
// Deal with VC6 problems
|
||||
#if LL_MSVC
|
||||
#pragma warning( 3 : 4701 ) // "local variable used without being initialized" Treat this as level 3, not level 4.
|
||||
#pragma warning( 3 : 4702 ) // "unreachable code" Treat this as level 3, not level 4.
|
||||
#pragma warning( 3 : 4189 ) // "local variable initialized but not referenced" Treat this as level 3, not level 4.
|
||||
//#pragma warning( 3 : 4018 ) // "signed/unsigned mismatch" Treat this as level 3, not level 4.
|
||||
#pragma warning( 3 : 4263 ) // 'function' : member function does not override any base class virtual member function
|
||||
#pragma warning( 3 : 4264 ) // "'virtual_function' : no override available for virtual member function from base 'class'; function is hidden"
|
||||
#pragma warning( 3 : 4265 ) // "class has virtual functions, but destructor is not virtual"
|
||||
#pragma warning( 3 : 4266 ) // 'function' : no override available for virtual member function from base 'type'; function is hidden
|
||||
#pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored
|
||||
//#pragma warning( disable : 4284 ) // silly MS warning deep inside their <map> include file
|
||||
|
||||
#if ADDRESS_SIZE == 64
|
||||
// That one is all over the place for x64 builds.
|
||||
#pragma warning( disable : 4267 ) // 'var' : conversion from 'size_t' to 'type', possible loss of data)
|
||||
#endif
|
||||
|
||||
#pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.
|
||||
#pragma warning( disable : 4996 ) // warning: deprecated
|
||||
|
||||
// Linker optimization with "extern template" generates these warnings
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ void LLQueuedThread::waitOnPending()
|
|||
// MAIN thread
|
||||
void LLQueuedThread::printQueueStats()
|
||||
{
|
||||
U32 size = mRequestQueue.size();
|
||||
auto size = mRequestQueue.size();
|
||||
if (size > 0)
|
||||
{
|
||||
LL_INFOS() << llformat("Pending Requests:%d ", mRequestQueue.size()) << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -1546,7 +1546,7 @@ S32 LLSDBinaryFormatter::format_impl(const LLSD& data, std::ostream& ostr,
|
|||
case LLSD::TypeMap:
|
||||
{
|
||||
ostr.put('{');
|
||||
U32 size_nbo = htonl(data.size());
|
||||
U32 size_nbo = htonl(static_cast<u_long>(data.size()));
|
||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||
LLSD::map_const_iterator iter = data.beginMap();
|
||||
LLSD::map_const_iterator end = data.endMap();
|
||||
|
|
@ -1563,7 +1563,7 @@ S32 LLSDBinaryFormatter::format_impl(const LLSD& data, std::ostream& ostr,
|
|||
case LLSD::TypeArray:
|
||||
{
|
||||
ostr.put('[');
|
||||
U32 size_nbo = htonl(data.size());
|
||||
U32 size_nbo = htonl(static_cast<u_long>(data.size()));
|
||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||
LLSD::array_const_iterator iter = data.beginArray();
|
||||
LLSD::array_const_iterator end = data.endArray();
|
||||
|
|
@ -1630,7 +1630,7 @@ S32 LLSDBinaryFormatter::format_impl(const LLSD& data, std::ostream& ostr,
|
|||
{
|
||||
ostr.put('b');
|
||||
const std::vector<U8>& buffer = data.asBinary();
|
||||
U32 size_nbo = htonl(buffer.size());
|
||||
U32 size_nbo = htonl(static_cast<u_long>(buffer.size()));
|
||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||
if(buffer.size()) ostr.write((const char*)&buffer[0], buffer.size());
|
||||
break;
|
||||
|
|
@ -1648,7 +1648,7 @@ void LLSDBinaryFormatter::formatString(
|
|||
const std::string& string,
|
||||
std::ostream& ostr) const
|
||||
{
|
||||
U32 size_nbo = htonl(string.size());
|
||||
U32 size_nbo = htonl(static_cast<u_long>(string.size()));
|
||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||
ostr.write(string.c_str(), string.size());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ inline bool vector_replace_with_last(std::vector<T>& invec, const T& val)
|
|||
template <typename T>
|
||||
inline T* vector_append(std::vector<T>& invec, S32 N)
|
||||
{
|
||||
U32 sz = invec.size();
|
||||
auto sz = invec.size();
|
||||
invec.resize(sz+N);
|
||||
return &(invec[sz]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -809,7 +809,7 @@ std::string ll_convert_wide_to_string(const wchar_t* in, size_t len_in, unsigned
|
|||
code_page,
|
||||
0,
|
||||
in,
|
||||
len_in,
|
||||
static_cast<int>(len_in),
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
|
|
@ -824,7 +824,7 @@ std::string ll_convert_wide_to_string(const wchar_t* in, size_t len_in, unsigned
|
|||
code_page,
|
||||
0,
|
||||
in,
|
||||
len_in,
|
||||
static_cast<int>(len_in),
|
||||
pout,
|
||||
len_out,
|
||||
0,
|
||||
|
|
@ -851,8 +851,8 @@ std::wstring ll_convert_string_to_wide(const char* in, size_t len, unsigned int
|
|||
std::vector<wchar_t> w_out(len + 1);
|
||||
|
||||
memset(&w_out[0], 0, w_out.size());
|
||||
int real_output_str_len = MultiByteToWideChar(code_page, 0, in, len,
|
||||
&w_out[0], w_out.size() - 1);
|
||||
int real_output_str_len = MultiByteToWideChar(code_page, 0, in, static_cast<int>(len),
|
||||
&w_out[0], static_cast<int>(w_out.size() - 1));
|
||||
|
||||
//looks like MultiByteToWideChar didn't add null terminator to converted string, see EXT-4858.
|
||||
w_out[real_output_str_len] = 0;
|
||||
|
|
@ -943,7 +943,7 @@ std::optional<std::wstring> llstring_getoptenv(const std::string& key)
|
|||
auto wkey = ll_convert_string_to_wide(key);
|
||||
// Take a wild guess as to how big the buffer should be.
|
||||
std::vector<wchar_t> buffer(1024);
|
||||
auto n = GetEnvironmentVariableW(wkey.c_str(), &buffer[0], buffer.size());
|
||||
auto n = GetEnvironmentVariableW(wkey.c_str(), &buffer[0], static_cast<DWORD>(buffer.size()));
|
||||
// If our initial guess was too short, n will indicate the size (in
|
||||
// wchar_t's) that buffer should have been, including the terminating nul.
|
||||
if (n > (buffer.size() - 1))
|
||||
|
|
@ -951,7 +951,7 @@ std::optional<std::wstring> llstring_getoptenv(const std::string& key)
|
|||
// make it big enough
|
||||
buffer.resize(n);
|
||||
// and try again
|
||||
n = GetEnvironmentVariableW(wkey.c_str(), &buffer[0], buffer.size());
|
||||
n = GetEnvironmentVariableW(wkey.c_str(), &buffer[0], static_cast<DWORD>(buffer.size()));
|
||||
}
|
||||
// did that (ultimately) succeed?
|
||||
if (n)
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace tut
|
|||
std::ostringstream resp;
|
||||
resp << "{'connect':true, 'position':[r128,r128,r128], 'look_at':[r0,r1,r0], 'agent_access':'M', 'region_x':i8192, 'region_y':i8192}";
|
||||
std::string str = resp.str();
|
||||
LLMemoryStream mstr((U8*)str.c_str(), str.size());
|
||||
LLMemoryStream mstr((U8*)str.c_str(), static_cast<S32>(str.size()));
|
||||
LLSD response;
|
||||
S32 count = LLSDSerialize::fromNotation(response, mstr, str.size());
|
||||
ensure("stream parsed", response.isDefined());
|
||||
|
|
@ -252,7 +252,7 @@ namespace tut
|
|||
resp << "{'label':'short binary test', 'singlebinary':b(1)\"A\", 'singlerawstring':s(1)\"A\", 'endoftest':'end' }";
|
||||
std::string str = resp.str();
|
||||
LLSD sd;
|
||||
LLMemoryStream mstr((U8*)str.c_str(), str.size());
|
||||
LLMemoryStream mstr((U8*)str.c_str(), static_cast<S32>(str.size()));
|
||||
S32 count = LLSDSerialize::fromNotation(sd, mstr, str.size());
|
||||
ensure_equals("parse count", count, 5);
|
||||
ensure("sd created", sd.isDefined());
|
||||
|
|
@ -456,7 +456,7 @@ namespace tut
|
|||
void mem_object::test<1>()
|
||||
{
|
||||
const char HELLO_WORLD[] = "hello world";
|
||||
LLMemoryStream mem((U8*)&HELLO_WORLD[0], strlen(HELLO_WORLD)); /* Flawfinder: ignore */
|
||||
LLMemoryStream mem((U8*)&HELLO_WORLD[0], static_cast<S32>(strlen(HELLO_WORLD))); /* Flawfinder: ignore */
|
||||
std::string hello;
|
||||
std::string world;
|
||||
mem >> hello >> world;
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ namespace tut
|
|||
// Partial defaults arrays.
|
||||
for (LLSD::String a: ab)
|
||||
{
|
||||
LLSD::Integer partition(std::min(partial_offset, dft_array_full[a].size()));
|
||||
LLSD::Integer partition(static_cast<LLSD::Integer>(std::min(partial_offset, dft_array_full[a].size())));
|
||||
dft_array_partial[a] =
|
||||
llsd_copy_array(dft_array_full[a].beginArray() + partition,
|
||||
dft_array_full[a].endArray());
|
||||
|
|
@ -508,7 +508,7 @@ namespace tut
|
|||
// (params, dft_array_full). Part of the point of using map-style
|
||||
// defaults is to allow any subset of the target function's
|
||||
// parameters to be optional, not just the rightmost.
|
||||
for (LLSD::Integer ix = 0, ixend = params[a].size(); ix < ixend; ix += 2)
|
||||
for (LLSD::Integer ix = 0, ixend = static_cast<LLSD::Integer>(params[a].size()); ix < ixend; ix += 2)
|
||||
{
|
||||
dft_map_partial[a][params[a][ix].asString()] = dft_array_full[a][ix];
|
||||
}
|
||||
|
|
@ -696,7 +696,7 @@ namespace tut
|
|||
LLSD zipmap(const LLSD& keys, const LLSD& values)
|
||||
{
|
||||
LLSD map;
|
||||
for (LLSD::Integer i = 0, iend = keys.size(); i < iend; ++i)
|
||||
for (LLSD::Integer i = 0, iend = static_cast<LLSD::Integer>(keys.size()); i < iend; ++i)
|
||||
{
|
||||
// Have to select asString() since you can index an LLSD
|
||||
// object with either String or Integer.
|
||||
|
|
@ -955,7 +955,7 @@ namespace tut
|
|||
allreq[a] = zipmap(params[a], LLSD::emptyArray());
|
||||
// Same for leftreq, save that we use the subset of the params not
|
||||
// supplied by dft_array_partial[a].
|
||||
LLSD::Integer partition(params[a].size() - dft_array_partial[a].size());
|
||||
LLSD::Integer partition(static_cast<LLSD::Integer>(params[a].size() - dft_array_partial[a].size()));
|
||||
leftreq[a] = zipmap(llsd_copy_array(params[a].beginArray(),
|
||||
params[a].beginArray() + partition),
|
||||
LLSD::emptyArray());
|
||||
|
|
|
|||
|
|
@ -701,7 +701,7 @@ namespace tut
|
|||
"<key>cam</key><real>1.23</real>"
|
||||
"</map></llsd>",
|
||||
v,
|
||||
v.size() + 1);
|
||||
static_cast<S32>(v.size()) + 1);
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
|
|
@ -721,7 +721,7 @@ namespace tut
|
|||
"<key>cam</key><real>1.23</real>"
|
||||
"</map></llsd>",
|
||||
v,
|
||||
v.size() + 1);
|
||||
static_cast<S32>(v.size()) + 1);
|
||||
|
||||
v.clear();
|
||||
v["amy"] = 23;
|
||||
|
|
@ -734,7 +734,7 @@ namespace tut
|
|||
"<key>cam</key><real>1.23</real>"
|
||||
"</map></llsd>",
|
||||
v,
|
||||
v.size() + 1);
|
||||
static_cast<S32>(v.size()) + 1);
|
||||
|
||||
v.clear();
|
||||
v["amy"] = 23;
|
||||
|
|
@ -751,7 +751,7 @@ namespace tut
|
|||
"<key>cam</key><real>1.23</real>"
|
||||
"</map></llsd>",
|
||||
v,
|
||||
v.size() + 1);
|
||||
static_cast<S32>(v.size()) + 1);
|
||||
|
||||
v.clear();
|
||||
v[0] = 23;
|
||||
|
|
@ -766,7 +766,7 @@ namespace tut
|
|||
"<real>1.23</real>"
|
||||
"</array></llsd>",
|
||||
v,
|
||||
v.size() + 1);
|
||||
static_cast<S32>(v.size()) + 1);
|
||||
|
||||
v.clear();
|
||||
v[0] = 23;
|
||||
|
|
@ -782,7 +782,7 @@ namespace tut
|
|||
"<real>1.23</real>"
|
||||
"</array></llsd>",
|
||||
v,
|
||||
v.size() + 1);
|
||||
static_cast<S32>(v.size()) + 1);
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
|
|
@ -1405,13 +1405,13 @@ namespace tut
|
|||
uint32_t size = htonl(1);
|
||||
memcpy(&vec[1], &size, sizeof(uint32_t));
|
||||
vec.push_back('k');
|
||||
int key_size_loc = vec.size();
|
||||
auto key_size_loc = vec.size();
|
||||
size = htonl(1); // 1 too short
|
||||
vec.resize(vec.size() + 4);
|
||||
memcpy(&vec[key_size_loc], &size, sizeof(uint32_t));
|
||||
vec.push_back('a'); vec.push_back('m'); vec.push_back('y');
|
||||
vec.push_back('i');
|
||||
int integer_loc = vec.size();
|
||||
auto integer_loc = vec.size();
|
||||
vec.resize(vec.size() + 4);
|
||||
uint32_t val_int = htonl(23);
|
||||
memcpy(&vec[integer_loc], &val_int, sizeof(uint32_t));
|
||||
|
|
@ -1473,7 +1473,7 @@ namespace tut
|
|||
memcpy(&vec[1], &size, sizeof(uint32_t));
|
||||
vec.push_back('"'); vec.push_back('a'); vec.push_back('m');
|
||||
vec.push_back('y'); vec.push_back('"'); vec.push_back('i');
|
||||
int integer_loc = vec.size();
|
||||
auto integer_loc = vec.size();
|
||||
vec.resize(vec.size() + 4);
|
||||
uint32_t val_int = htonl(23);
|
||||
memcpy(&vec[integer_loc], &val_int, sizeof(uint32_t));
|
||||
|
|
|
|||
|
|
@ -442,7 +442,7 @@ bool HttpLibcurl::completeRequest(CURLM * multi_handle, CURL * handle, CURLcode
|
|||
|
||||
int HttpLibcurl::getActiveCount() const
|
||||
{
|
||||
return mActiveOps.size();
|
||||
return static_cast<int>(mActiveOps.size());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ void HttpOpRequest::visitNotifier(HttpRequest * request)
|
|||
if (mReplyOffset || mReplyLength)
|
||||
{
|
||||
// Got an explicit offset/length in response
|
||||
response->setRange(mReplyOffset, mReplyLength, mReplyFullLength);
|
||||
response->setRange(mReplyOffset, static_cast<unsigned int>(mReplyLength), static_cast<unsigned int>(mReplyFullLength));
|
||||
}
|
||||
response->setContentType(mReplyConType);
|
||||
response->setRetries(mPolicyRetries, mPolicy503Retries);
|
||||
|
|
@ -328,7 +328,7 @@ HttpStatus HttpOpRequest::setupGetByteRange(HttpRequest::policy_t policy_id,
|
|||
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
|
||||
setupCommon(policy_id, url, NULL, options, headers);
|
||||
mReqMethod = HOR_GET;
|
||||
mReqOffset = offset;
|
||||
mReqOffset = static_cast<off_t>(offset);
|
||||
mReqLength = len;
|
||||
if (offset || len)
|
||||
{
|
||||
|
|
@ -607,7 +607,7 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
|
|||
long data_size(0);
|
||||
if (mReqBody)
|
||||
{
|
||||
data_size = mReqBody->size();
|
||||
data_size = static_cast<long>(mReqBody->size());
|
||||
}
|
||||
check_curl_easy_setopt(mCurlHandle, CURLOPT_POSTFIELDS, static_cast<void *>(NULL));
|
||||
check_curl_easy_setopt(mCurlHandle, CURLOPT_POSTFIELDSIZE, data_size);
|
||||
|
|
@ -618,13 +618,14 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
|
|||
case HOR_PATCH:
|
||||
check_curl_easy_setopt(mCurlHandle, CURLOPT_CUSTOMREQUEST, "PATCH");
|
||||
// fall through. The rest is the same as PUT
|
||||
[[fallthrough]];
|
||||
case HOR_PUT:
|
||||
{
|
||||
check_curl_easy_setopt(mCurlHandle, CURLOPT_UPLOAD, 1);
|
||||
long data_size(0);
|
||||
if (mReqBody)
|
||||
{
|
||||
data_size = mReqBody->size();
|
||||
data_size = static_cast<long>(mReqBody->size());
|
||||
}
|
||||
check_curl_easy_setopt(mCurlHandle, CURLOPT_INFILESIZE, data_size);
|
||||
mCurlHeaders = curl_slist_append(mCurlHeaders, "Expect:");
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ HttpPolicy::~HttpPolicy()
|
|||
|
||||
HttpRequest::policy_t HttpPolicy::createPolicyClass()
|
||||
{
|
||||
const HttpRequest::policy_t policy_class(mClasses.size());
|
||||
const HttpRequest::policy_t policy_class(static_cast<HttpRequest::policy_t>(mClasses.size()));
|
||||
if (policy_class >= HTTP_POLICY_CLASS_LIMIT)
|
||||
{
|
||||
return HttpRequest::INVALID_POLICY_ID;
|
||||
|
|
@ -432,8 +432,8 @@ int HttpPolicy::getReadyCount(HttpRequest::policy_t policy_class) const
|
|||
{
|
||||
if (policy_class < mClasses.size())
|
||||
{
|
||||
return (mClasses[policy_class]->mReadyQueue.size()
|
||||
+ mClasses[policy_class]->mRetryQueue.size());
|
||||
return static_cast<int>((mClasses[policy_class]->mReadyQueue.size()
|
||||
+ mClasses[policy_class]->mRetryQueue.size()));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ void WorkingSet::onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * r
|
|||
{
|
||||
// More success
|
||||
LLCore::BufferArray * data(response->getBody());
|
||||
mByteCount += data ? data->size() : 0;
|
||||
mByteCount += data ? static_cast<long>(data->size()) : 0L;
|
||||
++mSuccesses;
|
||||
}
|
||||
else
|
||||
|
|
@ -602,7 +602,7 @@ void WorkingSet::loadAssetUuids(FILE * in)
|
|||
mAssets.push_back(asset);
|
||||
}
|
||||
}
|
||||
mRemaining = mLimit = mAssets.size();
|
||||
mRemaining = mLimit = static_cast<int>(mAssets.size());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ std::string getStartupStateFromLog(std::string& sllog)
|
|||
std::string startup_state = "STATE_FIRST";
|
||||
std::string startup_token = "Startup state changing from ";
|
||||
|
||||
int index = sllog.rfind(startup_token);
|
||||
auto index = sllog.rfind(startup_token);
|
||||
if (index < 0 || index + startup_token.length() > sllog.length()) {
|
||||
return startup_state;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -638,7 +638,7 @@ std::string LLDir::getBaseFileName(const std::string& filepath, bool strip_exten
|
|||
std::string LLDir::getDirName(const std::string& filepath) const
|
||||
{
|
||||
std::size_t offset = filepath.find_last_of(getDirDelimiter());
|
||||
S32 len = (offset == std::string::npos) ? 0 : offset;
|
||||
auto len = (offset == std::string::npos) ? 0 : offset;
|
||||
std::string dirname = filepath.substr(0, len);
|
||||
return dirname;
|
||||
}
|
||||
|
|
@ -883,8 +883,8 @@ std::string LLDir::getScrubbedFileName(const std::string uncleanFileName)
|
|||
// replace any illegal file chars with and underscore '_'
|
||||
for( unsigned int i = 0; i < illegalChars.length(); i++ )
|
||||
{
|
||||
int j = -1;
|
||||
while((j = name.find(illegalChars[i])) > -1)
|
||||
std::string::size_type j = -1;
|
||||
while((j = name.find(illegalChars[i])) > std::string::npos)
|
||||
{
|
||||
name[j] = '_';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ LLDir_Win32::LLDir_Win32()
|
|||
{
|
||||
w_str[size] = '\0';
|
||||
mExecutablePathAndName = utf16str_to_utf8str(llutf16string(w_str));
|
||||
S32 path_end = mExecutablePathAndName.find_last_of('\\');
|
||||
auto path_end = mExecutablePathAndName.find_last_of('\\');
|
||||
if (path_end != std::string::npos)
|
||||
{
|
||||
mExecutableDir = mExecutablePathAndName.substr(0, path_end);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ void LLLFSThread::initClass(bool local_is_threaded)
|
|||
//static
|
||||
S32 LLLFSThread::updateClass(U32 ms_elapsed)
|
||||
{
|
||||
return sLocal->update((F32)ms_elapsed);
|
||||
return static_cast<S32>(sLocal->update((F32)ms_elapsed));
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ bool LLImageDXT::convertToDXR()
|
|||
// virtual
|
||||
S32 LLImageDXT::calcHeaderSize()
|
||||
{
|
||||
return llmax(sizeof(dxtfile_header_old_t), sizeof(dxtfile_header_t));
|
||||
return static_cast<S32>(llmax(sizeof(dxtfile_header_old_t), sizeof(dxtfile_header_t)));
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
|
|||
|
|
@ -1179,7 +1179,7 @@ bool LLImageTGA::decodeAndProcess( LLImageRaw* raw_image, F32 domain, F32 weight
|
|||
// Reads a .tga file and creates an LLImageTGA with its data.
|
||||
bool LLImageTGA::loadFile( const std::string& path )
|
||||
{
|
||||
S32 len = path.size();
|
||||
auto len = path.size();
|
||||
if( len < 5 )
|
||||
{
|
||||
return false;
|
||||
|
|
@ -1206,7 +1206,7 @@ bool LLImageTGA::loadFile( const std::string& path )
|
|||
}
|
||||
|
||||
U8* buffer = allocateData(file_size);
|
||||
S32 bytes_read = fread(buffer, 1, file_size, file);
|
||||
S32 bytes_read = static_cast<S32>(fread(buffer, 1, file_size, file));
|
||||
if( bytes_read != file_size )
|
||||
{
|
||||
deleteData();
|
||||
|
|
|
|||
|
|
@ -328,10 +328,10 @@ bool LLPngWrapper::writePng(const LLImageRaw* rawImage, U8* dest, size_t destSiz
|
|||
mWriteInfoPtr = png_create_info_struct(mWritePngPtr);
|
||||
|
||||
// Setup write function
|
||||
PngDataInfo dataPtr;
|
||||
PngDataInfo dataPtr{};
|
||||
dataPtr.mData = dest;
|
||||
dataPtr.mOffset = 0;
|
||||
dataPtr.mDataSize = destSize;
|
||||
dataPtr.mDataSize = static_cast<S32>(destSize);
|
||||
png_set_write_fn(mWritePngPtr, &dataPtr, &writeDataCallback, &writeFlush);
|
||||
|
||||
// Setup image params
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ namespace
|
|||
// Trim extra tracks.
|
||||
while (value.size() > LLSettingsDay::TRACK_MAX)
|
||||
{
|
||||
value.erase(value.size() - 1);
|
||||
value.erase(static_cast<LLSD::Integer>(value.size()) - 1);
|
||||
}
|
||||
|
||||
S32 framecount(0);
|
||||
|
|
@ -511,7 +511,7 @@ namespace
|
|||
|
||||
}
|
||||
|
||||
int waterTracks = value[0].size();
|
||||
int waterTracks = static_cast<int>(value[0].size());
|
||||
int skyTracks = framecount - waterTracks;
|
||||
|
||||
if (waterTracks < 1)
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ LLSphere LLSphere::getBoundingSphere(const std::vector<LLSphere>& sphere_list)
|
|||
// TODO -- improve the accuracy for small collections of spheres
|
||||
|
||||
LLSphere bounding_sphere( LLVector3(0.f, 0.f, 0.f), 0.f );
|
||||
S32 sphere_count = sphere_list.size();
|
||||
auto sphere_count = sphere_list.size();
|
||||
if (1 == sphere_count)
|
||||
{
|
||||
// trivial case -- single sphere
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
virtual bool remove(T* data);
|
||||
virtual void notifyRemoval(T* data);
|
||||
virtual U32 hasListeners() const { return !mListeners.empty(); }
|
||||
virtual U32 getListenerCount() const { return mListeners.size(); }
|
||||
virtual U32 getListenerCount() const { return static_cast<U32>(mListeners.size()); }
|
||||
virtual LLTreeListener<T>* getListener(U32 index) const
|
||||
{
|
||||
if (index < mListeners.size())
|
||||
|
|
|
|||
|
|
@ -2392,7 +2392,7 @@ bool LLVolume::unpackVolumeFaces(U8* in_data, S32 size)
|
|||
bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
|
||||
{
|
||||
{
|
||||
U32 face_count = mdl.size();
|
||||
auto face_count = mdl.size();
|
||||
|
||||
if (face_count == 0)
|
||||
{ //no faces unpacked, treat as failed decode
|
||||
|
|
@ -2424,7 +2424,7 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
|
|||
LLSD::Binary idx = mdl[i]["TriangleList"];
|
||||
|
||||
//copy out indices
|
||||
S32 num_indices = idx.size() / 2;
|
||||
auto num_indices = idx.size() / 2;
|
||||
const S32 indices_to_discard = num_indices % 3;
|
||||
if (indices_to_discard > 0)
|
||||
{
|
||||
|
|
@ -2432,7 +2432,7 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
|
|||
LL_WARNS() << "Incomplete triangle discarded from face! Indices count " << num_indices << " was not divisible by 3. face index: " << i << " Total: " << face_count << LL_ENDL;
|
||||
num_indices -= indices_to_discard;
|
||||
}
|
||||
face.resizeIndices(num_indices);
|
||||
face.resizeIndices(static_cast<S32>(num_indices));
|
||||
|
||||
if (num_indices > 2 && !face.mIndices)
|
||||
{
|
||||
|
|
@ -2453,7 +2453,7 @@ bool LLVolume::unpackVolumeFacesInternal(const LLSD& mdl)
|
|||
}
|
||||
|
||||
//copy out vertices
|
||||
U32 num_verts = pos.size()/(3*2);
|
||||
U32 num_verts = static_cast<U32>(pos.size())/(3*2);
|
||||
face.resizeVertices(num_verts);
|
||||
|
||||
if (num_verts > 0 && !face.mPositions)
|
||||
|
|
@ -5015,13 +5015,13 @@ void LLVolumeFace::remap()
|
|||
{
|
||||
// Generate a remap buffer
|
||||
std::vector<unsigned int> remap(mNumVertices);
|
||||
S32 remap_vertices_count = LLMeshOptimizer::generateRemapMultiU16(&remap[0],
|
||||
S32 remap_vertices_count = static_cast<S32>(LLMeshOptimizer::generateRemapMultiU16(&remap[0],
|
||||
mIndices,
|
||||
mNumIndices,
|
||||
mPositions,
|
||||
mNormals,
|
||||
mTexCoords,
|
||||
mNumVertices);
|
||||
mNumVertices));
|
||||
|
||||
// Allocate new buffers
|
||||
S32 size = ((mNumIndices * sizeof(U16)) + 0xF) & ~0xF;
|
||||
|
|
@ -5565,7 +5565,7 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents)
|
|||
|
||||
U32 stream_count = data.w.empty() ? 4 : 5;
|
||||
|
||||
size_t vert_count = meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count);
|
||||
S32 vert_count = static_cast<S32>(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count));
|
||||
|
||||
if (vert_count < 65535 && vert_count != 0)
|
||||
{
|
||||
|
|
@ -6648,8 +6648,8 @@ void LLVolumeFace::pushIndex(const U16& idx)
|
|||
|
||||
void LLVolumeFace::fillFromLegacyData(std::vector<LLVolumeFace::VertexData>& v, std::vector<U16>& idx)
|
||||
{
|
||||
resizeVertices(v.size());
|
||||
resizeIndices(idx.size());
|
||||
resizeVertices(static_cast<S32>(v.size()));
|
||||
resizeIndices(static_cast<S32>(idx.size()));
|
||||
|
||||
for (U32 i = 0; i < v.size(); ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1019,7 +1019,7 @@ public:
|
|||
U8 getProfileType() const { return mParams.getProfileParams().getCurveType(); }
|
||||
U8 getPathType() const { return mParams.getPathParams().getCurveType(); }
|
||||
S32 getNumFaces() const;
|
||||
S32 getNumVolumeFaces() const { return mVolumeFaces.size(); }
|
||||
S32 getNumVolumeFaces() const { return static_cast<S32>(mVolumeFaces.size()); }
|
||||
F32 getDetail() const { return mDetail; }
|
||||
F32 getSurfaceArea() const { return mSurfaceArea; }
|
||||
const LLVolumeParams& getParams() const { return mParams; }
|
||||
|
|
|
|||
|
|
@ -1125,7 +1125,7 @@ S32 LLAssetStorage::getNumPending(LLAssetStorage::ERequestType rt) const
|
|||
S32 num_pending = -1;
|
||||
if (requests)
|
||||
{
|
||||
num_pending = requests->size();
|
||||
num_pending = static_cast<S32>(requests->size());
|
||||
}
|
||||
return num_pending;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ void LLAvatarNameCache::handleAvNameCacheSuccess(const LLSD &data, const LLSD &h
|
|||
|
||||
// Same logic as error response case
|
||||
const LLSD& unresolved_agents = data["bad_ids"];
|
||||
S32 num_unresolved = unresolved_agents.size();
|
||||
auto num_unresolved = unresolved_agents.size();
|
||||
if (num_unresolved > 0)
|
||||
{
|
||||
LL_WARNS("AvNameCache") << "LLAvatarNameResponder::result " << num_unresolved << " unresolved ids; "
|
||||
|
|
|
|||
|
|
@ -562,13 +562,13 @@ std::string LLCacheName::buildLegacyName(const std::string& complete_name)
|
|||
{
|
||||
//boost::regexp was showing up in the crashreporter, so doing
|
||||
//painfully manual parsing using substr. LF
|
||||
S32 open_paren = complete_name.rfind(" (");
|
||||
S32 close_paren = complete_name.rfind(')');
|
||||
auto open_paren = complete_name.rfind(" (");
|
||||
auto close_paren = complete_name.rfind(')');
|
||||
|
||||
if (open_paren != std::string::npos &&
|
||||
close_paren == complete_name.length()-1)
|
||||
{
|
||||
S32 length = close_paren - open_paren - 2;
|
||||
auto length = close_paren - open_paren - 2;
|
||||
std::string legacy_name = complete_name.substr(open_paren+2, length);
|
||||
|
||||
if (legacy_name.length() > 0)
|
||||
|
|
@ -577,7 +577,7 @@ std::string LLCacheName::buildLegacyName(const std::string& complete_name)
|
|||
LLStringUtil::toUpper(cap_letter);
|
||||
legacy_name = cap_letter + legacy_name.substr(1);
|
||||
|
||||
S32 separator = legacy_name.find('.');
|
||||
auto separator = legacy_name.find('.');
|
||||
|
||||
if (separator != std::string::npos)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -781,8 +781,8 @@ void LLCircuitData::checkPacketInID(TPACKETID id, bool receive_resent)
|
|||
void LLCircuit::updateWatchDogTimers(LLMessageSystem *msgsys)
|
||||
{
|
||||
F64Seconds cur_time = LLMessageSystem::getMessageTimeSeconds();
|
||||
S32 count = mPingSet.size();
|
||||
S32 cur = 0;
|
||||
size_t count = mPingSet.size();
|
||||
size_t cur = 0;
|
||||
|
||||
// Only process each circuit once at most, stop processing if no circuits
|
||||
while((cur < count) && !mPingSet.empty())
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public:
|
|||
///
|
||||
inline S32 count() const
|
||||
{
|
||||
return countPending() + countActive();
|
||||
return static_cast<S32>(countPending() + countActive());
|
||||
}
|
||||
|
||||
void close();
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ bool LLDataPacker::unpackUUIDs(LLUUID *values, S32 count, const char *name)
|
|||
|
||||
bool LLDataPackerBinaryBuffer::packString(const std::string& value, const char *name)
|
||||
{
|
||||
S32 length = value.length()+1;
|
||||
S32 length = static_cast<S32>(value.length()) + 1;
|
||||
|
||||
if (!verifyLength(length, name))
|
||||
{
|
||||
|
|
@ -740,7 +740,7 @@ bool LLDataPackerAsciiBuffer::packString(const std::string& value, const char *n
|
|||
}
|
||||
else
|
||||
{
|
||||
numCopied = value.length() + 1; /*Flawfinder: ignore*/
|
||||
numCopied = static_cast<S32>(value.length()) + 1; /*Flawfinder: ignore*/
|
||||
}
|
||||
|
||||
// snprintf returns number of bytes that would have been written
|
||||
|
|
|
|||
|
|
@ -274,12 +274,12 @@ void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd)
|
|||
if(!buffer.empty())
|
||||
{
|
||||
// *TODO: convert to LLBase64
|
||||
int b64_buffer_length = apr_base64_encode_len(buffer.size());
|
||||
int b64_buffer_length = apr_base64_encode_len(static_cast<int>(buffer.size()));
|
||||
char* b64_buffer = new char[b64_buffer_length];
|
||||
b64_buffer_length = apr_base64_encode_binary(
|
||||
b64_buffer,
|
||||
&buffer[0],
|
||||
buffer.size());
|
||||
static_cast<int>(buffer.size()));
|
||||
ostr.write(b64_buffer, b64_buffer_length - 1);
|
||||
delete[] b64_buffer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl(
|
|||
LLChangeChannel change(channels.in(), channels.out());
|
||||
std::for_each(buffer->beginSegment(), buffer->endSegment(), change);
|
||||
std::string header = ostr.str();
|
||||
buffer->prepend(channels.out(), (U8*)header.c_str(), header.size());
|
||||
buffer->prepend(channels.out(), (U8*)header.c_str(), static_cast<S32>(header.size()));
|
||||
PUMP_DEBUG;
|
||||
return STATUS_DONE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl(
|
|||
PUMP_DEBUG;
|
||||
len = READ_BUFFER_SIZE;
|
||||
status = apr_socket_recv(mSource->getSocket(), read_buf, &len);
|
||||
buffer->append(channels.out(), (U8*)read_buf, len);
|
||||
buffer->append(channels.out(), (U8*)read_buf, static_cast<S32>(len));
|
||||
} while((APR_SUCCESS == status) && (READ_BUFFER_SIZE == len));
|
||||
LL_DEBUGS() << "socket read status: " << status << LL_ENDL;
|
||||
LLIOPipe::EStatus rv = STATUS_OK;
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ bool LLMail::send(
|
|||
std::string good_string = "\n..\n";
|
||||
while (1)
|
||||
{
|
||||
int index = message.find(bad_string);
|
||||
auto index = message.find(bad_string);
|
||||
if (index == std::string::npos) break;
|
||||
message.replace(index, bad_string.size(), good_string);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ S32 LLProxy::proxyHandshake(LLHost proxy)
|
|||
// The server has requested a username/password combination
|
||||
std::string socks_username(getSocksUser());
|
||||
std::string socks_password(getSocksPwd());
|
||||
U32 request_size = socks_username.size() + socks_password.size() + 3;
|
||||
U32 request_size = static_cast<S32>(socks_username.size() + socks_password.size() + 3);
|
||||
char * password_auth = new char[request_size];
|
||||
password_auth[0] = 0x01;
|
||||
password_auth[1] = (char)(socks_username.size());
|
||||
|
|
|
|||
|
|
@ -818,7 +818,7 @@ void LLPumpIO::rebuildPollset()
|
|||
running_chains_t::iterator run_end = mRunningChains.end();
|
||||
for(; run_it != run_end; ++run_it)
|
||||
{
|
||||
size += (*run_it).mDescriptors.size();
|
||||
size += static_cast<U32>((*run_it).mDescriptors.size());
|
||||
}
|
||||
//LL_DEBUGS() << "found " << size << " descriptors." << LL_ENDL;
|
||||
if(size)
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ void LLSDMessageReader::getString(const char *block, const char *var,
|
|||
return;
|
||||
}
|
||||
std::string data = getLLSD(mMessage, block, var, blocknum);
|
||||
S32 data_size = data.size();
|
||||
auto data_size = data.size();
|
||||
if (data_size >= buffer_size)
|
||||
{
|
||||
data_size = buffer_size - 1;
|
||||
|
|
@ -261,7 +261,7 @@ void LLSDMessageReader::getString(const char *block, const char *var,
|
|||
//virtual
|
||||
S32 LLSDMessageReader::getNumberOfBlocks(const char *blockname)
|
||||
{
|
||||
return mMessage[blockname].size();
|
||||
return static_cast<S32>(mMessage[blockname].size());
|
||||
}
|
||||
|
||||
S32 getElementSize(const LLSD& llsd)
|
||||
|
|
@ -276,7 +276,7 @@ S32 getElementSize(const LLSD& llsd)
|
|||
case LLSD::TypeReal:
|
||||
return sizeof(F64);
|
||||
case LLSD::TypeString:
|
||||
return llsd.size();
|
||||
return static_cast<S32>(llsd.size());
|
||||
case LLSD::TypeUUID:
|
||||
return sizeof(LLUUID);
|
||||
case LLSD::TypeDate:
|
||||
|
|
@ -286,7 +286,7 @@ S32 getElementSize(const LLSD& llsd)
|
|||
case LLSD::TypeBinary:
|
||||
{
|
||||
std::vector<U8> data = llsd;
|
||||
return data.size() * sizeof(U8);
|
||||
return static_cast<S32>(data.size() * sizeof(U8));
|
||||
}
|
||||
case LLSD::TypeMap:
|
||||
case LLSD::TypeArray:
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void LLTemplateMessageDispatcher::dispatch(const std::string& msg_name,
|
|||
LLHTTPNode::ResponsePtr responsep)
|
||||
{
|
||||
std::vector<U8> data = message["body"]["binary-template-data"].asBinary();
|
||||
U32 size = data.size();
|
||||
auto size = data.size();
|
||||
if(size == 0)
|
||||
{
|
||||
return;
|
||||
|
|
@ -53,7 +53,7 @@ void LLTemplateMessageDispatcher::dispatch(const std::string& msg_name,
|
|||
LLHost host;
|
||||
host = gMessageSystem->getSender();
|
||||
|
||||
bool validate_message = mTemplateMessageReader.validateMessage(&(data[0]), data.size(), host, true);
|
||||
bool validate_message = mTemplateMessageReader.validateMessage(&(data[0]), static_cast<S32>(size), host, true);
|
||||
|
||||
if (validate_message)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ S32 LLXfer_File::flush()
|
|||
|
||||
if (mFp)
|
||||
{
|
||||
S32 write_size = fwrite(mBuffer,1,mBufferLength,mFp);
|
||||
S32 write_size = static_cast<S32>(fwrite(mBuffer,1,mBufferLength,mFp));
|
||||
if (write_size != mBufferLength)
|
||||
{
|
||||
LL_WARNS("Xfer") << "Non-matching write size, requested " << mBufferLength
|
||||
|
|
|
|||
|
|
@ -2172,7 +2172,7 @@ S32 LLMessageSystem::sendError(
|
|||
if (LLMessageConfig::getMessageFlavor(ERROR_MESSAGE_NAME) ==
|
||||
LLMessageConfig::TEMPLATE_FLAVOR)
|
||||
{
|
||||
S32 msg_size = temp.size() + mMessageBuilder->getMessageSize();
|
||||
S32 msg_size = static_cast<S32>(temp.size()) + mMessageBuilder->getMessageSize();
|
||||
if(msg_size >= ETHERNET_MTU_BYTES)
|
||||
{
|
||||
pack_data = false;
|
||||
|
|
@ -2180,7 +2180,7 @@ S32 LLMessageSystem::sendError(
|
|||
}
|
||||
if(pack_data)
|
||||
{
|
||||
addBinaryData("Data", (void*)temp.c_str(), temp.size());
|
||||
addBinaryData("Data", (void*)temp.c_str(), static_cast<S32>(temp.size()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ bool LLPluginMessagePipe::pumpInput(F64 timeout)
|
|||
void LLPluginMessagePipe::processInput(void)
|
||||
{
|
||||
// Look for input delimiter(s) in the input buffer.
|
||||
int delim;
|
||||
size_t delim;
|
||||
mInputMutex.lock();
|
||||
while((delim = mInput.find(MESSAGE_DELIMITER)) != std::string::npos)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ bool LLPluginSharedMemory::create(size_t size)
|
|||
NULL, // default security
|
||||
PAGE_READWRITE, // read/write access
|
||||
0, // max. object size
|
||||
mSize, // buffer size
|
||||
static_cast<DWORD>(mSize), // buffer size
|
||||
mName.c_str()); // name of mapping object
|
||||
|
||||
if(mImpl->mMapFile == NULL)
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(
|
|||
|
||||
// Don't share verts within the same tri, degenerate
|
||||
//
|
||||
U32 indx_size = indices.size();
|
||||
U32 indx_size = static_cast<U32>(indices.size());
|
||||
U32 verts_new_tri = indx_size % 3;
|
||||
if ((verts_new_tri < 1 || indices[indx_size - 1] != shared_index)
|
||||
&& (verts_new_tri < 2 || indices[indx_size - 2] != shared_index))
|
||||
|
|
@ -732,7 +732,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac
|
|||
{ //for each vertex
|
||||
if (j > 2)
|
||||
{
|
||||
U32 size = verts.size();
|
||||
auto size = verts.size();
|
||||
LLVolumeFace::VertexData v0 = verts[size-3];
|
||||
LLVolumeFace::VertexData v1 = verts[size-1];
|
||||
|
||||
|
|
@ -1098,7 +1098,7 @@ bool LLDAELoader::OpenFile(const std::string& filename)
|
|||
while (model_iter != mModelList.end())
|
||||
{
|
||||
LLModel* mdl = *model_iter;
|
||||
U32 material_count = mdl->mMaterialList.size();
|
||||
U32 material_count = static_cast<U32>(mdl->mMaterialList.size());
|
||||
LL_INFOS() << "Importing " << mdl->mLabel << " model with " << material_count << " material references" << LL_ENDL;
|
||||
std::vector<std::string>::iterator mat_iter = mdl->mMaterialList.begin();
|
||||
std::vector<std::string>::iterator end_iter = material_count > LIMIT_MATERIALS_OUTPUT
|
||||
|
|
@ -1287,11 +1287,11 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
|
|||
{
|
||||
//Get the children at this level
|
||||
daeTArray< daeSmartRef<daeElement> > children = pScene->getChildren();
|
||||
S32 childCount = children.getCount();
|
||||
auto childCount = children.getCount();
|
||||
|
||||
//Process any children that are joints
|
||||
//Not all children are joints, some could be ambient lights, cameras, geometry etc..
|
||||
for (S32 i = 0; i < childCount; ++i)
|
||||
for (size_t i = 0; i < childCount; ++i)
|
||||
{
|
||||
domNode* pNode = daeSafeCast<domNode>(children[i]);
|
||||
if (pNode)
|
||||
|
|
@ -1312,7 +1312,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
|
|||
if ( pSkeletonRootNode )
|
||||
{
|
||||
//Once we have the root node - start acccessing it's joint components
|
||||
const int jointCnt = mJointMap.size();
|
||||
const int jointCnt = static_cast<int>(mJointMap.size());
|
||||
JointMap :: const_iterator jointIt = mJointMap.begin();
|
||||
|
||||
//Loop over all the possible joints within the .dae - using the allowed joint list in the ctor.
|
||||
|
|
@ -1453,9 +1453,9 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
|
|||
if (t)
|
||||
{
|
||||
domListOfFloats& transform = t->getValue();
|
||||
S32 count = transform.getCount()/16;
|
||||
auto count = transform.getCount()/16;
|
||||
|
||||
for (S32 k = 0; k < count; ++k)
|
||||
for (size_t k = 0; k < count; ++k)
|
||||
{
|
||||
LLMatrix4 mat;
|
||||
|
||||
|
|
@ -1531,7 +1531,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
|
|||
//with the skeleton are not stored in the same order as they are in the exported joint buffer.
|
||||
//This remaps the skeletal joints to be in the same order as the joints stored in the model.
|
||||
std::vector<std::string> :: const_iterator jointIt = model->mSkinInfo.mJointNames.begin();
|
||||
const int jointCnt = model->mSkinInfo.mJointNames.size();
|
||||
const int jointCnt = static_cast<int>(model->mSkinInfo.mJointNames.size());
|
||||
for ( int i=0; i<jointCnt; ++i, ++jointIt )
|
||||
{
|
||||
std::string lookingForJoint = (*jointIt).c_str();
|
||||
|
|
@ -1550,7 +1550,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
|
|||
}
|
||||
}
|
||||
|
||||
U32 bind_count = model->mSkinInfo.mAlternateBindMatrix.size();
|
||||
auto bind_count = model->mSkinInfo.mAlternateBindMatrix.size();
|
||||
if (bind_count > 0 && bind_count != jointCnt)
|
||||
{
|
||||
LL_WARNS("Mesh") << "Model " << model->mLabel << " has invalid joint bind matrix list." << LL_ENDL;
|
||||
|
|
@ -1699,8 +1699,8 @@ void LLDAELoader::buildJointToNodeMappingFromScene( daeElement* pRoot )
|
|||
if ( pScene )
|
||||
{
|
||||
daeTArray< daeSmartRef<daeElement> > children = pScene->getChildren();
|
||||
S32 childCount = children.getCount();
|
||||
for (S32 i = 0; i < childCount; ++i)
|
||||
auto childCount = children.getCount();
|
||||
for (size_t i = 0; i < childCount; ++i)
|
||||
{
|
||||
domNode* pNode = daeSafeCast<domNode>(children[i]);
|
||||
processJointToNodeMapping( pNode );
|
||||
|
|
@ -1745,8 +1745,8 @@ void LLDAELoader::processJointToNodeMapping( domNode* pNode )
|
|||
void LLDAELoader::processChildJoints( domNode* pParentNode )
|
||||
{
|
||||
daeTArray< daeSmartRef<daeElement> > childOfChild = pParentNode->getChildren();
|
||||
S32 childOfChildCount = childOfChild.getCount();
|
||||
for (S32 i = 0; i < childOfChildCount; ++i)
|
||||
auto childOfChildCount = childOfChild.getCount();
|
||||
for (size_t i = 0; i < childOfChildCount; ++i)
|
||||
{
|
||||
domNode* pChildNode = daeSafeCast<domNode>( childOfChild[i] );
|
||||
if ( pChildNode )
|
||||
|
|
@ -1847,7 +1847,7 @@ bool LLDAELoader::verifyController( domController* pController )
|
|||
{
|
||||
sum += pVertexWeights->getVcount()->getValue()[i];
|
||||
}
|
||||
result = verifyCount( sum * inputs.getCount(), (domInt) pVertexWeights->getV()->getValue().getCount() );
|
||||
result = verifyCount( sum * static_cast<U32>(inputs.getCount()), (domInt) static_cast<int>(pVertexWeights->getV()->getValue().getCount()) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1980,9 +1980,9 @@ void LLDAELoader::processJointNode( domNode* pNode, JointTransformMap& jointTran
|
|||
|
||||
//Gather and handle the incoming nodes children
|
||||
daeTArray< daeSmartRef<daeElement> > childOfChild = pNode->getChildren();
|
||||
S32 childOfChildCount = childOfChild.getCount();
|
||||
auto childOfChildCount = childOfChild.getCount();
|
||||
|
||||
for (S32 i = 0; i < childOfChildCount; ++i)
|
||||
for (size_t i = 0; i < childOfChildCount; ++i)
|
||||
{
|
||||
domNode* pChildNode = daeSafeCast<domNode>( childOfChild[i] );
|
||||
if ( pChildNode )
|
||||
|
|
@ -2192,8 +2192,8 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
|
|||
|
||||
//process children
|
||||
daeTArray< daeSmartRef<daeElement> > children = element->getChildren();
|
||||
int childCount = children.getCount();
|
||||
for (S32 i = 0; i < childCount; i++)
|
||||
auto childCount = children.getCount();
|
||||
for (size_t i = 0; i < childCount; i++)
|
||||
{
|
||||
processElement(children[i],badElement, dae);
|
||||
}
|
||||
|
|
@ -2568,7 +2568,7 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo
|
|||
ret->remapVolumeFaces();
|
||||
}
|
||||
|
||||
volume_faces = remainder.size();
|
||||
volume_faces = static_cast<U32>(remainder.size());
|
||||
|
||||
models_out.push_back(ret);
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ bool LLGLTFLoader::parseMaterials()
|
|||
image.numChannels = in_image.component;
|
||||
image.bytesPerChannel = in_image.bits >> 3; // Convert bits to bytes
|
||||
image.pixelType = in_image.pixel_type; // Maps exactly, i.e. TINYGLTF_COMPONENT_TYPE_UNSIGNED_BYTE == GL_UNSIGNED_BYTE, etc
|
||||
image.size = in_image.image.size();
|
||||
image.size = static_cast<U32>(in_image.image.size());
|
||||
image.height = in_image.height;
|
||||
image.width = in_image.width;
|
||||
image.data = in_image.image.data();
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ bool LLGLTFMaterial::fromJSON(const std::string& json, std::string& warn_msg, st
|
|||
|
||||
tinygltf::Model model_in;
|
||||
|
||||
if (gltf.LoadASCIIFromString(&model_in, &error_msg, &warn_msg, json.c_str(), json.length(), ""))
|
||||
if (gltf.LoadASCIIFromString(&model_in, &error_msg, &warn_msg, json.c_str(), static_cast<unsigned int>(json.length()), ""))
|
||||
{
|
||||
setFromModel(model_in, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -87,12 +87,12 @@ void LLGLTFMaterial::setFromTexture(const tinygltf::Model& model, const T& textu
|
|||
template<typename T>
|
||||
void LLGLTFMaterial::allocateTextureImage(tinygltf::Model& model, T& texture_info, const std::string& uri)
|
||||
{
|
||||
const S32 image_idx = model.images.size();
|
||||
const S32 image_idx = static_cast<S32>(model.images.size());
|
||||
model.images.emplace_back();
|
||||
model.images[image_idx].uri = uri;
|
||||
|
||||
// The texture, not to be confused with the texture info
|
||||
const S32 texture_idx = model.textures.size();
|
||||
const S32 texture_idx = static_cast<S32>(model.textures.size());
|
||||
model.textures.emplace_back();
|
||||
tinygltf::Texture& texture = model.textures[texture_idx];
|
||||
texture.source = image_idx;
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ U32 LLMediaEntry::setWhiteList( const std::vector<std::string> &whitelist )
|
|||
{
|
||||
// *NOTE: This code is VERY similar to the setWhitelist below.
|
||||
// IF YOU CHANGE THIS IMPLEMENTATION, BE SURE TO CHANGE THE OTHER!
|
||||
U32 size = 0;
|
||||
size_t size = 0;
|
||||
U32 count = 0;
|
||||
// First count to make sure the size constraint is not violated
|
||||
std::vector<std::string>::const_iterator iter = whitelist.begin();
|
||||
|
|
@ -394,7 +394,7 @@ U32 LLMediaEntry::setWhiteList( const LLSD &whitelist )
|
|||
{
|
||||
// *NOTE: This code is VERY similar to the setWhitelist above.
|
||||
// IF YOU CHANGE THIS IMPLEMENTATION, BE SURE TO CHANGE THE OTHER!
|
||||
U32 size = 0;
|
||||
size_t size = 0;
|
||||
U32 count = 0;
|
||||
// First check to make sure the size and count constraints are not violated
|
||||
LLSD::array_const_iterator iter = whitelist.beginArray();
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ LLSD LLModel::writeModel(
|
|||
//copy ostr to binary buffer
|
||||
std::string data = ostr.str();
|
||||
const U8* buff = (U8*)data.data();
|
||||
U32 bytes = data.size();
|
||||
U32 bytes = static_cast<U32>(data.size());
|
||||
|
||||
LLSD::Binary w(bytes);
|
||||
for (U32 j = 0; j < bytes; ++j)
|
||||
|
|
@ -965,7 +965,7 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, bool nowrite, bo
|
|||
{ //write out skin block
|
||||
skin = zip_llsd(mdl["skin"]);
|
||||
|
||||
U32 size = skin.size();
|
||||
U32 size = static_cast<U32>(skin.size());
|
||||
if (size > 0)
|
||||
{
|
||||
header["skin"]["offset"] = (LLSD::Integer) cur_offset;
|
||||
|
|
@ -980,7 +980,7 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, bool nowrite, bo
|
|||
{ //write out convex decomposition
|
||||
decomposition = zip_llsd(mdl["physics_convex"]);
|
||||
|
||||
U32 size = decomposition.size();
|
||||
U32 size = static_cast<U32>(decomposition.size());
|
||||
if (size > 0)
|
||||
{
|
||||
header["physics_convex"]["offset"] = (LLSD::Integer) cur_offset;
|
||||
|
|
@ -1002,7 +1002,7 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, bool nowrite, bo
|
|||
{
|
||||
out[i] = zip_llsd(mdl[model_names[i]]);
|
||||
|
||||
U32 size = out[i].size();
|
||||
U32 size = static_cast<U32>(out[i].size());
|
||||
|
||||
header[model_names[i]]["offset"] = (LLSD::Integer) cur_offset;
|
||||
header[model_names[i]]["size"] = (LLSD::Integer) size;
|
||||
|
|
@ -1159,7 +1159,7 @@ void LLModel::updateHullCenters()
|
|||
mCenterOfHullCenters += cur_center;
|
||||
cur_center *= 1.f/mPhysics.mHull[i].size();
|
||||
mHullCenter[i] = cur_center;
|
||||
mHullPoints += mPhysics.mHull[i].size();
|
||||
mHullPoints += static_cast<U32>(mPhysics.mHull[i].size());
|
||||
}
|
||||
|
||||
if (mHullPoints > 0)
|
||||
|
|
@ -1280,14 +1280,14 @@ bool LLModel::loadModel(std::istream& is)
|
|||
|
||||
bool LLModel::isMaterialListSubset( LLModel* ref )
|
||||
{
|
||||
int refCnt = ref->mMaterialList.size();
|
||||
int modelCnt = mMaterialList.size();
|
||||
auto refCnt = ref->mMaterialList.size();
|
||||
auto modelCnt = mMaterialList.size();
|
||||
|
||||
for (U32 src = 0; src < modelCnt; ++src)
|
||||
for (size_t src = 0; src < modelCnt; ++src)
|
||||
{
|
||||
bool foundRef = false;
|
||||
|
||||
for (U32 dst = 0; dst < refCnt; ++dst)
|
||||
for (size_t dst = 0; dst < refCnt; ++dst)
|
||||
{
|
||||
//LL_INFOS()<<mMaterialList[src]<<" "<<ref->mMaterialList[dst]<<LL_ENDL;
|
||||
foundRef = mMaterialList[src] == ref->mMaterialList[dst];
|
||||
|
|
@ -1630,15 +1630,15 @@ U32 LLMeshSkinInfo::sizeBytes() const
|
|||
{
|
||||
U32 res = sizeof(LLUUID); // mMeshID
|
||||
|
||||
res += sizeof(std::vector<std::string>) + sizeof(std::string) * mJointNames.size();
|
||||
res += sizeof(std::vector<std::string>) + sizeof(std::string) * static_cast<U32>(mJointNames.size());
|
||||
for (U32 i = 0; i < mJointNames.size(); ++i)
|
||||
{
|
||||
res += mJointNames[i].size(); // actual size, not capacity
|
||||
res += static_cast<U32>(mJointNames[i].size()); // actual size, not capacity
|
||||
}
|
||||
|
||||
res += sizeof(std::vector<S32>) + sizeof(S32) * mJointNums.size();
|
||||
res += sizeof(std::vector<LLMatrix4>) + 16 * sizeof(float) * mInvBindMatrix.size();
|
||||
res += sizeof(std::vector<LLMatrix4>) + 16 * sizeof(float) * mAlternateBindMatrix.size();
|
||||
res += sizeof(std::vector<S32>) + sizeof(S32) * static_cast<U32>(mJointNums.size());
|
||||
res += sizeof(std::vector<LLMatrix4>) + 16 * sizeof(float) * static_cast<U32>(mInvBindMatrix.size());
|
||||
res += sizeof(std::vector<LLMatrix4>) + 16 * sizeof(float) * static_cast<U32>(mAlternateBindMatrix.size());
|
||||
res += 16 * sizeof(float); //mBindShapeMatrix
|
||||
res += sizeof(float) + 3 * sizeof(bool);
|
||||
|
||||
|
|
@ -1755,15 +1755,15 @@ U32 LLModel::Decomposition::sizeBytes() const
|
|||
{
|
||||
U32 res = sizeof(LLUUID); // mMeshID
|
||||
|
||||
res += sizeof(LLModel::convex_hull_decomposition) + sizeof(std::vector<LLVector3>) * mHull.size();
|
||||
res += sizeof(LLModel::convex_hull_decomposition) + sizeof(std::vector<LLVector3>) * static_cast<U32>(mHull.size());
|
||||
for (U32 i = 0; i < mHull.size(); ++i)
|
||||
{
|
||||
res += mHull[i].size() * sizeof(LLVector3);
|
||||
res += static_cast<U32>(mHull[i].size()) * sizeof(LLVector3);
|
||||
}
|
||||
|
||||
res += sizeof(LLModel::hull) + sizeof(LLVector3) * mBaseHull.size();
|
||||
res += sizeof(LLModel::hull) + sizeof(LLVector3) * static_cast<U32>(mBaseHull.size());
|
||||
|
||||
res += sizeof(std::vector<LLModel::PhysicsMesh>) + sizeof(std::vector<LLModel::PhysicsMesh>) * mMesh.size();
|
||||
res += sizeof(std::vector<LLModel::PhysicsMesh>) + sizeof(std::vector<LLModel::PhysicsMesh>) * static_cast<U32>(mMesh.size());
|
||||
for (U32 i = 0; i < mMesh.size(); ++i)
|
||||
{
|
||||
res += mMesh[i].sizeBytes();
|
||||
|
|
@ -1814,7 +1814,7 @@ LLSD LLModel::Decomposition::asLLSD() const
|
|||
|
||||
for (U32 i = 0; i < mHull.size(); ++i)
|
||||
{
|
||||
U32 size = mHull[i].size();
|
||||
U32 size = static_cast<U32>(mHull[i].size());
|
||||
total += size;
|
||||
hulls[i] = (U8) (size);
|
||||
|
||||
|
|
|
|||
|
|
@ -122,8 +122,8 @@ public:
|
|||
U32 sizeBytes() const
|
||||
{
|
||||
U32 res = sizeof(std::vector<LLVector3>) * 2;
|
||||
res += sizeof(LLVector3) * mPositions.size();
|
||||
res += sizeof(LLVector3) * mNormals.size();
|
||||
res += sizeof(LLVector3) * static_cast<U32>(mPositions.size());
|
||||
res += sizeof(LLVector3) * static_cast<U32>(mNormals.size());
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -83,13 +83,13 @@ void LLPrimTextureList::clear()
|
|||
void LLPrimTextureList::copy(const LLPrimTextureList& other_list)
|
||||
{
|
||||
// compare the sizes
|
||||
S32 this_size = mEntryList.size();
|
||||
S32 other_size = other_list.mEntryList.size();
|
||||
auto this_size = mEntryList.size();
|
||||
auto other_size = other_list.mEntryList.size();
|
||||
|
||||
if (this_size > other_size)
|
||||
{
|
||||
// remove the extra entries
|
||||
for (S32 index = this_size; index > other_size; --index)
|
||||
for (size_t index = this_size; index > other_size; --index)
|
||||
{
|
||||
delete mEntryList[index-1];
|
||||
}
|
||||
|
|
@ -97,18 +97,18 @@ void LLPrimTextureList::copy(const LLPrimTextureList& other_list)
|
|||
this_size = other_size;
|
||||
}
|
||||
|
||||
S32 index = 0;
|
||||
size_t index = 0;
|
||||
// copy for the entries that already exist
|
||||
for ( ; index < this_size; ++index)
|
||||
{
|
||||
delete mEntryList[index];
|
||||
mEntryList[index] = other_list.getTexture(index)->newCopy();
|
||||
mEntryList[index] = other_list.getTexture(static_cast<U8>(index))->newCopy();
|
||||
}
|
||||
|
||||
// add new entires if needed
|
||||
for ( ; index < other_size; ++index)
|
||||
{
|
||||
mEntryList.push_back( other_list.getTexture(index)->newCopy() );
|
||||
mEntryList.push_back( other_list.getTexture(static_cast<U8>(index))->newCopy());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -127,9 +127,9 @@ void LLPrimTextureList::take(LLPrimTextureList& other_list)
|
|||
// returns TEM_CHANGE_TEXTURE if successful, otherwise TEM_CHANGE_NONE
|
||||
S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry& te)
|
||||
{
|
||||
if (S32(index) >= mEntryList.size())
|
||||
if (size_t(index) >= mEntryList.size())
|
||||
{
|
||||
S32 current_size = mEntryList.size();
|
||||
auto current_size = mEntryList.size();
|
||||
LL_WARNS() << "ignore copy of index = " << S32(index) << " into texture entry list of size = " << current_size << LL_ENDL;
|
||||
return TEM_CHANGE_NONE;
|
||||
}
|
||||
|
|
@ -389,7 +389,7 @@ LLMaterialPtr LLPrimTextureList::getMaterialParams(const U8 index)
|
|||
|
||||
S32 LLPrimTextureList::size() const
|
||||
{
|
||||
return mEntryList.size();
|
||||
return static_cast<S32>(mEntryList.size());
|
||||
}
|
||||
|
||||
// sets the size of the mEntryList container
|
||||
|
|
@ -400,12 +400,12 @@ void LLPrimTextureList::setSize(S32 new_size)
|
|||
new_size = 0;
|
||||
}
|
||||
|
||||
S32 current_size = mEntryList.size();
|
||||
auto current_size = mEntryList.size();
|
||||
|
||||
if (new_size > current_size)
|
||||
{
|
||||
mEntryList.resize(new_size);
|
||||
for (S32 index = current_size; index < new_size; ++index)
|
||||
for (size_t index = current_size; index < new_size; ++index)
|
||||
{
|
||||
if (current_size > 0
|
||||
&& mEntryList[current_size - 1])
|
||||
|
|
@ -423,7 +423,7 @@ void LLPrimTextureList::setSize(S32 new_size)
|
|||
}
|
||||
else if (new_size < current_size)
|
||||
{
|
||||
for (S32 index = current_size-1; index >= new_size; --index)
|
||||
for (size_t index = current_size-1; index >= new_size; --index)
|
||||
{
|
||||
delete mEntryList[index];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ void LLPrimTextureList::take(LLPrimTextureList &other_list) { }
|
|||
void LLPrimTextureList::setSize(S32 new_size) { mEntryList.resize(new_size); }
|
||||
void LLPrimTextureList::setAllIDs(const LLUUID &id) { }
|
||||
LLTextureEntry * LLPrimTextureList::getTexture(const U8 index) const { return nullptr; }
|
||||
S32 LLPrimTextureList::size() const { return mEntryList.size(); }
|
||||
S32 LLPrimTextureList::size() const { return static_cast<S32>(mEntryList.size()); }
|
||||
|
||||
class PRIMITIVE_TEST_SETUP
|
||||
{
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ bool LLFontBitmapCache::nextOpenPos(S32 width, S32& pos_x, S32& pos_y, EFontGlyp
|
|||
|
||||
S32 num_components = getNumComponents(bitmap_type);
|
||||
mImageRawVec[bitmap_idx].push_back(new LLImageRaw(mBitmapWidth, mBitmapHeight, num_components));
|
||||
bitmap_num = mImageRawVec[bitmap_idx].size() - 1;
|
||||
bitmap_num = static_cast<U32>(mImageRawVec[bitmap_idx].size()) - 1;
|
||||
|
||||
LLImageRaw* image_raw = getImageRaw(bitmap_type, bitmap_num);
|
||||
if (EFontGlyphType::Grayscale == bitmap_type)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public:
|
|||
LLImageGL* getImageGL(EFontGlyphType bitmapType, U32 bitmapNum) const;
|
||||
|
||||
S32 getMaxCharWidth() const { return mMaxCharWidth; }
|
||||
U32 getNumBitmaps(EFontGlyphType bitmapType) const { return (bitmapType < EFontGlyphType::Count) ? mImageRawVec[static_cast<U32>(bitmapType)].size() : 0; }
|
||||
U32 getNumBitmaps(EFontGlyphType bitmapType) const { return (bitmapType < EFontGlyphType::Count) ? static_cast<U32>(mImageRawVec[static_cast<U32>(bitmapType)].size()) : 0U; }
|
||||
S32 getBitmapWidth() const { return mBitmapWidth; }
|
||||
S32 getBitmapHeight() const { return mBitmapHeight; }
|
||||
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ S32 LLFontFreetype::ftOpenFace(const std::string& filename, S32 face_n)
|
|||
pFtStream = new LLFT_Stream();
|
||||
pFtStream->base = 0;
|
||||
pFtStream->pos = 0;
|
||||
pFtStream->size = file_size;
|
||||
pFtStream->size = static_cast<unsigned long>(file_size);
|
||||
pFtStream->descriptor.pointer = pFileStream;
|
||||
pFtStream->read = ft_read_cb;
|
||||
pFtStream->close = ft_close_cb;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
|
|||
|
||||
if(!sDisplayFont) //do not display texts
|
||||
{
|
||||
return wstr.length() ;
|
||||
return static_cast<S32>(wstr.length());
|
||||
}
|
||||
|
||||
if (wstr.empty())
|
||||
|
|
|
|||
|
|
@ -621,7 +621,7 @@ bool LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString>* attrib
|
|||
}
|
||||
|
||||
mAttribute.clear();
|
||||
U32 numAttributes = (attributes == NULL) ? 0 : attributes->size();
|
||||
U32 numAttributes = (attributes == NULL) ? 0U : static_cast<U32>(attributes->size());
|
||||
#if LL_RELEASE_WITH_DEBUG_INFO
|
||||
mAttribute.resize(LLShaderMgr::instance()->mReservedAttribs.size() + numAttributes, { -1, NULL });
|
||||
#else
|
||||
|
|
@ -843,7 +843,7 @@ bool LLGLSLShader::mapUniforms(const vector<LLStaticHashedString>* uniforms)
|
|||
mTexture.clear();
|
||||
mValue.clear();
|
||||
//initialize arrays
|
||||
U32 numUniforms = (uniforms == NULL) ? 0 : uniforms->size();
|
||||
U32 numUniforms = (uniforms == NULL) ? 0U : static_cast<U32>(uniforms->size());
|
||||
mUniform.resize(numUniforms + LLShaderMgr::instance()->mReservedUniforms.size(), -1);
|
||||
mTexture.resize(numUniforms + LLShaderMgr::instance()->mReservedUniforms.size(), -1);
|
||||
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt)
|
|||
return true;
|
||||
}
|
||||
|
||||
U32 offset = mTex.size();
|
||||
U32 offset = static_cast<U32>(mTex.size());
|
||||
|
||||
if( offset >= 4 )
|
||||
{
|
||||
|
|
@ -378,11 +378,11 @@ void LLRenderTarget::release()
|
|||
if (mFBO && (mTex.size() > 1))
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
|
||||
S32 z;
|
||||
size_t z;
|
||||
for (z = mTex.size() - 1; z >= 1; z--)
|
||||
{
|
||||
sBytesAllocated -= mResX*mResY*4;
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+z, LLTexUnit::getInternalType(mUsage), 0, 0);
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, static_cast<GLenum>(GL_COLOR_ATTACHMENT0+z), LLTexUnit::getInternalType(mUsage), 0, 0);
|
||||
LLImageGL::deleteTextures(1, &mTex[z]);
|
||||
}
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO);
|
||||
|
|
@ -426,7 +426,7 @@ void LLRenderTarget::bindTarget()
|
|||
GL_COLOR_ATTACHMENT1,
|
||||
GL_COLOR_ATTACHMENT2,
|
||||
GL_COLOR_ATTACHMENT3};
|
||||
glDrawBuffers(mTex.size(), drawbuffers);
|
||||
glDrawBuffers(static_cast<GLsizei>(mTex.size()), drawbuffers);
|
||||
|
||||
if (mTex.empty())
|
||||
{ //no color buffer to draw to
|
||||
|
|
@ -485,7 +485,7 @@ U32 LLRenderTarget::getTexture(U32 attachment) const
|
|||
|
||||
U32 LLRenderTarget::getNumTextures() const
|
||||
{
|
||||
return mTex.size();
|
||||
return static_cast<U32>(mTex.size());
|
||||
}
|
||||
|
||||
void LLRenderTarget::bindTexture(U32 index, S32 channel, LLTexUnit::eTextureFilterOptions filter_options)
|
||||
|
|
|
|||
|
|
@ -1096,7 +1096,7 @@ bool LLShaderMgr::saveCachedProgramBinary(LLGLSLShader* shader)
|
|||
program_binary.resize(binary_info.mBinaryLength);
|
||||
|
||||
GLenum error = glGetError(); // Clear current error
|
||||
glGetProgramBinary(shader->mProgramObject, program_binary.size() * sizeof(U8), nullptr, &binary_info.mBinaryFormat, program_binary.data());
|
||||
glGetProgramBinary(shader->mProgramObject, static_cast<GLsizei>(program_binary.size() * sizeof(U8)), nullptr, &binary_info.mBinaryFormat, program_binary.data());
|
||||
error = glGetError();
|
||||
if (error == GL_NO_ERROR)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ void LLAccordionCtrl::arrangeMultiple()
|
|||
if (mFitParent)
|
||||
{
|
||||
// All expanded tabs will have equal height
|
||||
panel_height = calcExpandedTabHeight(i, panel_top);
|
||||
panel_height = calcExpandedTabHeight(static_cast<S32>(i), panel_top);
|
||||
ctrlSetLeftTopAndSize(accordion_tab, panel_left, panel_top, panel_width, panel_height);
|
||||
|
||||
// Try to make accordion tab fit accordion view height.
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ bool LLClipboard::addToClipboard(const LLUUID& src, const LLAssetType::EType typ
|
|||
if (LLAssetType::lookupIsAssetIDKnowable(type))
|
||||
{
|
||||
LLWString source = utf8str_to_wstring(src.asString());
|
||||
res = addToClipboard(source, 0, source.size());
|
||||
res = addToClipboard(source, 0, static_cast<S32>(source.size()));
|
||||
}
|
||||
if (res)
|
||||
{
|
||||
|
|
@ -87,13 +87,13 @@ bool LLClipboard::addToClipboard(const LLUUID& src, const LLAssetType::EType typ
|
|||
bool LLClipboard::pasteFromClipboard(std::vector<LLUUID>& inv_objects) const
|
||||
{
|
||||
bool res = false;
|
||||
S32 count = mObjects.size();
|
||||
auto count = mObjects.size();
|
||||
inv_objects.reserve(inv_objects.size() + count);
|
||||
if (count > 0)
|
||||
{
|
||||
res = true;
|
||||
inv_objects.clear();
|
||||
for (S32 i = 0; i < count; i++)
|
||||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
inv_objects.push_back(mObjects[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -995,7 +995,7 @@ void LLComboBox::updateSelection()
|
|||
LLWString selected_item = utf8str_to_wstring(getSelectedItemLabel());
|
||||
LLWString wtext = left_wstring + selected_item.substr(left_wstring.size(), selected_item.size());
|
||||
mTextEntry->setText(wstring_to_utf8str(wtext));
|
||||
mTextEntry->setSelection(left_wstring.size(), mTextEntry->getWText().size());
|
||||
mTextEntry->setSelection(static_cast<S32>(left_wstring.size()), static_cast<S32>(mTextEntry->getWText().size()));
|
||||
mTextEntry->endSelection();
|
||||
mTextEntry->setTentative(false);
|
||||
mHasAutocompletedText = true;
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ LLCommandManager::~LLCommandManager()
|
|||
|
||||
U32 LLCommandManager::commandCount() const
|
||||
{
|
||||
return mCommands.size();
|
||||
return static_cast<U32>(mCommands.size());
|
||||
}
|
||||
|
||||
LLCommand * LLCommandManager::getCommand(U32 commandIndex)
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ protected:
|
|||
void addCommand(LLCommand * command);
|
||||
|
||||
private:
|
||||
typedef std::map<LLUUID, U32> CommandIndexMap;
|
||||
typedef std::map<LLUUID, size_t> CommandIndexMap;
|
||||
typedef std::vector<LLCommand *> CommandVector;
|
||||
|
||||
CommandVector mCommands;
|
||||
|
|
|
|||
|
|
@ -147,11 +147,11 @@ void LLConsole::draw()
|
|||
return;
|
||||
}
|
||||
|
||||
U32 num_lines=0;
|
||||
size_t num_lines{ 0 };
|
||||
|
||||
paragraph_t::reverse_iterator paragraph_it;
|
||||
paragraph_it = mParagraphs.rbegin();
|
||||
U32 paragraph_num=mParagraphs.size();
|
||||
auto paragraph_num=mParagraphs.size();
|
||||
|
||||
while (!mParagraphs.empty() && paragraph_it != mParagraphs.rend())
|
||||
{
|
||||
|
|
@ -159,7 +159,7 @@ void LLConsole::draw()
|
|||
if(num_lines > mMaxLines
|
||||
|| ( (mLinePersistTime > (F32)0.f) && ((*paragraph_it).mAddTime - skip_time)/(mLinePersistTime - mFadeTime) <= (F32)0.f))
|
||||
{ //All lines above here are done. Lose them.
|
||||
for (U32 i=0;i<paragraph_num;i++)
|
||||
for (size_t i = 0; i < paragraph_num; i++)
|
||||
{
|
||||
if (!mParagraphs.empty())
|
||||
mParagraphs.pop_front();
|
||||
|
|
@ -258,7 +258,7 @@ void LLConsole::Paragraph::makeParagraphColorSegments (const LLColor4 &color)
|
|||
ParagraphColorSegment color_segment;
|
||||
|
||||
color_segment.mColor.setValue(color_llsd);
|
||||
color_segment.mNumChars = color_str.length();
|
||||
color_segment.mNumChars = static_cast<S32>(color_str.length());
|
||||
|
||||
mParagraphColorSegments.push_back(color_segment);
|
||||
}
|
||||
|
|
@ -310,7 +310,7 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, const LLFontGL* font, b
|
|||
skip_chars = 0;
|
||||
}
|
||||
|
||||
U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, LLFontGL::WORD_BOUNDARY_IF_POSSIBLE);
|
||||
U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, static_cast<S32>(line_end) - paragraph_offset, LLFontGL::WORD_BOUNDARY_IF_POSSIBLE);
|
||||
|
||||
if (drawable != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ void LLEmojiDictionary::findByShortCode(
|
|||
std::size_t begin, end;
|
||||
if (searchInShortCode(begin, end, shortCode, needle))
|
||||
{
|
||||
results[begin].emplace_back(d.Character, shortCode, begin, end);
|
||||
results[static_cast<llwchar>(begin)].emplace_back(d.Character, shortCode, begin, end);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ U32 LLFlatListView::size(const bool only_visible_items) const
|
|||
}
|
||||
else
|
||||
{
|
||||
return mItemPairs.size();
|
||||
return static_cast<U32>(mItemPairs.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -563,7 +563,7 @@ void LLFlatListView::rearrangeItems()
|
|||
}
|
||||
|
||||
// add paddings between items, excluding invisible ones
|
||||
height += mItemPad * (mItemPairs.size() - invisible_children_count - 1);
|
||||
height += mItemPad * (static_cast<S32>(mItemPairs.size()) - invisible_children_count - 1);
|
||||
|
||||
LLRect rc = mItemsPanel->getRect();
|
||||
S32 width = mItemsNoScrollWidth;
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ public:
|
|||
void setCommitOnSelectionChange(bool b) { mCommitOnSelectionChange = b; }
|
||||
|
||||
/** Get number of selected items in the list */
|
||||
U32 numSelected() const {return mSelectedItemPairs.size(); }
|
||||
U32 numSelected() const {return static_cast<U32>(mSelectedItemPairs.size()); }
|
||||
|
||||
/** Get number of (visible) items in the list */
|
||||
U32 size(const bool only_visible_items = true) const;
|
||||
|
|
|
|||
|
|
@ -758,7 +758,7 @@ void LLFolderView::removeSelectedItems()
|
|||
// items, since the removal will futz with internal data
|
||||
// structures.
|
||||
std::vector<LLFolderViewItem*> items;
|
||||
S32 count = mSelectedItems.size();
|
||||
auto count = mSelectedItems.size();
|
||||
if(count <= 0) return;
|
||||
LLFolderViewItem* item = NULL;
|
||||
selected_items_t::iterator item_it;
|
||||
|
|
@ -803,7 +803,7 @@ void LLFolderView::removeSelectedItems()
|
|||
setSelection(item_to_select, item_to_select ? item_to_select->isOpen() : false, mParentPanel.get()->hasFocus());
|
||||
|
||||
listeners.reserve(count);
|
||||
for(S32 i = 0; i < count; ++i)
|
||||
for(size_t i = 0; i < count; ++i)
|
||||
{
|
||||
listener = items[i]->getViewModelItem();
|
||||
if(listener && (std::find(listeners.begin(), listeners.end(), listener) == listeners.end()))
|
||||
|
|
@ -922,7 +922,7 @@ void LLFolderView::copy()
|
|||
{
|
||||
// *NOTE: total hack to clear the inventory clipboard
|
||||
LLClipboard::instance().reset();
|
||||
S32 count = mSelectedItems.size();
|
||||
auto count = mSelectedItems.size();
|
||||
if(getVisible() && getEnabled() && (count > 0))
|
||||
{
|
||||
LLFolderViewModelItem* listener = NULL;
|
||||
|
|
@ -1059,7 +1059,7 @@ void LLFolderView::startRenamingSelectedItem( void )
|
|||
// make sure selection is visible
|
||||
scrollToShowSelection();
|
||||
|
||||
S32 count = mSelectedItems.size();
|
||||
auto count = mSelectedItems.size();
|
||||
LLFolderViewItem* item = NULL;
|
||||
if(count > 0)
|
||||
{
|
||||
|
|
@ -1414,7 +1414,7 @@ bool LLFolderView::search(LLFolderViewItem* first_item, const std::string &searc
|
|||
|
||||
std::string current_item_label(search_item->getViewModelItem()->getSearchableName());
|
||||
LLStringUtil::toUpper(current_item_label);
|
||||
S32 search_string_length = llmin(upper_case_string.size(), current_item_label.size());
|
||||
auto search_string_length = llmin(upper_case_string.size(), current_item_label.size());
|
||||
if (!current_item_label.compare(0, search_string_length, upper_case_string))
|
||||
{
|
||||
found = true;
|
||||
|
|
@ -1454,7 +1454,7 @@ bool LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
|||
mParentPanel.get()->setFocus(true);
|
||||
|
||||
bool handled = childrenHandleRightMouseDown(x, y, mask) != NULL;
|
||||
S32 count = mSelectedItems.size();
|
||||
auto count = mSelectedItems.size();
|
||||
|
||||
LLMenuGL* menu = static_cast<LLMenuGL*>(mPopupMenuHandle.get());
|
||||
if (!menu)
|
||||
|
|
|
|||
|
|
@ -940,22 +940,22 @@ void LLFolderViewItem::draw()
|
|||
return;
|
||||
}
|
||||
|
||||
std::string::size_type filter_string_length = mViewModelItem->hasFilterStringMatch() ? mViewModelItem->getFilterStringSize() : 0;
|
||||
auto filter_string_length = mViewModelItem->hasFilterStringMatch() ? static_cast<S32>(mViewModelItem->getFilterStringSize()) : 0;
|
||||
F32 right_x = 0;
|
||||
F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD;
|
||||
F32 text_left = (F32)getLabelXPos();
|
||||
std::string combined_string = mLabel + mLabelSuffix;
|
||||
|
||||
const LLFontGL* suffix_font = getLabelFontForStyle(LLFontGL::NORMAL);
|
||||
S32 filter_offset = mViewModelItem->getFilterStringOffset();
|
||||
S32 filter_offset = static_cast<S32>(mViewModelItem->getFilterStringOffset());
|
||||
if (filter_string_length > 0)
|
||||
{
|
||||
S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD);
|
||||
S32 top = getRect().getHeight() - TOP_PAD;
|
||||
if(mLabelSuffix.empty() || (font == suffix_font))
|
||||
{
|
||||
S32 left = ll_round(text_left) + font->getWidth(combined_string, 0, mViewModelItem->getFilterStringOffset()) - 2;
|
||||
S32 right = left + font->getWidth(combined_string, mViewModelItem->getFilterStringOffset(), filter_string_length) + 2;
|
||||
S32 left = ll_round(text_left) + font->getWidth(combined_string, 0, static_cast<S32>(mViewModelItem->getFilterStringOffset())) - 2;
|
||||
S32 right = left + font->getWidth(combined_string, static_cast<S32>(mViewModelItem->getFilterStringOffset()), filter_string_length) + 2;
|
||||
|
||||
LLUIImage* box_image = default_params.selection_image;
|
||||
LLRect box_rect(left, top, right, bottom);
|
||||
|
|
@ -976,7 +976,7 @@ 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, mLabel.size()) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset) - 2;
|
||||
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;
|
||||
LLUIImage* box_image = default_params.selection_image;
|
||||
LLRect box_rect(left, top, right, bottom);
|
||||
|
|
@ -1033,7 +1033,7 @@ void LLFolderViewItem::draw()
|
|||
if(suffix_filter_length > 0)
|
||||
{
|
||||
S32 suffix_offset = llmax(0, filter_offset - (S32)mLabel.size());
|
||||
F32 match_string_left = text_left + font->getWidthF32(mLabel, 0, mLabel.size()) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset + suffix_filter_length) - suffix_font->getWidthF32(mLabelSuffix, suffix_offset, suffix_filter_length);
|
||||
F32 match_string_left = text_left + font->getWidthF32(mLabel, 0, static_cast<S32>(mLabel.size())) + suffix_font->getWidthF32(mLabelSuffix, 0, suffix_offset + suffix_filter_length) - suffix_font->getWidthF32(mLabelSuffix, suffix_offset, suffix_filter_length);
|
||||
F32 yy = (F32)getRect().getHeight() - suffix_font->getLineHeight() - (F32)mTextPad - (F32)TOP_PAD;
|
||||
suffix_font->renderUTF8(mLabelSuffix, suffix_offset, match_string_left, yy, sFilterTextColor,
|
||||
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ inline bool LLKeywordToken::isHead(const llwchar* s) const
|
|||
// strncmp is much faster than string compare
|
||||
bool res = true;
|
||||
const llwchar* t = mToken.c_str();
|
||||
S32 len = mToken.size();
|
||||
auto len = mToken.size();
|
||||
for (S32 i=0; i<len; i++)
|
||||
{
|
||||
if (s[i] != t[i])
|
||||
|
|
@ -55,7 +55,7 @@ inline bool LLKeywordToken::isTail(const llwchar* s) const
|
|||
{
|
||||
bool res = true;
|
||||
const llwchar* t = mDelimiter.c_str();
|
||||
S32 len = mDelimiter.size();
|
||||
auto len = mDelimiter.size();
|
||||
for (S32 i=0; i<len; i++)
|
||||
{
|
||||
if (s[i] != t[i])
|
||||
|
|
@ -134,7 +134,7 @@ std::string LLKeywords::getArguments(LLSD& arguments)
|
|||
|
||||
if (arguments.isArray())
|
||||
{
|
||||
U32 argsCount = arguments.size();
|
||||
auto argsCount = arguments.size();
|
||||
LLSD::array_iterator arrayIt = arguments.beginArray();
|
||||
for ( ; arrayIt != arguments.endArray(); ++arrayIt)
|
||||
{
|
||||
|
|
@ -489,7 +489,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
return;
|
||||
}
|
||||
|
||||
S32 text_len = wtext.size() + 1;
|
||||
S32 text_len = static_cast<S32>(wtext.size()) + 1;
|
||||
|
||||
seg_list->push_back( new LLNormalTextSegment( style, 0, text_len, editor ) );
|
||||
|
||||
|
|
@ -707,16 +707,16 @@ void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmen
|
|||
{
|
||||
if (pos!=seg_start)
|
||||
{
|
||||
LLTextSegmentPtr text_segment = new LLNormalTextSegment(cur_token_style, seg_start, pos, editor);
|
||||
LLTextSegmentPtr text_segment = new LLNormalTextSegment(cur_token_style, seg_start, static_cast<S32>(pos), editor);
|
||||
text_segment->setToken( cur_token );
|
||||
insertSegment( seg_list, text_segment, text_len, style, editor);
|
||||
}
|
||||
|
||||
LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, pos);
|
||||
LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(style, static_cast<S32>(pos));
|
||||
text_segment->setToken( cur_token );
|
||||
insertSegment( seg_list, text_segment, text_len, style, editor);
|
||||
|
||||
seg_start = pos+1;
|
||||
seg_start = static_cast<S32>(pos) + 1;
|
||||
pos = wtext.find('\n',seg_start);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
S32 getLengthHead() const { return mToken.size(); }
|
||||
S32 getLengthTail() const { return mDelimiter.size(); }
|
||||
S32 getLengthHead() const { return static_cast<S32>(mToken.size()); }
|
||||
S32 getLengthTail() const { return static_cast<S32>(mDelimiter.size()); }
|
||||
bool isHead(const llwchar* s) const;
|
||||
bool isTail(const llwchar* s) const;
|
||||
const LLWString& getToken() const { return mToken; }
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
|
||||
void addPanel(LLLayoutPanel* panel, EAnimate animate = NO_ANIMATE);
|
||||
void collapsePanel(LLPanel* panel, bool collapsed = true);
|
||||
S32 getNumPanels() { return mPanels.size(); }
|
||||
S32 getNumPanels() { return static_cast<S32>(mPanels.size()); }
|
||||
|
||||
void updateLayout();
|
||||
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ const std::string& LLLineEditor::getSuggestion(U32 index) const
|
|||
|
||||
U32 LLLineEditor::getSuggestionCount() const
|
||||
{
|
||||
return mSuggestionList.size();
|
||||
return static_cast<U32>(mSuggestionList.size());
|
||||
}
|
||||
|
||||
void LLLineEditor::replaceWithSuggestion(U32 index)
|
||||
|
|
@ -994,7 +994,7 @@ void LLLineEditor::addChar(const llwchar uni_char)
|
|||
mText.erase(getCursor(), 1);
|
||||
}
|
||||
|
||||
S32 cur_bytes = mText.getString().size();
|
||||
S32 cur_bytes = static_cast<S32>(mText.getString().size());
|
||||
|
||||
S32 new_bytes = wchar_utf8_length(new_c);
|
||||
|
||||
|
|
@ -1007,7 +1007,7 @@ void LLLineEditor::addChar(const llwchar uni_char)
|
|||
}
|
||||
else if (mMaxLengthChars)
|
||||
{
|
||||
S32 wide_chars = mText.getWString().size();
|
||||
auto wide_chars = mText.getWString().size();
|
||||
if ((wide_chars + 1) > mMaxLengthChars)
|
||||
{
|
||||
allow_char = false;
|
||||
|
|
@ -1332,7 +1332,7 @@ void LLLineEditor::pasteHelper(bool is_primary)
|
|||
|
||||
if (mMaxLengthChars)
|
||||
{
|
||||
U32 available_chars = mMaxLengthChars - mText.getWString().size();
|
||||
auto available_chars = mMaxLengthChars - mText.getWString().size();
|
||||
|
||||
if (available_chars < clean_string.size())
|
||||
{
|
||||
|
|
@ -2300,10 +2300,10 @@ bool LLLineEditor::postvalidateFloat(const std::string &str)
|
|||
|
||||
LLWString trimmed = utf8str_to_wstring(str);
|
||||
LLWStringUtil::trim(trimmed);
|
||||
S32 len = trimmed.length();
|
||||
auto len = trimmed.length();
|
||||
if( 0 < len )
|
||||
{
|
||||
S32 i = 0;
|
||||
size_t i = 0;
|
||||
|
||||
// First character can be a negative sign
|
||||
if( '-' == trimmed[0] )
|
||||
|
|
@ -2360,7 +2360,7 @@ bool LLLineEditor::evaluateFloat()
|
|||
if (!success)
|
||||
{
|
||||
// Move the cursor to near the error on failure
|
||||
setCursor(LLCalc::getInstance()->getLastErrorPos());
|
||||
setCursor(static_cast<S32>(LLCalc::getInstance()->getLastErrorPos()));
|
||||
// *TODO: Translated error message indicating the type of error? Select error text?
|
||||
}
|
||||
else
|
||||
|
|
@ -2501,7 +2501,7 @@ void LLLineEditor::updatePreedit(const LLWString &preedit_string,
|
|||
if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode())
|
||||
{
|
||||
mPreeditOverwrittenWString.assign( LLWString( mText, insert_preedit_at, mPreeditWString.length() ) );
|
||||
mText.erase(insert_preedit_at, mPreeditWString.length());
|
||||
mText.erase(insert_preedit_at, static_cast<S32>(mPreeditWString.length()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ LLMenuItemGL::LLMenuItemGL(const LLMenuItemGL::Params& p)
|
|||
{
|
||||
mAcceleratorMask |= MASK_SHIFT;
|
||||
}
|
||||
S32 pipe_pos = shortcut.rfind("|");
|
||||
auto pipe_pos = shortcut.rfind("|");
|
||||
std::string key_str = shortcut.substr(pipe_pos+1);
|
||||
|
||||
LLKeyboard::keyFromString(key_str, &mAcceleratorKey);
|
||||
|
|
@ -545,8 +545,8 @@ void LLMenuItemGL::draw( void )
|
|||
std::string::size_type offset = upper_case_label.find(mJumpKey);
|
||||
if (offset != std::string::npos)
|
||||
{
|
||||
S32 x_begin = LEFT_PLAIN_PIXELS + mFont->getWidth(mLabel, 0, offset);
|
||||
S32 x_end = LEFT_PLAIN_PIXELS + mFont->getWidth(mLabel, 0, offset + 1);
|
||||
S32 x_begin = LEFT_PLAIN_PIXELS + mFont->getWidth(mLabel, 0, static_cast<S32>(offset));
|
||||
S32 x_end = LEFT_PLAIN_PIXELS + mFont->getWidth(mLabel, 0, static_cast<S32>(offset) + 1);
|
||||
gl_line_2d(x_begin, (MENU_ITEM_PADDING / 2) + 1, x_end, (MENU_ITEM_PADDING / 2) + 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -1649,8 +1649,8 @@ void LLMenuItemBranchDownGL::draw( void )
|
|||
if (offset != std::string::npos)
|
||||
{
|
||||
S32 x_offset = ll_round((F32)getRect().getWidth() / 2.f - getFont()->getWidthF32(mLabel.getString(), 0, S32_MAX) / 2.f);
|
||||
S32 x_begin = x_offset + getFont()->getWidth(mLabel, 0, offset);
|
||||
S32 x_end = x_offset + getFont()->getWidth(mLabel, 0, offset + 1);
|
||||
S32 x_begin = x_offset + getFont()->getWidth(mLabel, 0, static_cast<S32>(offset));
|
||||
S32 x_end = x_offset + getFont()->getWidth(mLabel, 0, static_cast<S32>(offset) + 1);
|
||||
gl_line_2d(x_begin, LABEL_BOTTOM_PAD_PIXELS, x_end, LABEL_BOTTOM_PAD_PIXELS);
|
||||
}
|
||||
}
|
||||
|
|
@ -2068,7 +2068,7 @@ bool LLMenuGL::scrollItems(EScrollingDirection direction)
|
|||
// Otherwise viewer will hang for a time needed to scroll U32_MAX
|
||||
// times in std::advance(). STORM-659.
|
||||
size_t nitems = mItems.size();
|
||||
U32 scrollable_items = nitems < mMaxScrollableItems ? nitems : mMaxScrollableItems;
|
||||
U32 scrollable_items = nitems < mMaxScrollableItems ? static_cast<U32>(nitems) : mMaxScrollableItems;
|
||||
|
||||
// Advance by mMaxScrollableItems back from the end of the list
|
||||
// to make the last item visible.
|
||||
|
|
@ -2594,7 +2594,7 @@ void LLMenuGL::empty( void )
|
|||
// erase group of items from menu
|
||||
void LLMenuGL::erase( S32 begin, S32 end, bool arrange/* = true*/)
|
||||
{
|
||||
S32 items = mItems.size();
|
||||
auto items = mItems.size();
|
||||
|
||||
if ( items == 0 || begin >= end || begin < 0 || end > items )
|
||||
{
|
||||
|
|
@ -2813,7 +2813,7 @@ void LLMenuGL::setTornOff(bool torn_off)
|
|||
|
||||
U32 LLMenuGL::getItemCount()
|
||||
{
|
||||
return mItems.size();
|
||||
return static_cast<U32>(mItems.size());
|
||||
}
|
||||
|
||||
LLMenuItemGL* LLMenuGL::getItem(S32 number)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
static void onAppFocusLost();
|
||||
static void onAppFocusGained();
|
||||
|
||||
static S32 activeCount() { return sModalStack.size(); }
|
||||
static S32 activeCount() { return static_cast<S32>(sModalStack.size()); }
|
||||
static void shutdownModals();
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public:
|
|||
/*virtual*/ void draw() override;
|
||||
|
||||
S32 getMaxNumSliders() { return mMaxNumSliders; }
|
||||
S32 getCurNumSliders() { return mValue.size(); }
|
||||
S32 getCurNumSliders() { return static_cast<S32>(mValue.size()); }
|
||||
F32 getOverlapThreshold() { return mOverlapThreshold; }
|
||||
bool canAddSliders() { return mValue.size() < mMaxNumSliders; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1187,7 +1187,7 @@ bool LLNotificationChannel::isEmpty() const
|
|||
|
||||
S32 LLNotificationChannel::size() const
|
||||
{
|
||||
return mItems.size();
|
||||
return static_cast<S32>(mItems.size());
|
||||
}
|
||||
|
||||
size_t LLNotificationChannel::size()
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ public:
|
|||
void fromLLSD(const LLSD& sd);
|
||||
LLSD asLLSD() const;
|
||||
|
||||
S32 getNumElements() { return mFormData.size(); }
|
||||
S32 getNumElements() { return static_cast<S32>(mFormData.size()); }
|
||||
LLSD getElement(S32 index) { return mFormData.get(index); }
|
||||
LLSD getElement(const std::string& element_name);
|
||||
void getElements(LLSD& elements, S32 offset = 0);
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public:
|
|||
LLCtrlSelectionInterface* getSelectionInterface() { return (LLCtrlSelectionInterface*)this; };
|
||||
|
||||
// LLCtrlSelectionInterface functions
|
||||
/*virtual*/ S32 getItemCount() const { return mRadioButtons.size(); }
|
||||
/*virtual*/ S32 getItemCount() const { return static_cast<S32>(mRadioButtons.size()); }
|
||||
/*virtual*/ bool getCanSelect() const { return true; }
|
||||
/*virtual*/ bool selectFirstItem() { return setSelectedIndex(0); }
|
||||
/*virtual*/ bool selectNthItem( S32 index ) { return setSelectedIndex(index); }
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ std::string LLResMgr::getMonetaryString( S32 input ) const
|
|||
S32 output_pos = 0;
|
||||
|
||||
cur_group = 0;
|
||||
S32 pos = digits.size()-1;
|
||||
auto pos = digits.size()-1;
|
||||
S32 count_within_group = 0;
|
||||
while( (pos >= 0) && (groupings[cur_group] >= 0) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ S32 LLScrollListCtrl::isEmpty() const
|
|||
|
||||
S32 LLScrollListCtrl::getItemCount() const
|
||||
{
|
||||
return mItemList.size();
|
||||
return static_cast<S32>(mItemList.size());
|
||||
}
|
||||
|
||||
bool LLScrollListCtrl::hasSelectedItem() const
|
||||
|
|
@ -1325,7 +1325,7 @@ bool LLScrollListCtrl::selectItemByPrefix(const LLWString& target, bool case_sen
|
|||
bool found = false;
|
||||
|
||||
LLWString target_trimmed( target );
|
||||
S32 target_len = target_trimmed.size();
|
||||
auto target_len = target_trimmed.size();
|
||||
|
||||
if( 0 == target_len )
|
||||
{
|
||||
|
|
@ -1377,8 +1377,8 @@ bool LLScrollListCtrl::selectItemByPrefix(const LLWString& target, bool case_sen
|
|||
if (select)
|
||||
{
|
||||
// find offset of matching text (might have leading whitespace)
|
||||
S32 offset = item_label.find(target_trimmed);
|
||||
cellp->highlightText(offset, target_trimmed.size());
|
||||
auto offset = item_label.find(target_trimmed);
|
||||
cellp->highlightText(static_cast<S32>(offset), static_cast<S32>(target_trimmed.size()));
|
||||
selectItem(item, -1);
|
||||
found = true;
|
||||
break;
|
||||
|
|
@ -1404,7 +1404,7 @@ U32 LLScrollListCtrl::searchItems(const LLWString& substring, bool case_sensitiv
|
|||
U32 found = 0;
|
||||
|
||||
LLWString substring_trimmed(substring);
|
||||
S32 len = substring_trimmed.size();
|
||||
auto len = substring_trimmed.size();
|
||||
|
||||
if (0 == len)
|
||||
{
|
||||
|
|
@ -1446,7 +1446,7 @@ U32 LLScrollListCtrl::searchItems(const LLWString& substring, bool case_sensitiv
|
|||
if (found_iter != std::string::npos)
|
||||
{
|
||||
// find offset of matching text
|
||||
cellp->highlightText(found_iter, substring_trimmed.size());
|
||||
cellp->highlightText(static_cast<S32>(found_iter), static_cast<S32>(substring_trimmed.size()));
|
||||
selectItem(item, -1, false);
|
||||
|
||||
found++;
|
||||
|
|
@ -2897,7 +2897,7 @@ void LLScrollListCtrl::copy()
|
|||
{
|
||||
buffer += (*itor)->getContentsCSV() + "\n";
|
||||
}
|
||||
LLClipboard::instance().copyToClipboard(utf8str_to_wstring(buffer), 0, buffer.length());
|
||||
LLClipboard::instance().copyToClipboard(utf8str_to_wstring(buffer), 0, static_cast<S32>(buffer.length()));
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -2981,7 +2981,7 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params
|
|||
// Add column
|
||||
mColumns[name] = new LLScrollListColumn(column_params, this);
|
||||
LLScrollListColumn* new_column = mColumns[name];
|
||||
new_column->mIndex = mColumns.size()-1;
|
||||
new_column->mIndex = static_cast<S32>(mColumns.size()) - 1;
|
||||
|
||||
// Add button
|
||||
if (new_column->getWidth() > 0 || new_column->mRelWidth > 0 || new_column->mDynamicWidth)
|
||||
|
|
@ -3177,7 +3177,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
|
|||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
|
||||
if (!item_p.validateBlock() || !new_item) return NULL;
|
||||
new_item->setNumColumns(mColumns.size());
|
||||
new_item->setNumColumns(static_cast<S32>(mColumns.size()));
|
||||
|
||||
// Add any columns we don't already have
|
||||
S32 col_index = 0;
|
||||
|
|
@ -3212,7 +3212,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
|
|||
}
|
||||
addColumn(new_column);
|
||||
columnp = mColumns[column];
|
||||
new_item->setNumColumns(mColumns.size());
|
||||
new_item->setNumColumns(static_cast<S32>(mColumns.size()));
|
||||
}
|
||||
|
||||
S32 index = columnp->mIndex;
|
||||
|
|
@ -3245,7 +3245,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
|
|||
new_column.name = "0";
|
||||
|
||||
addColumn(new_column);
|
||||
new_item->setNumColumns(mColumns.size());
|
||||
new_item->setNumColumns(static_cast<S32>(mColumns.size()));
|
||||
}
|
||||
|
||||
LLScrollListCell* cell = LLScrollListCell::create(LLScrollListCell::Params().value(item_p.value));
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ public:
|
|||
virtual bool preProcessChildNode(LLXMLNodePtr child);
|
||||
virtual LLScrollListColumn* getColumn(S32 index);
|
||||
virtual LLScrollListColumn* getColumn(const std::string& name);
|
||||
virtual S32 getNumColumns() const { return mColumnsIndexed.size(); }
|
||||
virtual S32 getNumColumns() const { return static_cast<S32>(mColumnsIndexed.size()); }
|
||||
|
||||
// Adds a single element, from an array of:
|
||||
// "columns" => [ "column" => column name, "value" => value, "type" => type, "font" => font, "font-style" => style ], "id" => uuid
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ void LLScrollListItem::addColumn(const LLScrollListCell::Params& p)
|
|||
|
||||
void LLScrollListItem::setNumColumns(S32 columns)
|
||||
{
|
||||
S32 prev_columns = mColumns.size();
|
||||
auto prev_columns = mColumns.size();
|
||||
if (columns < prev_columns)
|
||||
{
|
||||
std::for_each(mColumns.begin()+columns, mColumns.end(), DeletePointer());
|
||||
|
|
@ -93,7 +93,7 @@ void LLScrollListItem::setNumColumns(S32 columns)
|
|||
|
||||
mColumns.resize(columns);
|
||||
|
||||
for (S32 col = prev_columns; col < columns; ++col)
|
||||
for (auto col = prev_columns; col < columns; ++col)
|
||||
{
|
||||
mColumns[col] = NULL;
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@ void LLScrollListItem::setColumn( S32 column, LLScrollListCell *cell )
|
|||
|
||||
S32 LLScrollListItem::getNumColumns() const
|
||||
{
|
||||
return mColumns.size();
|
||||
return static_cast<S32>(mColumns.size());
|
||||
}
|
||||
|
||||
LLScrollListCell* LLScrollListItem::getColumn(const S32 i) const
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ S32 LLSpellChecker::getSuggestions(const std::string& word, std::vector<std::str
|
|||
}
|
||||
mHunspell->free_list(&suggestion_list, suggestion_cnt);
|
||||
}
|
||||
return suggestions.size();
|
||||
return static_cast<S32>(suggestions.size());
|
||||
}
|
||||
|
||||
const LLSD LLSpellChecker::getDictionaryData(const std::string& dict_language)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue