Sync with alchemy

Moves some constants out of llavatarconstants.h
8ebf8f4608bd: Change various const constants to constexpr
e07d5d43ba30: CID-143595
30b6935fc66d: CID-143595
acc96f9051cb: Fix a memory leak in viewer side baking initial wearable setup
Sync llmodel.*

Changesets assimilated:
f8f7706c2902: CID-143554 - fix out of bounds access
223eb65adce4: CID-143554 - Chase
2ceb49aaa133: CID-42838, CID-42930, CID-42933, CID-42938, CID-42940, CID-42945, CID-42948, CID-56111, CID-83907
d220005d9f23: Missing null check before deref
31dbb0f3b6ee: CID-42571 CID-42576 CID-42578
49caf082e65c: change unordered_map to flat_map
Doesn't cause as many problems as a hashmap when it comes to assumptions in the
LLUI system.
f93f5e881484: "update" linux cef
downgrade to fix javascript problems
cba818dd9269: Various null checks and etc.
1b4c6bc483bb: CID-42847, CID-42854, CID-42886, CID-42921, CID-42922, CID-42923, CID-42924, CID-42925,
CID-42927, CID-42928, CID-83871, CID-83876, CID-83878, CID-83880, CID-83900, CID-143573
0fe90cd9ec24: Various file size related things
a79f6f653dca: CID-42918 - Initialize member pointers in LLFloaterGodTools
0b70d600d978: Tweak LLFloaterBuyLand initializations
e8b173ffe813: CID-42854 - Additional fix to LLDrawInfo
b5d745cf3fde: Fix signage
4f2e2f384781: Initialize and cleanup various class member variables.
CID-42899, CID-42900, CID-42902, CID-42903, CID-42904, CID-42905, CID-42909, CID-42910,
CID-42911, CID-42912, CID-42913, CID-42967, CID-83853, CID-83898, CID-83890, CID-143584
9851a3e39b4c: Fix platform specific include directories
5c074e84f1be: Initialize and clenaup various more class member variables.
CID-42885, CID-42853, CID-42894, CID-42895, CID-42896, CID-83908, CID-143574, CID-143575,
CID-143576, CID-143576, CID-143578
ac262854ac92: Brace sub-object in initialization to make our intentions clear to clang
358da477d4c1: More double brace init
c3850119314a: Initialize various member pointers in panels
CID-83902, CID-83903, CID-83905, CID-83909, CID-83911, CID-83912, CID-143572
This commit is contained in:
Lirusaito
2016-03-30 21:06:47 -04:00
parent 7a48138404
commit 2653567d82
67 changed files with 364 additions and 231 deletions

View File

@@ -1866,11 +1866,11 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>6d832d5ed191e61c7aec6d8a10bb3062</string> <string>0e7613b2e038e18488452c2a9882144d</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>http://depot.alchemyviewer.org/pub/linux64/lib-trusty/llceflib-3.2623.1395.g3034273-linux64-201603262117.tar.bz2</string> <string>http://depot.alchemyviewer.org/pub/linux64/lib-trusty/llceflib-3.2526.1373.gb660893-linux64-201603281900.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>linux64</string> <string>linux64</string>
@@ -1905,7 +1905,7 @@
</map> </map>
</map> </map>
<key>version</key> <key>version</key>
<string>3.2623.1395.g3034273</string> <string>3.2526.1373.gb660893</string>
</map> </map>
<key>llphysicsextensions_stub</key> <key>llphysicsextensions_stub</key>
<map> <map>

View File

@@ -308,11 +308,13 @@ if (STANDALONE)
else (STANDALONE) else (STANDALONE)
set(${ARCH}_linux_INCLUDES set(${ARCH}_linux_INCLUDES
atk-1.0 atk-1.0
cairo
glib-2.0 glib-2.0
gdk-pixbuf-2.0 gdk-pixbuf-2.0
gstreamer-0.10 gstreamer-0.10
gtk-2.0 gtk-2.0
pango-1.0 pango-1.0
pixman-1
) )
endif (STANDALONE) endif (STANDALONE)

View File

@@ -19,7 +19,11 @@ else (STANDALONE)
set(NDOF_LIBRARY ndofdev) set(NDOF_LIBRARY ndofdev)
endif (WINDOWS) endif (WINDOWS)
set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev) if (WINDOWS)
set(NDOF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
else (WINDOWS)
set(NDOF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/ndofdev)
endif (WINDOWS)
set(NDOF_FOUND 1) set(NDOF_FOUND 1)
endif (STANDALONE) endif (STANDALONE)

View File

@@ -58,8 +58,6 @@ else (STANDALONE)
include_directories ( include_directories (
${LIBS_PREBUILT_DIR}/include ${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_DIR}/include/cairo
${LIBS_PREBUILT_DIR}/include/pixman-1
) )
foreach(include ${${LL_ARCH}_INCLUDES}) foreach(include ${${LL_ARCH}_INCLUDES})
include_directories(${LIBS_PREBUILT_DIR}/include/${include}) include_directories(${LIBS_PREBUILT_DIR}/include/${include})

View File

@@ -44,14 +44,6 @@ const char* const BLACKLIST_PROFILE_WEB_URL = "http://secondlife.com/app/webdisa
// Maximum number of avatar picks // Maximum number of avatar picks
const S32 MAX_AVATAR_PICKS = 10; const S32 MAX_AVATAR_PICKS = 10;
// For Flags in AvatarPropertiesReply
const U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not
const U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature"
const U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info
const U32 AVATAR_TRANSACTED = 0x1 << 3; // whether avatar has actively used payment info
const U32 AVATAR_ONLINE = 0x1 << 4; // the online status of this avatar, if known.
const U32 AVATAR_AGEVERIFIED = 0x1 << 5; // whether avatar has been age-verified
char const* const VISIBILITY_DEFAULT = "default"; char const* const VISIBILITY_DEFAULT = "default";
char const* const VISIBILITY_HIDDEN = "hidden"; char const* const VISIBILITY_HIDDEN = "hidden";
char const* const VISIBILITY_VISIBLE = "visible"; char const* const VISIBILITY_VISIBLE = "visible";

View File

@@ -1155,7 +1155,7 @@ bool LLImageTGA::loadFile( const std::string& path )
return false; return false;
} }
S32 file_size = 0; size_t file_size = 0;
if (!fseek(file, 0, SEEK_END)) if (!fseek(file, 0, SEEK_END))
{ {
file_size = ftell(file); file_size = ftell(file);

View File

@@ -48,34 +48,34 @@
#define tanf(x) ((F32)tan((F64)(x))) #define tanf(x) ((F32)tan((F64)(x)))
#endif*/ #endif*/
const F32 GRAVITY = -9.8f; constexpr F32 GRAVITY = -9.8f;
// mathematical constants // mathematical constants
const F32 F_PI = 3.1415926535897932384626433832795f; constexpr F32 F_PI = 3.1415926535897932384626433832795f;
const F32 F_TWO_PI = 6.283185307179586476925286766559f; constexpr F32 F_TWO_PI = 6.283185307179586476925286766559f;
const F32 F_PI_BY_TWO = 1.5707963267948966192313216916398f; constexpr F32 F_PI_BY_TWO = 1.5707963267948966192313216916398f;
const F32 F_SQRT_TWO_PI = 2.506628274631000502415765284811f; constexpr F32 F_SQRT_TWO_PI = 2.506628274631000502415765284811f;
const F32 F_E = 2.71828182845904523536f; constexpr F32 F_E = 2.71828182845904523536f;
const F32 F_SQRT2 = 1.4142135623730950488016887242097f; constexpr F32 F_SQRT2 = 1.4142135623730950488016887242097f;
const F32 F_SQRT3 = 1.73205080756888288657986402541f; constexpr F32 F_SQRT3 = 1.73205080756888288657986402541f;
const F32 OO_SQRT2 = 0.7071067811865475244008443621049f; constexpr F32 OO_SQRT2 = 0.7071067811865475244008443621049f;
const F32 OO_SQRT3 = 0.577350269189625764509f; constexpr F32 OO_SQRT3 = 0.577350269189625764509f;
const F32 DEG_TO_RAD = 0.017453292519943295769236907684886f; constexpr F32 DEG_TO_RAD = 0.017453292519943295769236907684886f;
const F32 RAD_TO_DEG = 57.295779513082320876798154814105f; constexpr F32 RAD_TO_DEG = 57.295779513082320876798154814105f;
const F32 F_APPROXIMATELY_ZERO = 0.00001f; constexpr F32 F_APPROXIMATELY_ZERO = 0.00001f;
const F32 F_LN10 = 2.3025850929940456840179914546844f; constexpr F32 F_LN10 = 2.3025850929940456840179914546844f;
const F32 OO_LN10 = 0.43429448190325182765112891891661f; constexpr F32 OO_LN10 = 0.43429448190325182765112891891661f;
const F32 F_LN2 = 0.69314718056f; constexpr F32 F_LN2 = 0.69314718056f;
const F32 OO_LN2 = 1.4426950408889634073599246810019f; constexpr F32 OO_LN2 = 1.4426950408889634073599246810019f;
const F32 F_ALMOST_ZERO = 0.0001f; constexpr F32 F_ALMOST_ZERO = 0.0001f;
const F32 F_ALMOST_ONE = 1.0f - F_ALMOST_ZERO; constexpr F32 F_ALMOST_ONE = 1.0f - F_ALMOST_ZERO;
const F32 GIMBAL_THRESHOLD = 0.000436f; // sets the gimballock threshold 0.025 away from +/-90 degrees constexpr F32 GIMBAL_THRESHOLD = 0.000436f; // sets the gimballock threshold 0.025 away from +/-90 degrees
// formula: GIMBAL_THRESHOLD = sin(DEG_TO_RAD * gimbal_threshold_angle); // formula: GIMBAL_THRESHOLD = sin(DEG_TO_RAD * gimbal_threshold_angle);
// BUG: Eliminate in favor of F_APPROXIMATELY_ZERO above? // BUG: Eliminate in favor of F_APPROXIMATELY_ZERO above?
const F32 FP_MAG_THRESHOLD = 0.0000001f; constexpr F32 FP_MAG_THRESHOLD = 0.0000001f;
// TODO: Replace with logic like is_approx_equal // TODO: Replace with logic like is_approx_equal
inline bool is_approx_zero( F32 f ) { return (-F_APPROXIMATELY_ZERO < f) && (f < F_APPROXIMATELY_ZERO); } inline bool is_approx_zero( F32 f ) { return (-F_APPROXIMATELY_ZERO < f) && (f < F_APPROXIMATELY_ZERO); }
@@ -112,13 +112,13 @@ inline bool is_zero(F32 x)
inline bool is_approx_equal(F32 x, F32 y) inline bool is_approx_equal(F32 x, F32 y)
{ {
const S32 COMPARE_MANTISSA_UP_TO_BIT = 0x02; constexpr S32 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
return (std::abs((S32) ((U32&)x - (U32&)y) ) < COMPARE_MANTISSA_UP_TO_BIT); return (std::abs((S32) ((U32&)x - (U32&)y) ) < COMPARE_MANTISSA_UP_TO_BIT);
} }
inline bool is_approx_equal(F64 x, F64 y) inline bool is_approx_equal(F64 x, F64 y)
{ {
const S64 COMPARE_MANTISSA_UP_TO_BIT = 0x02; constexpr S64 COMPARE_MANTISSA_UP_TO_BIT = 0x02;
return (std::abs((S32) ((U64&)x - (U64&)y) ) < COMPARE_MANTISSA_UP_TO_BIT); return (std::abs((S32) ((U64&)x - (U64&)y) ) < COMPARE_MANTISSA_UP_TO_BIT);
} }
@@ -195,8 +195,8 @@ inline F64 ll_round(F64 val, F64 nearest)
// peak error = -31.4 dB // peak error = -31.4 dB
// RMS error = -28.1 dB // RMS error = -28.1 dB
const F32 FAST_MAG_ALPHA = 0.960433870103f; constexpr F32 FAST_MAG_ALPHA = 0.960433870103f;
const F32 FAST_MAG_BETA = 0.397824734759f; constexpr F32 FAST_MAG_BETA = 0.397824734759f;
// these provide minimum RMS error // these provide minimum RMS error
// //
@@ -204,8 +204,8 @@ const F32 FAST_MAG_BETA = 0.397824734759f;
// peak error = -32.6 dB // peak error = -32.6 dB
// RMS error = -25.7 dB // RMS error = -25.7 dB
// //
//const F32 FAST_MAG_ALPHA = 0.948059448969f; //constexpr F32 FAST_MAG_ALPHA = 0.948059448969f;
//const F32 FAST_MAG_BETA = 0.392699081699f; //constexpr F32 FAST_MAG_BETA = 0.392699081699f;
inline F32 fastMagnitude(F32 a, F32 b) inline F32 fastMagnitude(F32 a, F32 b)
{ {
@@ -222,8 +222,8 @@ inline F32 fastMagnitude(F32 a, F32 b)
// //
// Culled from www.stereopsis.com/FPU.html // Culled from www.stereopsis.com/FPU.html
const F64 LL_DOUBLE_TO_FIX_MAGIC = 68719476736.0*1.5; //2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor constexpr F64 LL_DOUBLE_TO_FIX_MAGIC = 68719476736.0*1.5; //2^36 * 1.5, (52-_shiftamt=36) uses limited precisicion to floor
const S32 LL_SHIFT_AMOUNT = 16; //16.16 fixed point representation, constexpr S32 LL_SHIFT_AMOUNT = 16; //16.16 fixed point representation,
// Endian dependent code // Endian dependent code
#ifdef LL_LITTLE_ENDIAN #ifdef LL_LITTLE_ENDIAN

View File

@@ -53,8 +53,6 @@
# include "zlib/zlib.h" # include "zlib/zlib.h"
#endif #endif
std::string model_names[] = std::string model_names[] =
{ {
"lowest_lod", "lowest_lod",
@@ -68,7 +66,7 @@ const int MODEL_NAMES_LENGTH = sizeof(model_names) / sizeof(std::string);
LLModel::LLModel(LLVolumeParams& params, F32 detail) LLModel::LLModel(LLVolumeParams& params, F32 detail)
: LLVolume(params, detail), mNormalizedScale(1,1,1), mNormalizedTranslation(0,0,0) : LLVolume(params, detail), mNormalizedScale(1,1,1), mNormalizedTranslation(0,0,0)
, mPelvisOffset( 0.0f ), mStatus(NO_ERRORS) , mPelvisOffset( 0.0f ), mStatus(NO_ERRORS), mSubmodelID(0)
{ {
mDecompID = -1; mDecompID = -1;
mLocalID = -1; mLocalID = -1;
@@ -1909,7 +1907,7 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)
weight_map::iterator best = iter_up; weight_map::iterator best = iter_up;
F32 min_dist = (iter->first - pos).magVec(); F32 min_dist = (iter_up->first - pos).magVec();
bool done = false; bool done = false;
while (!done) while (!done)
@@ -2015,21 +2013,20 @@ bool LLModel::loadModel(std::istream& is)
} }
} }
std::string nm[] = mSubmodelID = header.has("submodel_id") ? header["submodel_id"].asInteger() : false;
{
static const std::array<std::string, 5> lod_name = {{
"lowest_lod", "lowest_lod",
"low_lod", "low_lod",
"medium_lod", "medium_lod",
"high_lod", "high_lod",
"physics_mesh", "physics_mesh",
}; }};
const S32 MODEL_LODS = 5; S32 lod = llclamp((S32) mDetail, 0, (S32)lod_name.size() - 1);
S32 lod = llclamp((S32) mDetail, 0, MODEL_LODS); if (header[lod_name[lod]]["offset"].asInteger() == -1 ||
header[lod_name[lod]]["size"].asInteger() == 0 )
if (header[nm[lod]]["offset"].asInteger() == -1 ||
header[nm[lod]]["size"].asInteger() == 0 )
{ //cannot load requested LOD { //cannot load requested LOD
LL_WARNS() << "LoD data is invalid!" << LL_ENDL; LL_WARNS() << "LoD data is invalid!" << LL_ENDL;
return false; return false;
@@ -2038,23 +2035,23 @@ bool LLModel::loadModel(std::istream& is)
bool has_skin = header["skin"]["offset"].asInteger() >=0 && bool has_skin = header["skin"]["offset"].asInteger() >=0 &&
header["skin"]["size"].asInteger() > 0; header["skin"]["size"].asInteger() > 0;
if (lod == LLModel::LOD_HIGH) if ((lod == LLModel::LOD_HIGH) && !mSubmodelID)
{ //try to load skin info and decomp info { //try to load skin info and decomp info
std::ios::pos_type cur_pos = is.tellg(); std::ios::pos_type cur_pos = is.tellg();
loadSkinInfo(header, is); loadSkinInfo(header, is);
is.seekg(cur_pos); is.seekg(cur_pos);
} }
if (lod == LLModel::LOD_HIGH || lod == LLModel::LOD_PHYSICS) if ((lod == LLModel::LOD_HIGH || lod == LLModel::LOD_PHYSICS) && !mSubmodelID)
{ {
std::ios::pos_type cur_pos = is.tellg(); std::ios::pos_type cur_pos = is.tellg();
loadDecomposition(header, is); loadDecomposition(header, is);
is.seekg(cur_pos); is.seekg(cur_pos);
} }
is.seekg(header[nm[lod]]["offset"].asInteger(), std::ios_base::cur); is.seekg(header[lod_name[lod]]["offset"].asInteger(), std::ios_base::cur);
if (unpackVolumeFaces(is, header[nm[lod]]["size"].asInteger())) if (unpackVolumeFaces(is, header[lod_name[lod]]["size"].asInteger()))
{ {
if (has_skin) if (has_skin)
{ {
@@ -2112,7 +2109,7 @@ bool LLModel::isMaterialListSubset( LLModel* ref )
for (S32 dst = 0; dst < refCnt; ++dst) for (S32 dst = 0; dst < refCnt; ++dst)
{ {
//LL_INFOS() <<mMaterialList[src]<<" "<<ref->mMaterialList[dst]<<LL_ENDL; //LL_INFOS()<<mMaterialList[src]<<" "<<ref->mMaterialList[dst]<<LL_ENDL;
foundRef = mMaterialList[src] == ref->mMaterialList[dst]; foundRef = mMaterialList[src] == ref->mMaterialList[dst];
if ( foundRef ) if ( foundRef )
@@ -2120,8 +2117,10 @@ bool LLModel::isMaterialListSubset( LLModel* ref )
break; break;
} }
} }
if (!foundRef) if (!foundRef)
{ {
LL_INFOS() << "Could not find material " << mMaterialList[src] << " in reference model " << ref->mLabel << LL_ENDL;
return false; return false;
} }
} }
@@ -2157,7 +2156,7 @@ bool LLModel::matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCn
bool isASubset = isMaterialListSubset( ref ); bool isASubset = isMaterialListSubset( ref );
if ( !isASubset ) if ( !isASubset )
{ {
LL_INFOS() <<"Material of model is not a subset of reference."<<LL_ENDL; LL_INFOS()<<"Material of model is not a subset of reference."<<LL_ENDL;
return false; return false;
} }
@@ -2172,41 +2171,42 @@ bool LLModel::matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCn
for (U32 i = 0; i < mMaterialList.size(); i++) for (U32 i = 0; i < mMaterialList.size(); i++)
{ {
index_map[ref->mMaterialList[i]] = i; index_map[ref->mMaterialList[i]] = i;
if (!reorder) //if any material name does not match reference, we need to reorder
{ //if any material name does not match reference, we need to reorder reorder |= ref->mMaterialList[i] != mMaterialList[i];
reorder = ref->mMaterialList[i] != mMaterialList[i];
}
base_mat.insert(ref->mMaterialList[i]); base_mat.insert(ref->mMaterialList[i]);
cur_mat.insert(mMaterialList[i]); cur_mat.insert(mMaterialList[i]);
} }
if (reorder && if (reorder && (base_mat == cur_mat)) //don't reorder if material name sets don't match
base_mat == cur_mat) //don't reorder if material name sets don't match
{ {
std::vector<LLVolumeFace> new_face_list; std::vector<LLVolumeFace> new_face_list;
new_face_list.resize(mVolumeFaces.size()); new_face_list.resize(mMaterialList.size());
std::vector<std::string> new_material_list; std::vector<std::string> new_material_list;
new_material_list.resize(mVolumeFaces.size()); new_material_list.resize(mMaterialList.size());
//rebuild face list so materials have the same order //rebuild face list so materials have the same order
//as the reference model //as the reference model
for (U32 i = 0; i < mMaterialList.size(); ++i) for (U32 i = 0; i < mMaterialList.size(); ++i)
{ {
U32 ref_idx = index_map[mMaterialList[i]]; U32 ref_idx = index_map[mMaterialList[i]];
new_face_list[ref_idx] = mVolumeFaces[i];
if (i < mVolumeFaces.size())
{
new_face_list[ref_idx] = mVolumeFaces[i];
}
new_material_list[ref_idx] = mMaterialList[i]; new_material_list[ref_idx] = mMaterialList[i];
} }
llassert(new_material_list == ref->mMaterialList); llassert(new_material_list == ref->mMaterialList);
mVolumeFaces = new_face_list; mVolumeFaces = new_face_list;
//override material list with reference model ordering
mMaterialList = ref->mMaterialList;
} }
//override material list with reference model ordering
mMaterialList = ref->mMaterialList;
return true; return true;
} }
@@ -2237,7 +2237,7 @@ bool LLModel::loadDecomposition(LLSD& header, std::istream& is)
S32 offset = header["physics_convex"]["offset"].asInteger(); S32 offset = header["physics_convex"]["offset"].asInteger();
S32 size = header["physics_convex"]["size"].asInteger(); S32 size = header["physics_convex"]["size"].asInteger();
if (offset >= 0 && size > 0) if (offset >= 0 && size > 0 && !mSubmodelID)
{ {
is.seekg(offset, std::ios_base::cur); is.seekg(offset, std::ios_base::cur);

View File

@@ -181,7 +181,11 @@ public:
bool isMaterialListSubset( LLModel* ref ); bool isMaterialListSubset( LLModel* ref );
bool needToAddFaces( LLModel* ref, int& refFaceCnt, int& modelFaceCnt ); bool needToAddFaces( LLModel* ref, int& refFaceCnt, int& modelFaceCnt );
std::vector<std::string> mMaterialList; typedef std::vector<std::string> material_list;
material_list mMaterialList;
material_list& getMaterialList() { return mMaterialList; }
//data used for skin weights //data used for skin weights
class JointWeight class JointWeight
@@ -274,6 +278,8 @@ public:
Decomposition mPhysics; Decomposition mPhysics;
EModelStatus mStatus ; EModelStatus mStatus ;
int mSubmodelID;
protected: protected:
void addVolumeFacesFromDomMesh(domMesh* mesh); void addVolumeFacesFromDomMesh(domMesh* mesh);
virtual BOOL createVolumeFacesFromDomMesh(domMesh *mesh); virtual BOOL createVolumeFacesFromDomMesh(domMesh *mesh);

View File

@@ -371,7 +371,7 @@ void LLView::removeChild(LLView* child)
// if we are removing an item we are currently iterating over, that would be bad // if we are removing an item we are currently iterating over, that would be bad
llassert(child->mInDraw == false); llassert(child->mInDraw == false);
mChildList.remove( child ); mChildList.remove( child );
for(boost::unordered_map<const std::string, LLView*>::iterator it=mChildHashMap.begin(); it != mChildHashMap.end(); ++it) for(boost::container::flat_map<std::string, LLView*>::iterator it=mChildHashMap.begin(); it != mChildHashMap.end(); ++it)
{ {
if(it->second == child) if(it->second == child)
{ {
@@ -1618,7 +1618,7 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse, BOOL create_
return childp; return childp;
} }
}*/ }*/
boost::unordered_map<const std::string, LLView*>::const_iterator it = mChildHashMap.find(name); boost::container::flat_map<std::string, LLView*>::const_iterator it = mChildHashMap.find(name);
if(it != mChildHashMap.end()) if(it != mChildHashMap.end())
{ {
return it->second; return it->second;

View File

@@ -57,7 +57,7 @@
#include "llinitparam.h" #include "llinitparam.h"
#include "lltreeiterators.h" #include "lltreeiterators.h"
#include "llfocusmgr.h" #include "llfocusmgr.h"
#include <boost/unordered_map.hpp> #include <boost/container/flat_map.hpp> // <alchemy/>
#include "ailist.h" #include "ailist.h"
const U32 FOLLOWS_NONE = 0x00; const U32 FOLLOWS_NONE = 0x00;
@@ -518,7 +518,7 @@ public:
const child_list_t* getChildList() const { return &mChildList; } const child_list_t* getChildList() const { return &mChildList; }
child_list_const_iter_t beginChild() const { return mChildList.begin(); } child_list_const_iter_t beginChild() const { return mChildList.begin(); }
child_list_const_iter_t endChild() const { return mChildList.end(); } child_list_const_iter_t endChild() const { return mChildList.end(); }
boost::unordered_map<const std::string, LLView*> mChildHashMap; boost::container::flat_map<std::string, LLView*> mChildHashMap; // <alchemy/>
// LLMouseHandler functions // LLMouseHandler functions
// Default behavior is to pass events to children // Default behavior is to pass events to children

View File

@@ -1353,9 +1353,9 @@ struct ScopedFile
{ {
if (!isOpen()) return 0; if (!isOpen()) return 0;
S32 cur_pos = ftell(mFile); size_t cur_pos = ftell(mFile);
fseek(mFile, 0L, SEEK_END); fseek(mFile, 0L, SEEK_END);
S32 file_size = ftell(mFile); size_t file_size = ftell(mFile);
fseek(mFile, cur_pos, SEEK_SET); fseek(mFile, cur_pos, SEEK_SET);
return file_size - cur_pos; return file_size - cur_pos;
} }

View File

@@ -756,7 +756,7 @@ bool LLXMLNode::parseFile(const std::string& filename, LLXMLNodePtr& node, LLXML
return false; return false;
} }
fseek(fp, 0, SEEK_END); fseek(fp, 0, SEEK_END);
U32 length = ftell(fp); size_t length = ftell(fp);
fseek(fp, 0, SEEK_SET); fseek(fp, 0, SEEK_SET);
U8* buffer = new U8[length+1]; U8* buffer = new U8[length+1];

View File

@@ -89,7 +89,7 @@ BOOL LLXmlParser::parseFile(const std::string &path)
S32 bytes_read = 0; S32 bytes_read = 0;
fseek(file, 0L, SEEK_END); fseek(file, 0L, SEEK_END);
S32 buffer_size = ftell(file); size_t buffer_size = ftell(file);
fseek(file, 0L, SEEK_SET); fseek(file, 0L, SEEK_SET);
void* buffer = XML_GetBuffer(mParser, buffer_size); void* buffer = XML_GetBuffer(mParser, buffer_size);

View File

@@ -430,7 +430,8 @@ LLAgent::LLAgent() :
mMouselookModeInSignal(NULL), mMouselookModeInSignal(NULL),
mMouselookModeOutSignal(NULL), mMouselookModeOutSignal(NULL),
mPendingLure(NULL) mPendingLure(NULL),
mFriendObserver(nullptr)
{ {
for (U32 i = 0; i < TOTAL_CONTROLS; i++) for (U32 i = 0; i < TOTAL_CONTROLS; i++)
{ {

View File

@@ -267,21 +267,16 @@ void LLInitialWearablesFetch::processWearablesMessage()
for (U8 i = 0; i < mAgentInitialWearables.size(); ++i) for (U8 i = 0; i < mAgentInitialWearables.size(); ++i)
{ {
// Populate the current outfit folder with links to the wearables passed in the message // Populate the current outfit folder with links to the wearables passed in the message
// InitialWearableData *wearable_data = new InitialWearableData(mAgentInitialWearables[i]); // This will be deleted in the callback. const InitialWearableData& wearable_data = mAgentInitialWearables[i];
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-05-02 (Catznip-3.0.0a) | Added: Catznip-2.0.0f
// Fixes minor leak: since COF is used onInitialWearableAssetArrived() will never get called and "wearable_data" leaks
InitialWearableData* wearable_data = &mAgentInitialWearables[i];
// [/SL:KB]
if (wearable_data->mAssetID.notNull()) if (wearable_data.mAssetID.notNull())
{ {
ids.push_back(wearable_data->mItemID); ids.push_back(wearable_data.mItemID);
} }
else else
{ {
LL_INFOS() << "Invalid wearable, type " << wearable_data->mType << " itemID " LL_INFOS() << "Invalid wearable, type " << wearable_data.mType << " itemID "
<< wearable_data->mItemID << " assetID " << wearable_data->mAssetID << LL_ENDL; << wearable_data.mItemID << " assetID " << wearable_data.mAssetID << LL_ENDL;
// delete wearable_data;
} }
} }

View File

@@ -3347,16 +3347,16 @@ bool LLAppViewer::initCache()
// Init the texture cache // Init the texture cache
// Allocate 80% of the cache size for textures // Allocate 80% of the cache size for textures
const S32 MB = 1024 * 1024; const U32 MB = 1024 * 1024;
const S64 MIN_CACHE_SIZE = 64 * MB; const U64 MIN_CACHE_SIZE = 64 * MB;
const S64 MAX_CACHE_SIZE = 9984ll * MB; const U64 MAX_CACHE_SIZE = 9984ll * MB;
const S64 MAX_VFS_SIZE = 1024 * MB; // 1 GB const U64 MAX_VFS_SIZE = 1024 * MB; // 1 GB
S64 cache_size = (S64)(gSavedSettings.getU32("CacheSize")) * MB; U64 cache_size = (U64)(gSavedSettings.getU32("CacheSize")) * MB;
cache_size = llclamp(cache_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE); cache_size = llclamp(cache_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE);
S64 texture_cache_size = ((cache_size * 8) / 10); U64 texture_cache_size = ((cache_size * 8) / 10);
S64 vfs_size = cache_size - texture_cache_size; U64 vfs_size = cache_size - texture_cache_size;
if (vfs_size > MAX_VFS_SIZE) if (vfs_size > MAX_VFS_SIZE)
{ {
@@ -3366,7 +3366,7 @@ bool LLAppViewer::initCache()
texture_cache_size = cache_size - MAX_VFS_SIZE; texture_cache_size = cache_size - MAX_VFS_SIZE;
} }
S64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch); U64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch);
texture_cache_size -= extra; texture_cache_size -= extra;
LLVOCache::getInstance()->initCache(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion()) ; LLVOCache::getInstance()->initCache(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion()) ;

View File

@@ -33,6 +33,14 @@
#include <list> #include <list>
#include <map> #include <map>
// For Flags in AvatarPropertiesReply
constexpr U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not
constexpr U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature"
constexpr U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info
constexpr U32 AVATAR_TRANSACTED = 0x1 << 3; // whether avatar has actively used payment info
constexpr U32 AVATAR_ONLINE = 0x1 << 4; // the online status of this avatar, if known.
constexpr U32 AVATAR_AGEVERIFIED = 0x1 << 5; // whether avatar has been age-verified
/* /*
*TODO Vadim: This needs some refactoring: *TODO Vadim: This needs some refactoring:
- Remove EAvatarProcessorType in favor of separate observers, derived from a common parent (to get rid of void*). - Remove EAvatarProcessorType in favor of separate observers, derived from a common parent (to get rid of void*).

View File

@@ -96,7 +96,11 @@ LLFloaterScriptQueue::LLFloaterScriptQueue(const std::string& name,
const std::string& start_string) : const std::string& start_string) :
LLFloater(name, rect, title, LLFloater(name, rect, title,
RESIZE_YES, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, RESIZE_YES, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT,
DRAG_ON_TOP, MINIMIZE_YES, CLOSE_YES) DRAG_ON_TOP, MINIMIZE_YES, CLOSE_YES),
mMessages(nullptr),
mCloseBtn(nullptr),
mDone(false),
mMono(false)
{ {
mID.generate(); mID.generate();
@@ -111,7 +115,6 @@ LLFloaterScriptQueue::LLFloaterScriptQueue(const std::string& name,
translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop); translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
mStartString = start_string; mStartString = start_string;
mDone = FALSE;
sInstances.addData(mID, this); sInstances.addData(mID, this);
} }

View File

@@ -61,7 +61,7 @@ class LLVOVolume;
class LLViewerTexture; class LLViewerTexture;
// Can have multiple silhouettes for each object // Can have multiple silhouettes for each object
const U32 SILHOUETTE_HIGHLIGHT = 0; constexpr U32 SILHOUETTE_HIGHLIGHT = 0;
// All data for new renderer goes into this class. // All data for new renderer goes into this class.
LL_ALIGN_PREFIX(16) LL_ALIGN_PREFIX(16)

View File

@@ -42,7 +42,7 @@ class LLMeshSkinInfo;
class LLVolume; class LLVolume;
class LLVolumeFace; class LLVolumeFace;
const U32 JOINT_COUNT = 52; constexpr U32 JOINT_COUNT = 52;
class LLDrawPoolAvatar : public LLFacePool class LLDrawPoolAvatar : public LLFacePool
{ {

View File

@@ -46,6 +46,10 @@ LLFloaterAvatarTextures::LLFloaterAvatarTextures(const LLUUID& id) :
LLFloater(std::string("avatar_texture_debug")), LLFloater(std::string("avatar_texture_debug")),
mID(id) mID(id)
{ {
for (U32 i = 0; i < TEX_NUM_INDICES; i++)
{
mTextures[i] = nullptr;
}
} }
LLFloaterAvatarTextures::~LLFloaterAvatarTextures() LLFloaterAvatarTextures::~LLFloaterAvatarTextures()

View File

@@ -157,7 +157,8 @@ private:
{ {
TransactionPreflight, TransactionPreflight,
TransactionCurrency, TransactionCurrency,
TransactionBuy TransactionBuy,
TransactionNone
}; };
boost::intrusive_ptr<XMLRPCResponder> mResponder; boost::intrusive_ptr<XMLRPCResponder> mResponder;
TransactionType mTransactionType; TransactionType mTransactionType;
@@ -281,11 +282,34 @@ void LLFloaterBuyLand::updateEstateOwnerName(const std::string& name)
LLFloaterBuyLandUI::LLFloaterBuyLandUI() LLFloaterBuyLandUI::LLFloaterBuyLandUI()
: LLFloater(std::string("Buy Land")), : LLFloater(std::string("Buy Land")),
mParcelSelectionObserver(this), mParcelSelectionObserver(this),
mRegion(nullptr),
mParcel(0), mParcel(0),
mIsClaim(false),
mIsForGroup(false),
mCanBuy(false),
mCannotBuyIsError(false),
mBought(false), mBought(false),
mParcelValid(false), mSiteValid(false), mAgentCommittedTier(0),
mChildren(*this), mCurrency(*this), mAgentHasNeverOwnedLand(true),
mParcelBuyInfo(0) mParcelValid(false),
mParcelIsForSale(false),
mParcelIsGroupLand(false),
mParcelGroupContribution(0),
mParcelPrice(0),
mParcelActualArea(0),
mParcelBillableArea(0),
mParcelSupportedObjects(0),
mParcelSoldWithObjects(false),
mUserPlanChoice(0),
mSiteValid(false),
mSiteMembershipUpgrade(false),
mSiteLandUseUpgrade(false),
mPreflightAskBillableArea(0),
mPreflightAskCurrencyBuy(0),
mChildren(*this),
mCurrency(*this),
mParcelBuyInfo(nullptr),
mTransactionType(TransactionNone)
{ {
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_land.xml"); LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_land.xml");
LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver); LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver);
@@ -347,8 +371,6 @@ void LLFloaterBuyLandUI::updateParcelInfo()
mParcelSnapshot.setNull(); mParcelSnapshot.setNull();
mParcelSellerName = ""; mParcelSellerName = "";
mCanBuy = false;
mCannotBuyIsError = false;
if (!mParcelValid) if (!mParcelValid)
{ {

View File

@@ -144,14 +144,13 @@ std::string STATUS[] =
// LLFloaterBvhPreview() // LLFloaterBvhPreview()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLFloaterBvhPreview::LLFloaterBvhPreview(const std::string& filename, void* item) : LLFloaterBvhPreview::LLFloaterBvhPreview(const std::string& filename, void* item) :
LLFloaterNameDesc(filename, item) LLFloaterNameDesc(filename, item),
mItem(item), //<edit/>
mLastMouseX(0),
mLastMouseY(0),
mPlayButton(nullptr),
mStopButton(nullptr)
{ {
//<edit>
mItem = item;
//<edit>
mLastMouseX = 0;
mLastMouseY = 0;
mIDList["Standing"] = ANIM_AGENT_STAND; mIDList["Standing"] = ANIM_AGENT_STAND;
mIDList["Walking"] = ANIM_AGENT_FEMALE_WALK; mIDList["Walking"] = ANIM_AGENT_FEMALE_WALK;
mIDList["Sitting"] = ANIM_AGENT_SIT_FEMALE; mIDList["Sitting"] = ANIM_AGENT_SIT_FEMALE;

View File

@@ -51,6 +51,9 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f;
LLFloaterCamera::LLFloaterCamera(const LLSD& val) LLFloaterCamera::LLFloaterCamera(const LLSD& val)
: LLFloater("camera floater") // uses "FloaterCameraRect3" : LLFloater("camera floater") // uses "FloaterCameraRect3"
mRotate(nullptr),
mZoom(nullptr),
mTrack(nullptr)
{ {
setIsChrome(TRUE); setIsChrome(TRUE);

View File

@@ -78,6 +78,15 @@ const F32 CONTEXT_FADE_TIME = 0.08f;
LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate ) LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate )
: LLFloater (std::string("Color Picker Floater")), : LLFloater (std::string("Color Picker Floater")),
origR(1.f),
origG(1.f),
origB(1.f),
curR(1.f),
curG(1.f),
curB(1.f),
curH(0.f),
curS(0.f),
curL(1.f),
mComponents ( 3 ), mComponents ( 3 ),
mMouseDownInLumRegion ( FALSE ), mMouseDownInLumRegion ( FALSE ),
mMouseDownInHueRegion ( FALSE ), mMouseDownInHueRegion ( FALSE ),
@@ -108,7 +117,11 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show
mPaletteRegionHeight ( 40 ), mPaletteRegionHeight ( 40 ),
mSwatch ( swatch ), mSwatch ( swatch ),
mActive ( TRUE ), mActive ( TRUE ),
mApplyImmediateCheck(nullptr),
mCanApplyImmediately ( show_apply_immediate ), mCanApplyImmediately ( show_apply_immediate ),
mSelectBtn(nullptr),
mCancelBtn(nullptr),
mPipetteBtn(nullptr),
mContextConeOpacity ( 0.f ) mContextConeOpacity ( 0.f )
{ {
// build the majority of the gui using the factory builder // build the majority of the gui using the factory builder

View File

@@ -118,6 +118,8 @@ void LLFloaterGodTools::refreshAll()
LLFloaterGodTools::LLFloaterGodTools() LLFloaterGodTools::LLFloaterGodTools()
: LLFloater(std::string("godtools floater")), : LLFloater(std::string("godtools floater")),
mPanelRegionTools(nullptr),
mPanelObjectTools(nullptr),
mCurrentHost(LLHost::invalid), mCurrentHost(LLHost::invalid),
mUpdateTimer() mUpdateTimer()
{ {

View File

@@ -54,6 +54,7 @@
LLFloaterInspect::LLFloaterInspect(const LLSD&) LLFloaterInspect::LLFloaterInspect(const LLSD&)
: LLFloater(std::string("Inspect Object")), : LLFloater(std::string("Inspect Object")),
mObjectList(nullptr),
mDirty(FALSE) mDirty(FALSE)
{ {
mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this)); mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this));

View File

@@ -49,6 +49,9 @@
LLFloaterJoystick::LLFloaterJoystick(const LLSD& data) LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
: LLFloater("floater_joystick") : LLFloater("floater_joystick")
, mCheckJoystickEnabled(nullptr)
, mCheckFlycamEnabled(nullptr)
, mAxisStatsBar({ {nullptr,nullptr,nullptr,nullptr,nullptr,nullptr} })
{ {
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_joystick.xml"); LLUICtrlFactory::getInstance()->buildFloater(this, "floater_joystick.xml");
center(); center();

View File

@@ -85,7 +85,7 @@ private:
// stats view // stats view
LLStatView* mAxisStatsView; LLStatView* mAxisStatsView;
LLStat* mAxisStats[6]; LLStat* mAxisStats[6];
LLStatBar* mAxisStatsBar[6]; std::array<LLStatBar*, 6> mAxisStatsBar;
}; };
#endif #endif

View File

@@ -235,7 +235,15 @@ void LLFloaterLand::onClose(bool app_quitting)
LLFloaterLand::LLFloaterLand(const LLSD& seed) LLFloaterLand::LLFloaterLand(const LLSD& seed)
: LLFloater(std::string("floaterland"), std::string("FloaterLandRect5"), std::string("About Land")) : LLFloater(std::string("floaterland"), std::string("FloaterLandRect5"), std::string("About Land"))
, mTabLand(nullptr)
, mPanelGeneral(nullptr)
, mPanelObjects(nullptr)
, mPanelOptions(nullptr)
, mPanelMedia(nullptr)
, mPanelAccess(nullptr)
, mPanelCovenant(nullptr)
, mPanelExperiences(nullptr)
{ {
mFactoryMap["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this); mFactoryMap["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this);
mFactoryMap["land_covenant_panel"] = LLCallbackMap(createPanelLandCovenant, this); mFactoryMap["land_covenant_panel"] = LLCallbackMap(createPanelLandCovenant, this);
@@ -354,9 +362,38 @@ void* LLFloaterLand::createPanelLandAccess(void* data)
LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel) LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel)
: LLPanel(std::string("land_general_panel")), : LLPanel(std::string("land_general_panel"))
mUncheckedSell(FALSE), , mEditName(nullptr)
mParcel(parcel) , mEditDesc(nullptr)
, mTextSalePending(nullptr)
, mBtnDeedToGroup(nullptr)
, mBtnSetGroup(nullptr)
, mTextOwner(nullptr)
, mBtnProfile(nullptr)
, mContentRating(nullptr)
, mLandType(nullptr)
, mTextGroup(nullptr)
, mTextClaimDate(nullptr)
, mTextPriceLabel(nullptr)
, mTextPrice(nullptr)
, mCheckDeedToGroup(nullptr)
, mCheckContributeWithDeed(nullptr)
, mSaleInfoForSale1(nullptr)
, mSaleInfoForSale2(nullptr)
, mSaleInfoForSaleObjects(nullptr)
, mSaleInfoForSaleNoObjects(nullptr)
, mSaleInfoNotForSale(nullptr)
, mBtnSellLand(nullptr)
, mBtnStopSellLand(nullptr)
, mTextDwell(nullptr)
, mBtnBuyLand(nullptr)
, mBtnScriptLimits(nullptr)
, mBtnBuyGroupLand(nullptr)
, mBtnReleaseLand(nullptr)
, mBtnReclaimLand(nullptr)
, mBtnBuyPass(nullptr)
, mBtnStartAuction(nullptr)
, mParcel(parcel)
{ {
} }
@@ -374,7 +411,6 @@ BOOL LLPanelLandGeneral::postBuild()
// preserve that ability. // preserve that ability.
mTextSalePending = getChild<LLTextBox>("SalePending"); mTextSalePending = getChild<LLTextBox>("SalePending");
mTextOwnerLabel = getChild<LLTextBox>("Owner:");
mTextOwner = getChild<LLTextBox>("OwnerText"); mTextOwner = getChild<LLTextBox>("OwnerText");
mContentRating = getChild<LLTextBox>("ContentRatingText"); mContentRating = getChild<LLTextBox>("ContentRatingText");
@@ -384,7 +420,6 @@ BOOL LLPanelLandGeneral::postBuild()
mBtnProfile->setClickedCallback(boost::bind(&LLPanelLandGeneral::onClickProfile, this)); mBtnProfile->setClickedCallback(boost::bind(&LLPanelLandGeneral::onClickProfile, this));
mTextGroupLabel = getChild<LLTextBox>("Group:");
mTextGroup = getChild<LLTextBox>("GroupText"); mTextGroup = getChild<LLTextBox>("GroupText");
@@ -425,7 +460,6 @@ BOOL LLPanelLandGeneral::postBuild()
mBtnStopSellLand->setClickedCallback(onClickStopSellLand, this); mBtnStopSellLand->setClickedCallback(onClickStopSellLand, this);
mTextClaimDateLabel = getChild<LLTextBox>("Claimed:");
mTextClaimDate = getChild<LLTextBox>("DateClaimText"); mTextClaimDate = getChild<LLTextBox>("DateClaimText");
@@ -2412,8 +2446,10 @@ void LLPanelLandOptions::onClickPublishHelp(void*)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
LLPanelLandAccess::LLPanelLandAccess(LLParcelSelectionHandle& parcel) LLPanelLandAccess::LLPanelLandAccess(LLParcelSelectionHandle& parcel)
: LLPanel(std::string("land_access_panel")), : LLPanel(std::string("land_access_panel"))
mParcel(parcel) , mListAccess(nullptr)
, mListBanned(nullptr)
, mParcel(parcel)
{ {
} }

View File

@@ -183,11 +183,7 @@ public:
virtual BOOL postBuild(); virtual BOOL postBuild();
protected: protected:
BOOL mUncheckedSell; // True only when verifying land information when land is for sale on sale info change
LLTextBox* mLabelName;
LLLineEditor* mEditName; LLLineEditor* mEditName;
LLTextBox* mLabelDesc;
LLTextEditor* mEditDesc; LLTextEditor* mEditDesc;
LLTextBox* mTextSalePending; LLTextBox* mTextSalePending;
@@ -195,7 +191,6 @@ protected:
LLButton* mBtnDeedToGroup; LLButton* mBtnDeedToGroup;
LLButton* mBtnSetGroup; LLButton* mBtnSetGroup;
LLTextBox* mTextOwnerLabel;
LLTextBox* mTextOwner; LLTextBox* mTextOwner;
LLButton* mBtnProfile; LLButton* mBtnProfile;
@@ -203,8 +198,6 @@ protected:
LLTextBox* mLandType; LLTextBox* mLandType;
LLTextBox* mTextGroup; LLTextBox* mTextGroup;
LLTextBox* mTextGroupLabel;
LLTextBox* mTextClaimDateLabel;
LLTextBox* mTextClaimDate; LLTextBox* mTextClaimDate;
LLTextBox* mTextPriceLabel; LLTextBox* mTextPriceLabel;

View File

@@ -43,10 +43,13 @@ LLFloaterMediaSettings* LLFloaterMediaSettings::sInstance = NULL;
// //
LLFloaterMediaSettings::LLFloaterMediaSettings(const LLSD& key) LLFloaterMediaSettings::LLFloaterMediaSettings(const LLSD& key)
: LLFloater(key), : LLFloater(key),
mTabContainer(NULL), mOKBtn(nullptr),
mPanelMediaSettingsGeneral(NULL), mCancelBtn(nullptr),
mPanelMediaSettingsSecurity(NULL), mApplyBtn(nullptr),
mPanelMediaSettingsPermissions(NULL), mTabContainer(nullptr),
mPanelMediaSettingsGeneral(nullptr),
mPanelMediaSettingsSecurity(nullptr),
mPanelMediaSettingsPermissions(nullptr),
mWaitingToClose( false ), mWaitingToClose( false ),
mIdenticalHasMediaInfo( true ), mIdenticalHasMediaInfo( true ),
mMultipleMedia(false), mMultipleMedia(false),

View File

@@ -4177,17 +4177,17 @@ void LLModelPreview::updateStatusMessages()
{ {
for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance) for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance)
{ {
LLModel* model = instance->mModel; LLModel* lod_model = instance->mModel;
if (model) if (lod_model)
{ {
//for each model in the lod //for each model in the lod
S32 cur_tris = 0; S32 cur_tris = 0;
S32 cur_verts = 0; S32 cur_verts = 0;
S32 cur_submeshes = model->getNumVolumeFaces(); S32 cur_submeshes = lod_model->getNumVolumeFaces();
for (S32 j = 0; j < cur_submeshes; ++j) for (S32 j = 0; j < cur_submeshes; ++j)
{ //for each submesh (face), add triangles and vertices to current total { //for each submesh (face), add triangles and vertices to current total
const LLVolumeFace& face = model->getVolumeFace(j); const LLVolumeFace& face = lod_model->getVolumeFace(j);
cur_tris += face.mNumIndices/3; cur_tris += face.mNumIndices/3;
cur_verts += face.mNumVertices; cur_verts += face.mNumVertices;
} }
@@ -4202,6 +4202,11 @@ void LLModelPreview::updateStatusMessages()
verts[lod].push_back(cur_verts); verts[lod].push_back(cur_verts);
submeshes[lod].push_back(cur_submeshes); submeshes[lod].push_back(cur_submeshes);
} }
else // !lod_model
{
setLoadState( LLModelLoader::ERROR_MATERIALS );
mFMP->childDisable( "calculate_btn" );
}
} }
} }
} }

View File

@@ -77,6 +77,7 @@ LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& pSeed)
mFilterByDescription(NULL), mFilterByDescription(NULL),
mFilterByLinksetUse(NULL), mFilterByLinksetUse(NULL),
mEditLinksetUse(NULL), mEditLinksetUse(NULL),
mEditLinksetUseUnset(nullptr),
mEditLinksetUseWalkable(NULL), mEditLinksetUseWalkable(NULL),
mEditLinksetUseStaticObstacle(NULL), mEditLinksetUseStaticObstacle(NULL),
mEditLinksetUseDynamicObstacle(NULL), mEditLinksetUseDynamicObstacle(NULL),

View File

@@ -204,6 +204,9 @@ LLUUID LLFloaterRegionInfo::sRequestInvoice;
LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed) LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed)
: LLFloater()
, mTab(nullptr)
, mInfoPanels()
{ {
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", NULL, FALSE); LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", NULL, FALSE);
} }
@@ -2463,8 +2466,13 @@ bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& re
} }
LLPanelEstateCovenant::LLPanelEstateCovenant() LLPanelEstateCovenant::LLPanelEstateCovenant()
: : LLPanelRegionInfo()
mCovenantID(LLUUID::null) , mEstateNameText(nullptr)
, mEstateOwnerText(nullptr)
, mLastModifiedText(nullptr)
, mCovenantID(LLUUID::null)
, mEditor(nullptr)
, mAssetStatus(ASSET_ERROR)
{ {
} }

View File

@@ -48,9 +48,9 @@ class LLMeanCollisionData;
struct LLResourceData; struct LLResourceData;
// these flags are used to label info requests to the server // these flags are used to label info requests to the server
//const U32 BUG_REPORT_REQUEST = 0x01 << 0; // DEPRECATED //constexpr U32 BUG_REPORT_REQUEST = 0x01 << 0; // DEPRECATED
const U32 COMPLAINT_REPORT_REQUEST = 0x01 << 1; constexpr U32 COMPLAINT_REPORT_REQUEST = 0x01 << 1;
const U32 OBJECT_PAY_REQUEST = 0x01 << 2; constexpr U32 OBJECT_PAY_REQUEST = 0x01 << 2;
// ************************************************************ // ************************************************************

View File

@@ -162,7 +162,8 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput()
} }
LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLUUID& object_id) LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLUUID& object_id)
: LLFloater(std::string("script instance floater"), LLRect(0, 200, 200, 0), std::string("Script"), TRUE), mObjectID(object_id) : LLFloater(std::string("script instance floater"), LLRect(0, 200, 200, 0), std::string("Script"), TRUE), mObjectID(object_id),
mHistoryEditor(nullptr)
{ {
S32 y = getRect().getHeight() - LLFLOATER_HEADER_SIZE - LLFLOATER_VPAD; S32 y = getRect().getHeight() - LLFLOATER_HEADER_SIZE - LLFLOATER_VPAD;
S32 x = LLFLOATER_HPAD; S32 x = LLFLOATER_HPAD;

View File

@@ -84,6 +84,8 @@ const S32 SIZE_OF_ONE_KB = 1024;
LLFloaterScriptLimits::LLFloaterScriptLimits(const LLSD& seed) LLFloaterScriptLimits::LLFloaterScriptLimits(const LLSD& seed)
: LLFloater(/*seed*/) : LLFloater(/*seed*/)
, mTab(nullptr)
, mInfoPanels()
{ {
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_limits.xml"); LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_limits.xml");
} }

View File

@@ -55,6 +55,7 @@ LLFloaterSettingsDebug::LLFloaterSettingsDebug()
, mCurrentControlVariable(NULL) , mCurrentControlVariable(NULL)
, mOldControlVariable(NULL) , mOldControlVariable(NULL)
, mOldSearchTerm(std::string("---")) , mOldSearchTerm(std::string("---"))
, mComment(nullptr)
{ {
mCommitCallbackRegistrar.add("SettingSelect", boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this)); mCommitCallbackRegistrar.add("SettingSelect", boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this));
mCommitCallbackRegistrar.add("CommitSettings", boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); mCommitCallbackRegistrar.add("CommitSettings", boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this));

View File

@@ -103,6 +103,7 @@ public:
LLFloaterURLEntry::LLFloaterURLEntry(LLHandle<LLPanel> parent) LLFloaterURLEntry::LLFloaterURLEntry(LLHandle<LLPanel> parent)
: :
LLFloater(), LLFloater(),
mMediaURLEdit(nullptr),
mPanelLandMediaHandle(parent) mPanelLandMediaHandle(parent)
{ {
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_url_entry.xml"); LLUICtrlFactory::getInstance()->buildFloater(this, "floater_url_entry.xml");

View File

@@ -38,6 +38,7 @@
LLFloaterVoiceEffect::LLFloaterVoiceEffect(const LLSD& key) LLFloaterVoiceEffect::LLFloaterVoiceEffect(const LLSD& key)
: LLFloater(/*key*/) : LLFloater(/*key*/)
, mVoiceEffectList(nullptr)
{ {
mCommitCallbackRegistrar.add("VoiceEffect.Record", boost::bind(&LLFloaterVoiceEffect::onClickRecord, this)); mCommitCallbackRegistrar.add("VoiceEffect.Record", boost::bind(&LLFloaterVoiceEffect::onClickRecord, this));
mCommitCallbackRegistrar.add("VoiceEffect.Play", boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); mCommitCallbackRegistrar.add("VoiceEffect.Play", boost::bind(&LLFloaterVoiceEffect::onClickPlay, this));

View File

@@ -67,7 +67,6 @@ private:
void onClickStop(); void onClickStop();
void onClickActivate(); void onClickActivate();
LLUUID mSelectedID;
LLScrollListCtrl* mVoiceEffectList; LLScrollListCtrl* mVoiceEffectList;
}; };

View File

@@ -37,8 +37,9 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
LLFloaterWhiteListEntry::LLFloaterWhiteListEntry() : LLFloaterWhiteListEntry::LLFloaterWhiteListEntry()
LLFloater() : LLFloater()
, mWhiteListEdit(nullptr)
{ {
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_whitelist_entry.xml"); LLUICtrlFactory::getInstance()->buildFloater(this, "floater_whitelist_entry.xml");
} }

View File

@@ -76,16 +76,13 @@ LLFloaterPay::LLFloaterPay(const std::string& name,
DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, DRAG_ON_TOP, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, DRAG_ON_TOP,
MINIMIZE_NO, CLOSE_YES), MINIMIZE_NO, CLOSE_YES),
mCallback(callback), mCallback(callback),
mObjectNameText(NULL),
mTargetUUID(uuid), mTargetUUID(uuid),
mTargetIsObject(target_is_object), mTargetIsObject(target_is_object),
mTargetIsGroup(FALSE), mTargetIsGroup(FALSE),
mDefaultValue(0) mDefaultValue(0),
mQuickPayButton({ {nullptr,nullptr,nullptr,nullptr} }),
mQuickPayInfo({ {PAY_BUTTON_DEFAULT_0, PAY_BUTTON_DEFAULT_1, PAY_BUTTON_DEFAULT_2, PAY_BUTTON_DEFAULT_3} })
{ {
mQuickPayInfo[0] = PAY_BUTTON_DEFAULT_0;
mQuickPayInfo[1] = PAY_BUTTON_DEFAULT_1;
mQuickPayInfo[2] = PAY_BUTTON_DEFAULT_2;
mQuickPayInfo[3] = PAY_BUTTON_DEFAULT_3;
BOOST_STATIC_ASSERT(MAX_PAY_BUTTONS == 4); BOOST_STATIC_ASSERT(MAX_PAY_BUTTONS == 4);
if (target_is_object) if (target_is_object)

View File

@@ -81,14 +81,12 @@ private:
protected: protected:
money_callback mCallback; money_callback mCallback;
LLTextBox* mObjectNameText;
LLUUID mTargetUUID; LLUUID mTargetUUID;
BOOL mTargetIsObject; BOOL mTargetIsObject;
BOOL mTargetIsGroup; BOOL mTargetIsGroup;
BOOL mHaveName;
LLButton* mQuickPayButton[MAX_PAY_BUTTONS]; std::array<LLButton*, MAX_PAY_BUTTONS> mQuickPayButton;
S32 mQuickPayInfo[MAX_PAY_BUTTONS]; std::array<S32, MAX_PAY_BUTTONS> mQuickPayInfo;
S32 mDefaultValue; S32 mDefaultValue;
LLSafeHandle<LLObjectSelection> mObjectSelection; LLSafeHandle<LLObjectSelection> mObjectSelection;

View File

@@ -42,7 +42,7 @@
class LLViewerObject; class LLViewerObject;
const U32 NUM_TRAIL_POINTS = 40; constexpr U32 NUM_TRAIL_POINTS = 40;
class LLHUDEffectSpiral : public LLHUDEffect class LLHUDEffectSpiral : public LLHUDEffect

View File

@@ -747,6 +747,8 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol
static const LLCachedControl<std::string> ding("LiruNewMessageSound"); static const LLCachedControl<std::string> ding("LiruNewMessageSound");
static const LLCachedControl<std::string> dong("LiruNewMessageSoundForSystemMessages"); static const LLCachedControl<std::string> dong("LiruNewMessageSoundForSystemMessages");
LLUI::sAudioCallback(LLUUID(from_user ? ding : dong)); LLUI::sAudioCallback(LLUUID(from_user ? ding : dong));
void flash_viewer_window(S32);
flash_viewer_window(2);
} }
// start tab flashing when receiving im for background session from user // start tab flashing when receiving im for background session from user

View File

@@ -488,7 +488,7 @@ BOOL LLManipRotate::handleMouseUp(S32 x, S32 y, MASK mask)
LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit(); LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
// have permission to move and object is root of selection or individually selected // have permission to move and object is root of selection or individually selected
if (object->permMove() && !object->isPermanentEnforced() && if (object && object->permMove() && !object->isPermanentEnforced() &&
((root_object == NULL) || !root_object->isPermanentEnforced()) && ((root_object == NULL) || !root_object->isPermanentEnforced()) &&
(object->isRootEdit() || selectNode->mIndividualSelection)) (object->isRootEdit() || selectNode->mIndividualSelection))
{ {
@@ -578,7 +578,7 @@ void LLManipRotate::drag( S32 x, S32 y )
LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit(); LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
// have permission to move and object is root of selection or individually selected // have permission to move and object is root of selection or individually selected
if (object->permMove() && !object->isPermanentEnforced() && if (object && object->permMove() && !object->isPermanentEnforced() &&
((root_object == NULL) || !root_object->isPermanentEnforced()) && ((root_object == NULL) || !root_object->isPermanentEnforced()) &&
(object->isRootEdit() || selectNode->mIndividualSelection)) (object->isRootEdit() || selectNode->mIndividualSelection))
{ {

View File

@@ -704,7 +704,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
} }
LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit(); LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
if (object->permMove() && !object->isPermanentEnforced() && if (object && object->permMove() && !object->isPermanentEnforced() &&
((root_object == NULL) || !root_object->isPermanentEnforced())) ((root_object == NULL) || !root_object->isPermanentEnforced()))
{ {
// handle attachments in local space // handle attachments in local space
@@ -2317,7 +2317,7 @@ BOOL LLManipTranslate::canAffectSelection()
virtual bool apply(LLViewerObject* objectp) virtual bool apply(LLViewerObject* objectp)
{ {
LLViewerObject *root_object = (objectp == NULL) ? NULL : objectp->getRootEdit(); LLViewerObject *root_object = (objectp == NULL) ? NULL : objectp->getRootEdit();
return objectp->permMove() && !objectp->isPermanentEnforced() && return object && objectp->permMove() && !objectp->isPermanentEnforced() &&
((root_object == NULL) || !root_object->isPermanentEnforced()) && ((root_object == NULL) || !root_object->isPermanentEnforced()) &&
(objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
} }

View File

@@ -2137,7 +2137,8 @@ void LLMeshHeaderResponder::completedRaw(LLChannelDescriptors const& channels,
LLMeshRepository::LLMeshRepository() LLMeshRepository::LLMeshRepository()
: mMeshMutex(NULL), : mMeshMutex(NULL),
mMeshThreadCount(0), mMeshThreadCount(0),
mThread(NULL) mThread(NULL),
mDecompThread(nullptr)
{ {
} }

View File

@@ -351,9 +351,9 @@ void LLNetMap::draw()
{ {
const LLViewerRegion::tex_matrix_t& tiles(regionp->getWorldMapTiles()); const LLViewerRegion::tex_matrix_t& tiles(regionp->getWorldMapTiles());
for (S32 i(0), scaled_width(real_width/region_width), square_width(scaled_width*scaled_width); i < square_width; ++i) for (S32 i(0), scaled_width((S32)real_width/region_width), square_width(scaled_width*scaled_width); i < square_width; ++i)
{ {
const F32 y(i/scaled_width); const F32 y(i / (F32)scaled_width);
const F32 x(i - y*scaled_width); const F32 x(i - y*scaled_width);
const F32 local_left(left + x*mScale); const F32 local_left(left + x*mScale);
const F32 local_right(local_left + mScale); const F32 local_right(local_left + mScale);

View File

@@ -100,7 +100,7 @@ void LLPanelContents::getState(LLViewerObject *objectp )
} }
LLUUID group_id; // used for SL-23488 LLUUID group_id; // used for SL-23488
LLSelectMgr::getInstance()->selectGetGroup(group_id); // sets group_id as a side effect SL-23488 (void)LLSelectMgr::getInstance()->selectGetGroup(group_id); // sets group_id as a side effect SL-23488
// BUG? Check for all objects being editable? // BUG? Check for all objects being editable?
bool editable = gAgent.isGodlike() bool editable = gAgent.isGodlike()

View File

@@ -195,7 +195,7 @@ public:
void requestGroupLandInfo(); void requestGroupLandInfo();
int getStoredContribution(); S32 getStoredContribution();
void setYourContributionTextField(int contrib); void setYourContributionTextField(int contrib);
void setYourMaxContributionTextBox(int max); void setYourMaxContributionTextBox(int max);
@@ -341,14 +341,14 @@ bool LLPanelGroupLandMoney::impl::applyContribution()
// Retrieves the land contribution for this agent that is currently // Retrieves the land contribution for this agent that is currently
// stored in the database, NOT what is currently entered in the text field // stored in the database, NOT what is currently entered in the text field
int LLPanelGroupLandMoney::impl::getStoredContribution() S32 LLPanelGroupLandMoney::impl::getStoredContribution()
{ {
LLGroupData group_data; LLGroupData group_data;
group_data.mContribution = 0; group_data.mContribution = 0;
gAgent.getGroupData(mPanel.mGroupID, group_data); bool found_group = gAgent.getGroupData(mPanel.mGroupID, group_data);
return group_data.mContribution; return found_group ? group_data.mContribution : 0;
} }
// Fills in the text field with the contribution, contrib // Fills in the text field with the contribution, contrib

View File

@@ -95,7 +95,12 @@ LLInventoryView::LLInventoryView(const std::string& name,
LLFloater(name, rect, std::string("Inventory"), RESIZE_YES, LLFloater(name, rect, std::string("Inventory"), RESIZE_YES,
INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP, INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP,
MINIMIZE_NO, CLOSE_YES), MINIMIZE_NO, CLOSE_YES),
mActivePanel(NULL) mFilterEditor(nullptr),
mFilterTabs(nullptr),
mActivePanel(nullptr),
mResortActivePanel(true),
mSavedFolderState(nullptr),
mFilterText("")
//LLHandle<LLFloater> mFinderHandle takes care of its own initialization //LLHandle<LLFloater> mFinderHandle takes care of its own initialization
{ {
init(inventory); init(inventory);
@@ -107,7 +112,12 @@ LLInventoryView::LLInventoryView(const std::string& name,
LLFloater(name, rect, std::string("Inventory"), RESIZE_YES, LLFloater(name, rect, std::string("Inventory"), RESIZE_YES,
INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP, INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP,
MINIMIZE_NO, CLOSE_YES), MINIMIZE_NO, CLOSE_YES),
mActivePanel(NULL) mFilterEditor(nullptr),
mFilterTabs(nullptr),
mActivePanel(nullptr),
mResortActivePanel(true),
mSavedFolderState(nullptr),
mFilterText("")
//LLHandle<LLFloater> mFinderHandle takes care of its own initialization //LLHandle<LLFloater> mFinderHandle takes care of its own initialization
{ {
init(inventory); init(inventory);

View File

@@ -467,7 +467,7 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_
bool all_face_media_navigated = false; bool all_face_media_navigated = false;
LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection(); LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection();
selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated ); (void)selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated );
// Note: we don't update the 'current URL' field until the media data itself changes // Note: we don't update the 'current URL' field until the media data itself changes

View File

@@ -76,13 +76,23 @@ static const LLUUID PARCEL_AUDIO_LIST_ITEM_UUID = LLUUID("DF4B020D-8A24-4B95-AB5
LLPanelNearByMedia::LLPanelNearByMedia(bool standalone_panel) LLPanelNearByMedia::LLPanelNearByMedia(bool standalone_panel)
: mMediaList(NULL), : mNearbyMediaPanel(nullptr)
mEnableAllCtrl(NULL), , mMediaList(nullptr)
mAllMediaDisabled(false), , mEnableAllCtrl(nullptr)
mDebugInfoVisible(false), , mDisableAllCtrl(nullptr)
mParcelMediaItem(NULL), , mShowCtrl(nullptr)
mParcelAudioItem(NULL), , mStopCtrl(nullptr)
mStandalonePanel(standalone_panel) , mPlayCtrl(nullptr)
, mPauseCtrl(nullptr)
, mMuteCtrl(nullptr)
, mVolumeSliderCtrl(nullptr)
, mZoomCtrl(nullptr)
, mUnzoomCtrl(nullptr)
, mVolumeSlider(nullptr)
, mMuteBtn(nullptr)
, mDebugInfoVisible(false)
, mParcelMediaItem(nullptr)
, mParcelAudioItem(nullptr)
{ {
mHoverTimer.stop(); mHoverTimer.stop();

View File

@@ -165,7 +165,6 @@ private:
LLSlider* mVolumeSlider; LLSlider* mVolumeSlider;
LLButton* mMuteBtn; LLButton* mMuteBtn;
bool mAllMediaDisabled;
bool mDebugInfoVisible; bool mDebugInfoVisible;
bool mParcelAudioAutoStart; bool mParcelAudioAutoStart;
std::string mEmptyNameString; std::string mEmptyNameString;

View File

@@ -318,10 +318,11 @@ void LLPanelPrimMediaControls::updateShape()
{ {
bool mini_controls = false; bool mini_controls = false;
LLMediaEntry *media_data = objectp->getTE(mTargetObjectFace)->getMediaData(); LLMediaEntry *media_data = objectp->getTE(mTargetObjectFace)->getMediaData();
if (media_data && NULL != dynamic_cast<LLVOVolume*>(objectp)) LLVOVolume *vol = dynamic_cast<LLVOVolume*>(objectp);
if (media_data && vol)
{ {
// Don't show the media controls if we do not have permissions // Don't show the media controls if we do not have permissions
enabled = dynamic_cast<LLVOVolume*>(objectp)->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL); enabled = vol->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL);
mini_controls = (LLMediaEntry::MINI == media_data->getControls()); mini_controls = (LLMediaEntry::MINI == media_data->getControls());
} }
const bool is_hud = objectp->isHUDAttachment(); const bool is_hud = objectp->isHUDAttachment();

View File

@@ -438,19 +438,27 @@ bool LLScriptEdCore::loadScriptText(const std::string& filename)
// read in the whole file // read in the whole file
fseek(file, 0L, SEEK_END); fseek(file, 0L, SEEK_END);
size_t file_length = (size_t) ftell(file); long file_length = ftell(file);
fseek(file, 0L, SEEK_SET); fseek(file, 0L, SEEK_SET);
char* buffer = new char[file_length+1]; if (file_length > 0)
size_t nread = fread(buffer, 1, file_length, file);
if (nread < file_length)
{ {
LL_WARNS() << "Short read" << LL_ENDL; char* buffer = new char[file_length+1];
} size_t nread = fread(buffer, 1, file_length, file);
buffer[nread] = '\0'; if (nread < file_length)
fclose(file); {
LL_WARNS() << "Short read" << LL_ENDL;
}
buffer[nread] = '\0';
fclose(file);
mEditor->setText(LLStringExplicit(buffer)); mEditor->setText(LLStringExplicit(buffer));
delete[] buffer; delete[] buffer;
}
else
{
LL_WARNS() << "Error opening " << filename << LL_ENDL;
return false;
}
return true; return true;
} }

View File

@@ -3576,6 +3576,7 @@ LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset,
mOffset(offset), mOffset(offset),
mFullbright(fullbright), mFullbright(fullbright),
mBump(bump), mBump(bump),
mShiny(0),
mParticle(particle), mParticle(particle),
mPartSize(part_size), mPartSize(part_size),
mVSize(0.f), mVSize(0.f),

View File

@@ -127,9 +127,7 @@ public:
U32 mBlendFuncDst; U32 mBlendFuncDst;
BOOL mHasGlow; BOOL mHasGlow;
LLPointer<LLViewerTexture> mSpecularMap; LLPointer<LLViewerTexture> mSpecularMap;
const LLMatrix4* mSpecularMapMatrix;
LLPointer<LLViewerTexture> mNormalMap; LLPointer<LLViewerTexture> mNormalMap;
const LLMatrix4* mNormalMapMatrix;
LLVector4 mSpecColor; // XYZ = Specular RGB, W = Specular Exponent LLVector4 mSpecColor; // XYZ = Specular RGB, W = Specular Exponent
F32 mEnvIntensity; F32 mEnvIntensity;
F32 mAlphaMaskCutoff; F32 mAlphaMaskCutoff;

View File

@@ -931,17 +931,17 @@ void LLTextureCache::setReadOnly(BOOL read_only)
} }
//called in the main thread. //called in the main thread.
S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL texture_cache_mismatch) U64 LLTextureCache::initCache(ELLPath location, U64 max_size, BOOL texture_cache_mismatch)
{ {
llassert_always(getPending() == 0); //should not start accessing the texture cache before initialized. llassert_always(getPending() == 0); //should not start accessing the texture cache before initialized.
S64 header_size = (max_size * 2) / 10; U64 header_size = (max_size * 2) / 10;
S64 max_entries = header_size / TEXTURE_CACHE_ENTRY_SIZE; U32 max_entries = header_size / TEXTURE_CACHE_ENTRY_SIZE;
sCacheMaxEntries = (S32)(llmin((S64)sCacheMaxEntries, max_entries)); sCacheMaxEntries = (llmin(sCacheMaxEntries, max_entries));
header_size = sCacheMaxEntries * TEXTURE_CACHE_ENTRY_SIZE; header_size = sCacheMaxEntries * TEXTURE_CACHE_ENTRY_SIZE;
max_size -= header_size; max_size -= header_size;
if (sCacheMaxTexturesSize > 0) if (sCacheMaxTexturesSize > 0)
sCacheMaxTexturesSize = llmin(sCacheMaxTexturesSize, max_size); sCacheMaxTexturesSize = (U32)llmin((U64)sCacheMaxTexturesSize, max_size);
else else
sCacheMaxTexturesSize = max_size; sCacheMaxTexturesSize = max_size;
max_size -= sCacheMaxTexturesSize; max_size -= sCacheMaxTexturesSize;

View File

@@ -105,7 +105,7 @@ public:
void purgeCache(ELLPath location); void purgeCache(ELLPath location);
void setReadOnly(BOOL read_only) ; void setReadOnly(BOOL read_only) ;
S64 initCache(ELLPath location, S64 maxsize, BOOL texture_cache_mismatch); U64 initCache(ELLPath location, U64 maxsize, BOOL texture_cache_mismatch);
handle_t readFromCache(const std::string& local_filename, const LLUUID& id, U32 priority, S32 offset, S32 size, handle_t readFromCache(const std::string& local_filename, const LLUUID& id, U32 priority, S32 offset, S32 size,
ReadResponder* responder); ReadResponder* responder);

View File

@@ -1199,7 +1199,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
break; break;
} }
} }
else else if (hit_obj)
{ {
//hit_obj->setTEImage(hit_face, image); //hit_obj->setTEImage(hit_face, image);
hit_obj->setTETexture(hit_face, asset_id); //Singu note: setTETexture will allow the real id to be passed to LLPrimitive::setTETexture, hit_obj->setTETexture(hit_face, asset_id); //Singu note: setTETexture will allow the real id to be passed to LLPrimitive::setTETexture,

View File

@@ -48,15 +48,15 @@ class LLCamera;
class LLNetMap; class LLNetMap;
class LLDebugBeacon; class LLDebugBeacon;
const U32 CLOSE_BIN_SIZE = 10; constexpr U32 CLOSE_BIN_SIZE = 10;
const U32 NUM_BINS = 128; constexpr U32 NUM_BINS = 128;
// GL name = position in object list + GL_NAME_INDEX_OFFSET so that // GL name = position in object list + GL_NAME_INDEX_OFFSET so that
// we can have special numbers like zero. // we can have special numbers like zero.
const U32 GL_NAME_LAND = 0; constexpr U32 GL_NAME_LAND = 0;
const U32 GL_NAME_PARCEL_WALL = 1; constexpr U32 GL_NAME_PARCEL_WALL = 1;
const U32 GL_NAME_INDEX_OFFSET = 10; constexpr U32 GL_NAME_INDEX_OFFSET = 10;
class LLViewerObjectList class LLViewerObjectList
{ {

View File

@@ -42,28 +42,28 @@
// Will clean these up at some point... // Will clean these up at some point...
// //
const F32 HORIZON_DIST = 1024.0f; constexpr F32 HORIZON_DIST = 1024.0f;
const F32 SKY_BOX_MULT = 16.0f; constexpr F32 SKY_BOX_MULT = 16.0f;
const F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 10.f; constexpr F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 10.f;
const F32 HEAVENLY_BODY_FACTOR = 0.1f; constexpr F32 HEAVENLY_BODY_FACTOR = 0.1f;
const F32 HEAVENLY_BODY_SCALE = HEAVENLY_BODY_DIST * HEAVENLY_BODY_FACTOR; constexpr F32 HEAVENLY_BODY_SCALE = HEAVENLY_BODY_DIST * HEAVENLY_BODY_FACTOR;
const F32 EARTH_RADIUS = 6.4e6f; // exact radius = 6.37 x 10^6 m constexpr F32 EARTH_RADIUS = 6.4e6f; // exact radius = 6.37 x 10^6 m
const F32 ATM_EXP_FALLOFF = 0.000126f; constexpr F32 ATM_EXP_FALLOFF = 0.000126f;
const F32 ATM_SEA_LEVEL_NDENS = 2.55e25f; constexpr F32 ATM_SEA_LEVEL_NDENS = 2.55e25f;
// Somewhat arbitrary: // Somewhat arbitrary:
const F32 ATM_HEIGHT = 100000.f; constexpr F32 ATM_HEIGHT = 100000.f;
const F32 FIRST_STEP = 5000.f; constexpr F32 FIRST_STEP = 5000.f;
const F32 INV_FIRST_STEP = 1.f/FIRST_STEP; constexpr F32 INV_FIRST_STEP = 1.f/FIRST_STEP;
const S32 NO_STEPS = 15; constexpr S32 NO_STEPS = 15;
const F32 INV_NO_STEPS = 1.f/NO_STEPS; constexpr F32 INV_NO_STEPS = 1.f/NO_STEPS;
// constants used in calculation of scattering coeff of clear air // constants used in calculation of scattering coeff of clear air
const F32 sigma = 0.035f; constexpr F32 sigma = 0.035f;
const F32 fsigma = (6.f + 3.f * sigma) / (6.f-7.f*sigma); constexpr F32 fsigma = (6.f + 3.f * sigma) / (6.f-7.f*sigma);
const F64 Ndens = 2.55e25; constexpr F64 Ndens = 2.55e25;
const F64 Ndens2 = Ndens*Ndens; constexpr F64 Ndens2 = Ndens*Ndens;
// HACK: Allow server to change sun and moon IDs. // HACK: Allow server to change sun and moon IDs.
// I can't figure out how to pass the appropriate // I can't figure out how to pass the appropriate