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

@@ -430,7 +430,8 @@ LLAgent::LLAgent() :
mMouselookModeInSignal(NULL),
mMouselookModeOutSignal(NULL),
mPendingLure(NULL)
mPendingLure(NULL),
mFriendObserver(nullptr)
{
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)
{
// 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.
// [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]
const InitialWearableData& wearable_data = mAgentInitialWearables[i];
if (wearable_data->mAssetID.notNull())
if (wearable_data.mAssetID.notNull())
{
ids.push_back(wearable_data->mItemID);
ids.push_back(wearable_data.mItemID);
}
else
{
LL_INFOS() << "Invalid wearable, type " << wearable_data->mType << " itemID "
<< wearable_data->mItemID << " assetID " << wearable_data->mAssetID << LL_ENDL;
// delete wearable_data;
LL_INFOS() << "Invalid wearable, type " << wearable_data.mType << " itemID "
<< wearable_data.mItemID << " assetID " << wearable_data.mAssetID << LL_ENDL;
}
}

View File

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

View File

@@ -33,6 +33,14 @@
#include <list>
#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:
- 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) :
LLFloater(name, rect, title,
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();
@@ -111,7 +115,6 @@ LLFloaterScriptQueue::LLFloaterScriptQueue(const std::string& name,
translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
mStartString = start_string;
mDone = FALSE;
sInstances.addData(mID, this);
}

View File

@@ -61,7 +61,7 @@ class LLVOVolume;
class LLViewerTexture;
// 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.
LL_ALIGN_PREFIX(16)

View File

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

View File

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

View File

@@ -157,7 +157,8 @@ private:
{
TransactionPreflight,
TransactionCurrency,
TransactionBuy
TransactionBuy,
TransactionNone
};
boost::intrusive_ptr<XMLRPCResponder> mResponder;
TransactionType mTransactionType;
@@ -281,11 +282,34 @@ void LLFloaterBuyLand::updateEstateOwnerName(const std::string& name)
LLFloaterBuyLandUI::LLFloaterBuyLandUI()
: LLFloater(std::string("Buy Land")),
mParcelSelectionObserver(this),
mRegion(nullptr),
mParcel(0),
mIsClaim(false),
mIsForGroup(false),
mCanBuy(false),
mCannotBuyIsError(false),
mBought(false),
mParcelValid(false), mSiteValid(false),
mChildren(*this), mCurrency(*this),
mParcelBuyInfo(0)
mAgentCommittedTier(0),
mAgentHasNeverOwnedLand(true),
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");
LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver);
@@ -347,8 +371,6 @@ void LLFloaterBuyLandUI::updateParcelInfo()
mParcelSnapshot.setNull();
mParcelSellerName = "";
mCanBuy = false;
mCannotBuyIsError = false;
if (!mParcelValid)
{

View File

@@ -144,14 +144,13 @@ std::string STATUS[] =
// LLFloaterBvhPreview()
//-----------------------------------------------------------------------------
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["Walking"] = ANIM_AGENT_FEMALE_WALK;
mIDList["Sitting"] = ANIM_AGENT_SIT_FEMALE;

View File

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

View File

@@ -78,6 +78,15 @@ const F32 CONTEXT_FADE_TIME = 0.08f;
LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate )
: 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 ),
mMouseDownInLumRegion ( FALSE ),
mMouseDownInHueRegion ( FALSE ),
@@ -108,7 +117,11 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show
mPaletteRegionHeight ( 40 ),
mSwatch ( swatch ),
mActive ( TRUE ),
mApplyImmediateCheck(nullptr),
mCanApplyImmediately ( show_apply_immediate ),
mSelectBtn(nullptr),
mCancelBtn(nullptr),
mPipetteBtn(nullptr),
mContextConeOpacity ( 0.f )
{
// build the majority of the gui using the factory builder

View File

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

View File

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

View File

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

View File

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

View File

@@ -235,7 +235,15 @@ void LLFloaterLand::onClose(bool app_quitting)
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_covenant_panel"] = LLCallbackMap(createPanelLandCovenant, this);
@@ -354,9 +362,38 @@ void* LLFloaterLand::createPanelLandAccess(void* data)
LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel)
: LLPanel(std::string("land_general_panel")),
mUncheckedSell(FALSE),
mParcel(parcel)
: LLPanel(std::string("land_general_panel"))
, mEditName(nullptr)
, 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.
mTextSalePending = getChild<LLTextBox>("SalePending");
mTextOwnerLabel = getChild<LLTextBox>("Owner:");
mTextOwner = getChild<LLTextBox>("OwnerText");
mContentRating = getChild<LLTextBox>("ContentRatingText");
@@ -384,7 +420,6 @@ BOOL LLPanelLandGeneral::postBuild()
mBtnProfile->setClickedCallback(boost::bind(&LLPanelLandGeneral::onClickProfile, this));
mTextGroupLabel = getChild<LLTextBox>("Group:");
mTextGroup = getChild<LLTextBox>("GroupText");
@@ -425,7 +460,6 @@ BOOL LLPanelLandGeneral::postBuild()
mBtnStopSellLand->setClickedCallback(onClickStopSellLand, this);
mTextClaimDateLabel = getChild<LLTextBox>("Claimed:");
mTextClaimDate = getChild<LLTextBox>("DateClaimText");
@@ -2412,8 +2446,10 @@ void LLPanelLandOptions::onClickPublishHelp(void*)
//---------------------------------------------------------------------------
LLPanelLandAccess::LLPanelLandAccess(LLParcelSelectionHandle& parcel)
: LLPanel(std::string("land_access_panel")),
mParcel(parcel)
: LLPanel(std::string("land_access_panel"))
, mListAccess(nullptr)
, mListBanned(nullptr)
, mParcel(parcel)
{
}

View File

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

View File

@@ -43,10 +43,13 @@ LLFloaterMediaSettings* LLFloaterMediaSettings::sInstance = NULL;
//
LLFloaterMediaSettings::LLFloaterMediaSettings(const LLSD& key)
: LLFloater(key),
mTabContainer(NULL),
mPanelMediaSettingsGeneral(NULL),
mPanelMediaSettingsSecurity(NULL),
mPanelMediaSettingsPermissions(NULL),
mOKBtn(nullptr),
mCancelBtn(nullptr),
mApplyBtn(nullptr),
mTabContainer(nullptr),
mPanelMediaSettingsGeneral(nullptr),
mPanelMediaSettingsSecurity(nullptr),
mPanelMediaSettingsPermissions(nullptr),
mWaitingToClose( false ),
mIdenticalHasMediaInfo( true ),
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)
{
LLModel* model = instance->mModel;
if (model)
LLModel* lod_model = instance->mModel;
if (lod_model)
{
//for each model in the lod
S32 cur_tris = 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 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_verts += face.mNumVertices;
}
@@ -4202,6 +4202,11 @@ void LLModelPreview::updateStatusMessages()
verts[lod].push_back(cur_verts);
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),
mFilterByLinksetUse(NULL),
mEditLinksetUse(NULL),
mEditLinksetUseUnset(nullptr),
mEditLinksetUseWalkable(NULL),
mEditLinksetUseStaticObstacle(NULL),
mEditLinksetUseDynamicObstacle(NULL),

View File

@@ -204,6 +204,9 @@ LLUUID LLFloaterRegionInfo::sRequestInvoice;
LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed)
: LLFloater()
, mTab(nullptr)
, mInfoPanels()
{
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()
:
mCovenantID(LLUUID::null)
: LLPanelRegionInfo()
, mEstateNameText(nullptr)
, mEstateOwnerText(nullptr)
, mLastModifiedText(nullptr)
, mCovenantID(LLUUID::null)
, mEditor(nullptr)
, mAssetStatus(ASSET_ERROR)
{
}

View File

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

View File

@@ -162,7 +162,8 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput()
}
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 x = LLFLOATER_HPAD;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -37,8 +37,9 @@
///////////////////////////////////////////////////////////////////////////////
//
LLFloaterWhiteListEntry::LLFloaterWhiteListEntry() :
LLFloater()
LLFloaterWhiteListEntry::LLFloaterWhiteListEntry()
: LLFloater()
, mWhiteListEdit(nullptr)
{
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,
MINIMIZE_NO, CLOSE_YES),
mCallback(callback),
mObjectNameText(NULL),
mTargetUUID(uuid),
mTargetIsObject(target_is_object),
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);
if (target_is_object)

View File

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

View File

@@ -42,7 +42,7 @@
class LLViewerObject;
const U32 NUM_TRAIL_POINTS = 40;
constexpr U32 NUM_TRAIL_POINTS = 40;
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> dong("LiruNewMessageSoundForSystemMessages");
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

View File

@@ -488,7 +488,7 @@ BOOL LLManipRotate::handleMouseUp(S32 x, S32 y, MASK mask)
LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
// 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()) &&
(object->isRootEdit() || selectNode->mIndividualSelection))
{
@@ -578,7 +578,7 @@ void LLManipRotate::drag( S32 x, S32 y )
LLViewerObject* root_object = (object == NULL) ? NULL : object->getRootEdit();
// 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()) &&
(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();
if (object->permMove() && !object->isPermanentEnforced() &&
if (object && object->permMove() && !object->isPermanentEnforced() &&
((root_object == NULL) || !root_object->isPermanentEnforced()))
{
// handle attachments in local space
@@ -2317,7 +2317,7 @@ BOOL LLManipTranslate::canAffectSelection()
virtual bool apply(LLViewerObject* objectp)
{
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()) &&
(objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
}

View File

@@ -2137,7 +2137,8 @@ void LLMeshHeaderResponder::completedRaw(LLChannelDescriptors const& channels,
LLMeshRepository::LLMeshRepository()
: mMeshMutex(NULL),
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());
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 local_left(left + x*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
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?
bool editable = gAgent.isGodlike()

View File

@@ -195,7 +195,7 @@ public:
void requestGroupLandInfo();
int getStoredContribution();
S32 getStoredContribution();
void setYourContributionTextField(int contrib);
void setYourMaxContributionTextBox(int max);
@@ -341,14 +341,14 @@ bool LLPanelGroupLandMoney::impl::applyContribution()
// Retrieves the land contribution for this agent that is currently
// stored in the database, NOT what is currently entered in the text field
int LLPanelGroupLandMoney::impl::getStoredContribution()
S32 LLPanelGroupLandMoney::impl::getStoredContribution()
{
LLGroupData group_data;
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

View File

@@ -95,7 +95,12 @@ LLInventoryView::LLInventoryView(const std::string& name,
LLFloater(name, rect, std::string("Inventory"), RESIZE_YES,
INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP,
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
{
init(inventory);
@@ -107,7 +112,12 @@ LLInventoryView::LLInventoryView(const std::string& name,
LLFloater(name, rect, std::string("Inventory"), RESIZE_YES,
INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP,
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
{
init(inventory);

View File

@@ -467,7 +467,7 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_
bool all_face_media_navigated = false;
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

View File

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

View File

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

View File

@@ -318,10 +318,11 @@ void LLPanelPrimMediaControls::updateShape()
{
bool mini_controls = false;
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
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());
}
const bool is_hud = objectp->isHUDAttachment();

View File

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

View File

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

View File

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

View File

@@ -931,17 +931,17 @@ void LLTextureCache::setReadOnly(BOOL read_only)
}
//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.
S64 header_size = (max_size * 2) / 10;
S64 max_entries = header_size / TEXTURE_CACHE_ENTRY_SIZE;
sCacheMaxEntries = (S32)(llmin((S64)sCacheMaxEntries, max_entries));
U64 header_size = (max_size * 2) / 10;
U32 max_entries = header_size / TEXTURE_CACHE_ENTRY_SIZE;
sCacheMaxEntries = (llmin(sCacheMaxEntries, max_entries));
header_size = sCacheMaxEntries * TEXTURE_CACHE_ENTRY_SIZE;
max_size -= header_size;
if (sCacheMaxTexturesSize > 0)
sCacheMaxTexturesSize = llmin(sCacheMaxTexturesSize, max_size);
sCacheMaxTexturesSize = (U32)llmin((U64)sCacheMaxTexturesSize, max_size);
else
sCacheMaxTexturesSize = max_size;
max_size -= sCacheMaxTexturesSize;

View File

@@ -105,7 +105,7 @@ public:
void purgeCache(ELLPath location);
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,
ReadResponder* responder);

View File

@@ -1199,7 +1199,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
break;
}
}
else
else if (hit_obj)
{
//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,

View File

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

View File

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