Commit cde8c7b5 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Finalize rlv classes for better virtual optimization

parent 089f7e55
......@@ -757,7 +757,7 @@ bool rlvCanDeleteOrReturn()
{
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) || (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) )
{
struct RlvCanDeleteOrReturn : public LLSelectedObjectFunctor
struct RlvCanDeleteOrReturn final : public LLSelectedObjectFunctor
{
/*virtual*/ bool apply(LLViewerObject* pObj) { return rlvCanDeleteOrReturn(pObj); }
} f;
......
......@@ -226,20 +226,20 @@ bool rlvMenuEnableIfNot(const LLSD& sdParam);
bool rlvCanDeleteOrReturn();
bool rlvCanDeleteOrReturn(const LLViewerObject* pObj);
struct RlvSelectHasLockedAttach : public LLSelectedNodeFunctor
struct RlvSelectHasLockedAttach final : public LLSelectedNodeFunctor
{
RlvSelectHasLockedAttach() = default;
virtual bool apply(LLSelectNode* pNode);
};
// Filters out selected objects that can't be editable (i.e. getFirstNode() will return NULL if the selection is fully editable)
struct RlvSelectIsEditable : public LLSelectedNodeFunctor
struct RlvSelectIsEditable final : public LLSelectedNodeFunctor
{
RlvSelectIsEditable() = default;
/*virtual*/ bool apply(LLSelectNode* pNode);
};
struct RlvSelectIsSittingOn : public LLSelectedNodeFunctor
struct RlvSelectIsSittingOn final : public LLSelectedNodeFunctor
{
RlvSelectIsSittingOn(const LLVOAvatar* pAvatar) : m_pAvatar(pAvatar) {}
/*virtual*/ bool apply(LLSelectNode* pNode);
......
......@@ -27,7 +27,7 @@
*
*/
class RlvExtGetSet : public RlvExtCommandHandler
class RlvExtGetSet final : public RlvExtCommandHandler
{
public:
RlvExtGetSet();
......
......@@ -38,7 +38,7 @@ enum class ERlvBehaviourFilter {
ALL
};
class RlvFloaterBehaviours : public LLFloater
class RlvFloaterBehaviours final : public LLFloater
{
friend class LLFloaterReg;
private:
......@@ -74,7 +74,7 @@ protected:
// RlvFloaterLocks class declaration
//
class RlvFloaterLocks : public LLFloater
class RlvFloaterLocks final : public LLFloater
{
friend class LLFloaterReg;
private:
......@@ -106,7 +106,7 @@ protected:
// RlvFloaterStrings class declaration
//
class RlvFloaterStrings : public LLFloater
class RlvFloaterStrings final : public LLFloater
{
friend class LLFloaterReg;
private:
......@@ -135,7 +135,7 @@ protected:
// RlvFloaterConsole - debug console to allow command execution without the need for a script
//
class RlvFloaterConsole : public LLFloater
class RlvFloaterConsole final : public LLFloater
{
friend class LLFloaterReg;
template<ERlvParamType> friend struct RlvCommandHandlerBaseImpl;
......
......@@ -612,7 +612,7 @@ bool RlvHandler::processIMQuery(const LLUUID& idSender, const std::string& strMe
params.substitutions = LLSD().with("NAME_LABEL", LLSLURL("agent", idSender, "completename").getSLURLString()).with("NAME_SLURL", LLSLURL("agent", idSender, "about").getSLURLString());
params.payload = LLSD().with("from_id", idSender).with("command", strMessage);
class RlvPostponedOfferNotification : public LLPostponedNotification
class RlvPostponedOfferNotification final : public LLPostponedNotification
{
protected:
void modifyNotificationParams() override
......
......@@ -187,7 +187,7 @@ typedef RlvForceHandler<RLV_BHVR_SETCAM_EYEOFFSET> RlvForceCamEyeFocusOffsetHand
// RlvCommandProcessor - Templated glue class that brings RlvBehaviourInfo, RlvCommandHandlerBaseImpl and RlvCommandHandler together
//
template <ERlvParamType templParamType, ERlvBehaviour templBhvr, typename handlerImpl = RlvCommandHandler<templParamType, templBhvr>, typename baseImpl = RlvCommandHandlerBaseImpl<templParamType>>
class RlvCommandProcessor : public RlvBehaviourInfo
class RlvCommandProcessor final : public RlvBehaviourInfo
{
public:
// Default constructor used by behaviour specializations
......@@ -217,7 +217,7 @@ template<ERlvBehaviourOptionType templOptionType> using RlvForceGenericProcessor
//
template <ERlvBehaviour eBhvr, typename handlerImpl = RlvBehaviourHandler<eBhvr>, typename toggleHandlerImpl = RlvBehaviourToggleHandler<eBhvr>>
class RlvBehaviourToggleProcessor : public RlvBehaviourInfo
class RlvBehaviourToggleProcessor final : public RlvBehaviourInfo
{
public:
RlvBehaviourToggleProcessor(const std::string& strBhvr, U32 nBhvrFlags = 0) : RlvBehaviourInfo(strBhvr, eBhvr, RLV_TYPE_ADDREM, nBhvrFlags) {}
......@@ -639,7 +639,7 @@ private:
// Various helper classes/timers/functors
//
class RlvGCTimer : public LLEventTimer
class RlvGCTimer final : public LLEventTimer
{
public:
RlvGCTimer() : LLEventTimer(30.0) {}
......@@ -647,7 +647,7 @@ public:
};
// NOTE: Unused as of SL-3.7.2
class RlvCallbackTimerOnce : public LLEventTimer
class RlvCallbackTimerOnce final : public LLEventTimer
{
public:
typedef boost::function<void ()> nullary_func_t;
......
......@@ -37,7 +37,7 @@ const std::string RlvInventory::cstrSharedRoot = RLV_ROOT_FOLDER;
//
// TODO-RLVa: [RLVa-1.2.1] This class really shouldn't be calling "fetchSharedLinks" directly so find a better way
class RlvSharedInventoryFetcher : public LLInventoryFetchDescendentsObserver
class RlvSharedInventoryFetcher final : public LLInventoryFetchDescendentsObserver
{
public:
RlvSharedInventoryFetcher(const uuid_vec_t& idFolders): LLInventoryFetchDescendentsObserver(idFolders) {}
......
......@@ -102,14 +102,13 @@ protected:
private:
static const std::string cstrSharedRoot;
friend class RlvSharedInventoryFetcher;
friend class LLSingleton<RlvInventory>;
};
// ============================================================================
// RlvRenameOnWearObserver - Handles "auto-rename-on-wear" for (linked) items living under #RLV
//
class RlvRenameOnWearObserver : public LLInventoryFetchItemsObserver
class RlvRenameOnWearObserver final : public LLInventoryFetchItemsObserver
{
public:
RlvRenameOnWearObserver(const LLUUID& idItem) : LLInventoryFetchItemsObserver(idItem) {}
......@@ -143,7 +142,7 @@ private:
// [See LLInventoryTransactionObserver which says it's not entirely complete?]
// NOTE: the offer may span mulitple BulkUpdateInventory messages so if we're no longer around then (ie due to "delete this") then
// we'll miss those; in this specific case we only care about the *folder* though and that will be in the very first message
class RlvGiveToRLVTaskOffer : public LLInventoryObserver, RlvGiveToRLVOffer
class RlvGiveToRLVTaskOffer final : public LLInventoryObserver, RlvGiveToRLVOffer
{
public:
RlvGiveToRLVTaskOffer(const LLUUID& idTransaction) : RlvGiveToRLVOffer(), m_idTransaction(idTransaction) {}
......@@ -159,7 +158,7 @@ protected:
LLUUID m_idTransaction;
};
class RlvGiveToRLVAgentOffer : public LLInventoryFetchDescendentsObserver, RlvGiveToRLVOffer
class RlvGiveToRLVAgentOffer final : public LLInventoryFetchDescendentsObserver, RlvGiveToRLVOffer
{
public:
RlvGiveToRLVAgentOffer(const LLUUID& idFolder) : LLInventoryFetchDescendentsObserver(idFolder), RlvGiveToRLVOffer() {}
......@@ -175,7 +174,7 @@ protected:
// RlvCriteriaCategoryCollector - Criteria based folder matching filter used by @findfolder and @findfolders
//
class RlvCriteriaCategoryCollector : public LLInventoryCollectFunctor
class RlvCriteriaCategoryCollector final : public LLInventoryCollectFunctor
{
public:
RlvCriteriaCategoryCollector(const std::string& strCriteria)
......@@ -223,7 +222,7 @@ protected:
// RlvWearableItemCollector - Inventory item filter used by attach/detach/attachall/detachall/getinvworn
//
class RlvWearableItemCollector : public LLInventoryCollectFunctor
class RlvWearableItemCollector final : public LLInventoryCollectFunctor
{
public:
RlvWearableItemCollector(const LLInventoryCategory* pFolder, RlvForceWear::EWearAction eAction, RlvForceWear::EWearFlags eFlags);
......@@ -258,7 +257,7 @@ protected:
// General purpose inventory helper classes
//
class RlvIsLinkType : public LLInventoryCollectFunctor
class RlvIsLinkType final : public LLInventoryCollectFunctor
{
public:
RlvIsLinkType() = default;
......@@ -267,7 +266,7 @@ public:
};
// If the attachment item is linked in COF but isn't worn (or just detached) the function will return inconsistent information
class RlvFindAttachmentsOnPoint : public LLInventoryCollectFunctor
class RlvFindAttachmentsOnPoint final : public LLInventoryCollectFunctor
{
public:
RlvFindAttachmentsOnPoint(const LLViewerJointAttachment* pAttachPt) : m_pAttachPt(pAttachPt) {}
......
......@@ -923,7 +923,7 @@ void RlvWearableLocks::removeWearableTypeLock(LLWearableType::EType eType, const
// RlvFolderLocks member functions
//
class RlvLockedDescendentsCollector : public LLInventoryCollectFunctor
class RlvLockedDescendentsCollector final : public LLInventoryCollectFunctor
{
public:
RlvLockedDescendentsCollector(int eSourceTypeMask, RlvFolderLocks::ELockPermission ePermMask, ERlvLockMask eLockTypeMask)
......
......@@ -202,7 +202,7 @@ protected:
typedef std::map<LLUUID, RlvWearInfo> rlv_wear_map_t;
rlv_wear_map_t m_PendingWear;
class RlvAttachmentLockWatchdogTimer : public LLEventTimer
class RlvAttachmentLockWatchdogTimer final : public LLEventTimer
{
public:
RlvAttachmentLockWatchdogTimer(RlvAttachmentLockWatchdog* pWatchdog) : LLEventTimer(10), m_pWatchdog(pWatchdog) {}
......
......@@ -25,7 +25,7 @@
//
template<ERlvBehaviourModifier eBhvrMod>
class RlvBehaviourModifierHandler : public RlvBehaviourModifier
class RlvBehaviourModifierHandler final : public RlvBehaviourModifier
{
public:
//using RlvBehaviourModifier::RlvBehaviourModifier; // Needs VS2015 and up
......@@ -53,7 +53,7 @@ struct RlvBehaviourModifierComp
LLUUID m_idPrimaryObject;
};
struct RlvBehaviourModifierCompMin : public RlvBehaviourModifierComp
struct RlvBehaviourModifierCompMin final : public RlvBehaviourModifierComp
{
bool operator()(const RlvBehaviourModifierValueTuple& lhs, const RlvBehaviourModifierValueTuple& rhs) override
{
......@@ -63,7 +63,7 @@ struct RlvBehaviourModifierCompMin : public RlvBehaviourModifierComp
}
};
struct RlvBehaviourModifierCompMax : public RlvBehaviourModifierComp
struct RlvBehaviourModifierCompMax final : public RlvBehaviourModifierComp
{
bool operator()(const RlvBehaviourModifierValueTuple& lhs, const RlvBehaviourModifierValueTuple& rhs) override
{
......@@ -108,7 +108,7 @@ public:
* Animation timer
*/
protected:
class AnimationTimer : public LLEventTimer, public LLHandleProvider<AnimationTimer>
class AnimationTimer final : public LLEventTimer, public LLHandleProvider<AnimationTimer>
{
public:
AnimationTimer();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment