From 49a2c136f99cf90abc94f1ce84d3c6f2be2815d0 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 25 Sep 2024 21:35:20 +0300 Subject: viewer#2646 Fix viewer ignoring Physics Shape Type changes asStringRef is only valid for strings --- indra/llui/llcombobox.cpp | 2 +- indra/llui/llscrolllistctrl.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index a1c16ccdec..f3876ef695 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -365,7 +365,7 @@ void LLComboBox::setValue(const LLSD& value) if (LLScrollListItem* item = mList->getFirstSelected()) { LLSD item_value = item->getValue(); - if (item_value.asStringRef() == value.asStringRef()) + if (item_value.asString() == value.asString()) return; } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 445377d3a2..93bd3c6bed 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -490,12 +490,12 @@ std::vector LLScrollListCtrl::getAllData() const // returns first matching item LLScrollListItem* LLScrollListCtrl::getItem(const LLSD& sd) const { - const std::string& string_val = sd.asStringRef(); + std::string string_val = sd.asString(); for (LLScrollListItem* item : mItemList) { // assumes string representation is good enough for comparison - if (item->getValue().asStringRef() == string_val) + if (item->getValue().asString() == string_val) { return item; } -- cgit v1.2.3 From d511ff7365284a4475b1d729cf3448d378c83341 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sun, 29 Sep 2024 00:59:41 +0200 Subject: Linux/GCC 13 build fix for template specialization of pasteTextWithLinebreaks (#2729) GCC 13 did not like having a template<> inside the class body at all. Thus turn the specialization of pasteTextWithLinebreaks into a class methode pasteTextWithLinebreaksImpl. --- indra/llui/lltexteditor.cpp | 4 +--- indra/llui/lltexteditor.h | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index c8cde90032..ecac800def 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1594,9 +1594,7 @@ void LLTextEditor::cleanStringForPaste(LLWString & clean_string) } } - -template <> -void LLTextEditor::pasteTextWithLinebreaks(const LLWString & clean_string) +void LLTextEditor::pasteTextWithLinebreaksImpl(const LLWString & clean_string) { std::basic_string::size_type start = 0; std::basic_string::size_type pos = clean_string.find('\n',start); diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 765c88a933..fab46a00e3 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -313,10 +313,9 @@ public: template void pasteTextWithLinebreaks(const STRINGTYPE& clean_string) { - pasteTextWithLinebreaks(ll_convert(clean_string)); + pasteTextWithLinebreaksImpl(ll_convert(clean_string)); } - template <> - void pasteTextWithLinebreaks(const LLWString & clean_string); + void pasteTextWithLinebreaksImpl(const LLWString & clean_string); private: void onKeyStroke(); -- cgit v1.2.3 From 4d92e15a79f697917c4a2ba67e03742d488e2a9d Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Wed, 2 Oct 2024 22:51:10 +0200 Subject: Clean up LLUI and fix/add suggestions from VS (#2746) --- indra/llui/llaccordionctrltab.h | 4 ++-- indra/llui/llcheckboxctrl.h | 8 ++++---- indra/llui/llcontainerview.h | 18 +++++++++--------- indra/llui/lldockablefloater.h | 4 ++-- indra/llui/lldockcontrol.cpp | 2 +- indra/llui/lldockcontrol.h | 8 ++++---- indra/llui/lldraghandle.h | 2 +- indra/llui/llfiltereditor.h | 2 +- indra/llui/llflashtimer.cpp | 4 ++-- indra/llui/llflashtimer.h | 4 ++-- indra/llui/llflatlistview.cpp | 2 +- indra/llui/llflatlistview.h | 14 +++++++------- indra/llui/llfloater.cpp | 2 +- indra/llui/llfloater.h | 39 +++++++++++++++++++------------------- indra/llui/llfloaterreglistener.h | 1 - indra/llui/llflyoutbutton.h | 2 +- indra/llui/llfocusmgr.h | 2 +- indra/llui/llfolderview.h | 30 ++++++++++++++--------------- indra/llui/llfolderviewitem.h | 5 +---- indra/llui/llkeywords.cpp | 2 +- indra/llui/llkeywords.h | 4 ++-- indra/llui/lllayoutstack.cpp | 4 ++-- indra/llui/lllayoutstack.h | 6 +----- indra/llui/lllineeditor.h | 6 ++---- indra/llui/llmenubutton.h | 4 ++-- indra/llui/llmenugl.h | 2 -- indra/llui/llmultifloater.cpp | 2 +- indra/llui/llmultifloater.h | 2 +- indra/llui/llmultislider.h | 8 ++++---- indra/llui/llmultisliderctrl.h | 9 ++++----- indra/llui/llnotifications.h | 7 ++----- indra/llui/llprogressbar.h | 4 ++-- indra/llui/llresizebar.h | 2 +- indra/llui/llresizehandle.h | 12 ++++++------ indra/llui/llrngwriter.h | 2 +- indra/llui/llscrolllistcell.h | 2 +- indra/llui/llscrolllistctrl.h | 9 +++------ indra/llui/llsliderctrl.h | 1 - indra/llui/llspinctrl.h | 1 - indra/llui/llstatbar.h | 2 +- indra/llui/llstatgraph.cpp | 1 - indra/llui/llstatgraph.h | 7 +------ indra/llui/llstatview.h | 1 - indra/llui/lltabcontainer.cpp | 10 +++++----- indra/llui/lltabcontainer.h | 12 ++++++------ indra/llui/lltextbase.h | 18 ++++++++---------- indra/llui/lltextbox.h | 32 +++++++++++++++---------------- indra/llui/lltexteditor.h | 8 ++------ indra/llui/lltoolbar.h | 4 ++-- indra/llui/lltooltip.cpp | 8 ++++---- indra/llui/lltooltip.h | 30 ++++++++++++++--------------- indra/llui/llui.h | 12 ++++++------ indra/llui/lluiconstants.h | 20 +++++++++---------- indra/llui/lluictrl.h | 6 +++--- indra/llui/lluictrlfactory.h | 2 +- indra/llui/llundo.h | 6 +++--- indra/llui/llurlaction.h | 2 -- indra/llui/llurlmatch.h | 1 - indra/llui/llurlregistry.h | 1 - indra/llui/llview.h | 22 ++++++++++----------- indra/llui/llviewborder.h | 1 - indra/llui/llviewereventrecorder.h | 2 +- indra/llui/llvirtualtrackball.h | 23 +++++++++++----------- indra/llui/llwindowshade.h | 2 +- indra/llui/llxyvector.h | 18 +++++++++--------- 65 files changed, 226 insertions(+), 267 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index cf3569683e..3fdcf9f7f2 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -126,7 +126,7 @@ public: void setSelected(bool is_selected); - bool getCollapsible() { return mCollapsible; }; + bool getCollapsible() const { return mCollapsible; }; void setCollapsible(bool collapsible) { mCollapsible = collapsible; }; void changeOpenClose(bool is_open); @@ -181,7 +181,7 @@ public: void setHeaderVisible(bool value); - bool getHeaderVisible() { return mHeaderVisible;} + bool getHeaderVisible() const { return mHeaderVisible;} S32 mExpandedHeight; // Height of expanded ctrl. // Used to restore height after expand. diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h index 135f128692..4068741978 100644 --- a/indra/llui/llcheckboxctrl.h +++ b/indra/llui/llcheckboxctrl.h @@ -36,8 +36,8 @@ // Constants // -const bool RADIO_STYLE = true; -const bool CHECK_STYLE = false; +constexpr bool RADIO_STYLE = true; +constexpr bool CHECK_STYLE = false; // // Classes @@ -94,7 +94,7 @@ public: // LLUICtrl interface virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - bool get() { return (bool)getValue().asBoolean(); } + bool get() const { return (bool)getValue().asBoolean(); } void set(bool value) { setValue(value); } virtual void setTentative(bool b); @@ -106,7 +106,7 @@ public: virtual void onCommit(); // LLCheckBoxCtrl interface - virtual bool toggle() { return mButton->toggleState(); } // returns new state + virtual bool toggle() { return mButton->toggleState(); } // returns new state void setBtnFocus() { mButton->setFocus(true); } diff --git a/indra/llui/llcontainerview.h b/indra/llui/llcontainerview.h index c6dd401e85..2675d21c22 100644 --- a/indra/llui/llcontainerview.h +++ b/indra/llui/llcontainerview.h @@ -65,21 +65,21 @@ protected: public: ~LLContainerView(); - /*virtual*/ bool postBuild(); - /*virtual*/ bool addChild(LLView* view, S32 tab_group = 0); + bool postBuild() override; + bool addChild(LLView* view, S32 tab_group = 0) override; - /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); + bool handleDoubleClick(S32 x, S32 y, MASK mask) override; + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleMouseUp(S32 x, S32 y, MASK mask) override; - /*virtual*/ void draw(); - /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); - /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. + void draw() override; + void reshape(S32 width, S32 height, bool called_from_parent = true) override; + LLRect getRequiredRect() override; // Return the height of this object, given the set options. void setLabel(const std::string& label); void showLabel(bool show) { mShowLabel = show; } void setDisplayChildren(bool displayChildren); - bool getDisplayChildren() { return mDisplayChildren; } + bool getDisplayChildren() const { return mDisplayChildren; } void setScrollContainer(LLScrollContainer* scroll) {mScrollContainer = scroll;} private: diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 3effc977db..9c516e23a4 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -112,8 +112,8 @@ public: virtual bool overlapsScreenChannel() { return mOverlapsScreenChannel && getVisible() && isDocked(); } virtual void setOverlapsScreenChannel(bool overlaps) { mOverlapsScreenChannel = overlaps; } - bool getUniqueDocking() { return mUniqueDocking; } - bool getUseTongue() { return mUseTongue; } + bool getUniqueDocking() const { return mUniqueDocking; } + bool getUseTongue() const { return mUseTongue; } void setUseTongue(bool use_tongue) { mUseTongue = use_tongue;} private: diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index 11dbad8c09..1a00c03856 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -156,7 +156,7 @@ void LLDockControl::repositionDockable() } } -bool LLDockControl::isDockVisible() +bool LLDockControl::isDockVisible() const { bool res = true; diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h index 7e31330713..b6ac9c19dd 100644 --- a/indra/llui/lldockcontrol.h +++ b/indra/llui/lldockcontrol.h @@ -61,19 +61,19 @@ public: void off(); void forceRecalculatePosition(); void setDock(LLView* dockWidget); - LLView* getDock() + LLView* getDock() const { return mDockWidgetHandle.get(); } void repositionDockable(); void drawToungue(); - bool isDockVisible(); + bool isDockVisible() const; // gets a rect that bounds possible positions for a dockable control (EXT-1111) void getAllowedRect(LLRect& rect); - S32 getTongueWidth() { return mDockTongue->getWidth(); } - S32 getTongueHeight() { return mDockTongue->getHeight(); } + S32 getTongueWidth() const { return mDockTongue->getWidth(); } + S32 getTongueHeight() const { return mDockTongue->getHeight(); } private: virtual void moveDockable(); diff --git a/indra/llui/lldraghandle.h b/indra/llui/lldraghandle.h index a522e63243..73211d5292 100644 --- a/indra/llui/lldraghandle.h +++ b/indra/llui/lldraghandle.h @@ -66,7 +66,7 @@ public: void setMaxTitleWidth(S32 max_width) {mMaxTitleWidth = llmin(max_width, mMaxTitleWidth); } S32 getMaxTitleWidth() const { return mMaxTitleWidth; } void setButtonsRect(const LLRect& rect){ mButtonsRect = rect; } - LLRect getButtonsRect() { return mButtonsRect; } + LLRect getButtonsRect() const { return mButtonsRect; } void setTitleVisible(bool visible); virtual void setTitle( const std::string& title ) = 0; diff --git a/indra/llui/llfiltereditor.h b/indra/llui/llfiltereditor.h index 686827d94c..685219c9f6 100644 --- a/indra/llui/llfiltereditor.h +++ b/indra/llui/llfiltereditor.h @@ -49,7 +49,7 @@ protected: LLFilterEditor(const Params&); friend class LLUICtrlFactory; - /*virtual*/ void handleKeystroke(); + void handleKeystroke() override; }; #endif // LL_FILTEREDITOR_H diff --git a/indra/llui/llflashtimer.cpp b/indra/llui/llflashtimer.cpp index 2711e8088d..dc912bccf4 100644 --- a/indra/llui/llflashtimer.cpp +++ b/indra/llui/llflashtimer.cpp @@ -85,12 +85,12 @@ void LLFlashTimer::stopFlashing() mCurrentTickCount = 0; } -bool LLFlashTimer::isFlashingInProgress() +bool LLFlashTimer::isFlashingInProgress() const { return mIsFlashingInProgress; } -bool LLFlashTimer::isCurrentlyHighlighted() +bool LLFlashTimer::isCurrentlyHighlighted() const { return mIsCurrentlyHighlighted; } diff --git a/indra/llui/llflashtimer.h b/indra/llui/llflashtimer.h index 988b577ed2..7e55da4fb1 100644 --- a/indra/llui/llflashtimer.h +++ b/indra/llui/llflashtimer.h @@ -51,8 +51,8 @@ public: void startFlashing(); void stopFlashing(); - bool isFlashingInProgress(); - bool isCurrentlyHighlighted(); + bool isFlashingInProgress() const; + bool isCurrentlyHighlighted() const; /* * Use this instead of deleting this object. * The next call to tick() will return true and that will destroy this object. diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 53f39766c6..b8c833f4fd 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -1337,7 +1337,7 @@ void LLFlatListViewEx::updateNoItemsMessage(const std::string& filter_string) } } -bool LLFlatListViewEx::getForceShowingUnmatchedItems() +bool LLFlatListViewEx::getForceShowingUnmatchedItems() const { return mForceShowingUnmatchedItems; } diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 6d75e9f282..3c40f91ab0 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -126,10 +126,10 @@ public: /** Returns full rect of child panel */ const LLRect& getItemsRect() const; - LLRect getRequiredRect() { return getItemsRect(); } + LLRect getRequiredRect() const { return getItemsRect(); } /** Returns distance between items */ - const S32 getItemsPad() { return mItemPad; } + const S32 getItemsPad() const { return mItemPad; } /** * Adds and item and LLSD value associated with it to the list at specified position @@ -264,7 +264,7 @@ public: void setCommitOnSelectionChange(bool b) { mCommitOnSelectionChange = b; } /** Get number of selected items in the list */ - U32 numSelected() const {return static_cast(mSelectedItemPairs.size()); } + U32 numSelected() const { return static_cast(mSelectedItemPairs.size()); } /** Get number of (visible) items in the list */ U32 size(const bool only_visible_items = true) const; @@ -294,8 +294,8 @@ public: void scrollToShowFirstSelectedItem(); - void selectFirstItem (); - void selectLastItem (); + void selectFirstItem(); + void selectLastItem(); virtual S32 notify(const LLSD& info) ; @@ -478,7 +478,7 @@ public: void setNoItemsMsg(const std::string& msg) { mNoItemsMsg = msg; } void setNoFilteredItemsMsg(const std::string& msg) { mNoFilteredItemsMsg = msg; } - bool getForceShowingUnmatchedItems(); + bool getForceShowingUnmatchedItems() const; void setForceShowingUnmatchedItems(bool show); @@ -486,7 +486,7 @@ public: * Sets up new filter string and filters the list. */ void setFilterSubString(const std::string& filter_str, bool notify_parent); - std::string getFilterSubString() { return mFilterSubString; } + std::string getFilterSubString() const { return mFilterSubString; } /** * Filters the list, rearranges and notifies parent about shape changes. diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 4b904f09e0..fd07b2ec5d 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2165,7 +2165,7 @@ void LLFloater::setCanDrag(bool can_drag) } } -bool LLFloater::getCanDrag() +bool LLFloater::getCanDrag() const { return mDragHandle->getEnabled(); } diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 9be2240f6f..5bdbcdfcf8 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -46,24 +46,24 @@ class LLMultiFloater; class LLFloater; -const bool RESIZE_YES = true; -const bool RESIZE_NO = false; +constexpr bool RESIZE_YES = true; +constexpr bool RESIZE_NO = false; -const bool DRAG_ON_TOP = false; -const bool DRAG_ON_LEFT = true; +constexpr bool DRAG_ON_TOP = false; +constexpr bool DRAG_ON_LEFT = true; -const bool MINIMIZE_YES = true; -const bool MINIMIZE_NO = false; +constexpr bool MINIMIZE_YES = true; +constexpr bool MINIMIZE_NO = false; -const bool CLOSE_YES = true; -const bool CLOSE_NO = false; +constexpr bool CLOSE_YES = true; +constexpr bool CLOSE_NO = false; -const bool ADJUST_VERTICAL_YES = true; -const bool ADJUST_VERTICAL_NO = false; +constexpr bool ADJUST_VERTICAL_YES = true; +constexpr bool ADJUST_VERTICAL_NO = false; -const F32 CONTEXT_CONE_IN_ALPHA = 0.f; -const F32 CONTEXT_CONE_OUT_ALPHA = 1.f; -const F32 CONTEXT_CONE_FADE_TIME = .08f; +constexpr F32 CONTEXT_CONE_IN_ALPHA = 0.f; +constexpr F32 CONTEXT_CONE_OUT_ALPHA = 1.f; +constexpr F32 CONTEXT_CONE_FADE_TIME = .08f; namespace LLFloaterEnums { @@ -228,7 +228,7 @@ public: /*virtual*/ void setIsChrome(bool is_chrome); /*virtual*/ void setRect(const LLRect &rect); void setIsSingleInstance(bool is_single_instance); - bool getIsSingleInstance() { return mSingleInstance; } + bool getIsSingleInstance() const { return mSingleInstance; } void initFloater(const Params& p); @@ -274,17 +274,17 @@ public: static bool isShown(const LLFloater* floater); static bool isVisible(const LLFloater* floater); static bool isMinimized(const LLFloater* floater); - bool isFirstLook() { return mFirstLook; } // EXT-2653: This function is necessary to prevent overlapping for secondary showed toasts + bool isFirstLook() const { return mFirstLook; } // EXT-2653: This function is necessary to prevent overlapping for secondary showed toasts virtual bool isFrontmost(); - bool isDependent() { return !mDependeeHandle.isDead(); } + bool isDependent() const { return !mDependeeHandle.isDead(); } void setCanMinimize(bool can_minimize); void setCanClose(bool can_close); void setCanTearOff(bool can_tear_off); virtual void setCanResize(bool can_resize); void setCanDrag(bool can_drag); - bool getCanDrag(); + bool getCanDrag() const; void setHost(LLMultiFloater* host); - bool isResizable() const { return mResizable; } + bool isResizable() const { return mResizable; } void setResizeLimits( S32 min_width, S32 min_height ); void getResizeLimits( S32* min_width, S32* min_height ) { *min_width = mMinWidth; *min_height = mMinHeight; } @@ -347,7 +347,7 @@ public: virtual void setDocked(bool docked, bool pop_on_undock = true); virtual void setTornOff(bool torn_off) { mTornOff = torn_off; } - bool isTornOff() {return mTornOff;} + bool isTornOff() const { return mTornOff; } void setOpenPositioning(LLFloaterEnums::EOpenPositioning pos) {mPositioning = pos;} @@ -423,7 +423,6 @@ protected: private: void setForeground(bool b); // called only by floaterview void cleanupHandles(); // remove handles to dead floaters - void createMinimizeButton(); void buildButtons(const Params& p); // Images and tooltips are named in the XML, but we want to look them diff --git a/indra/llui/llfloaterreglistener.h b/indra/llui/llfloaterreglistener.h index 42e7178cbc..7c975edaea 100644 --- a/indra/llui/llfloaterreglistener.h +++ b/indra/llui/llfloaterreglistener.h @@ -30,7 +30,6 @@ #define LL_LLFLOATERREGLISTENER_H #include "lleventapi.h" -#include class LLSD; diff --git a/indra/llui/llflyoutbutton.h b/indra/llui/llflyoutbutton.h index 7a49501318..73190fc984 100644 --- a/indra/llui/llflyoutbutton.h +++ b/indra/llui/llflyoutbutton.h @@ -54,7 +54,7 @@ protected: LLFlyoutButton(const Params&); friend class LLUICtrlFactory; public: - virtual void draw(); + void draw() override; void setToggleState(bool state); diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 1fa0ac137e..89fee5c9f1 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -97,7 +97,7 @@ public: LLFocusableElement* getLastKeyboardFocus() const { return mLastKeyboardFocus; } bool childHasKeyboardFocus( const LLView* parent ) const; void removeKeyboardFocusWithoutCallback( const LLFocusableElement* focus ); - bool getKeystrokesOnly() { return mKeystrokesOnly; } + bool getKeystrokesOnly() const { return mKeystrokesOnly; } void setKeystrokesOnly(bool keystrokes_only) { mKeystrokesOnly = keystrokes_only; } F32 getFocusFlashAmt() const; diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index 62ef2a0626..e78dbf1e77 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -124,11 +124,11 @@ public: void setSelectCallback(const signal_t::slot_type& cb) { mSelectSignal.connect(cb); } void setReshapeCallback(const signal_t::slot_type& cb) { mReshapeSignal.connect(cb); } - bool getAllowMultiSelect() { return mAllowMultiSelect; } - bool getAllowDrag() { return mAllowDrag; } + bool getAllowMultiSelect() const { return mAllowMultiSelect; } + bool getAllowDrag() const { return mAllowDrag; } void setSingleFolderMode(bool is_single_mode) { mSingleFolderMode = is_single_mode; } - bool isSingleFolderMode() { return mSingleFolderMode; } + bool isSingleFolderMode() const { return mSingleFolderMode; } // Close all folders in the view void closeAllFolders(); @@ -142,7 +142,7 @@ public: virtual S32 getItemHeight() const; void arrangeAll() { mArrangeGeneration++; } - S32 getArrangeGeneration() { return mArrangeGeneration; } + S32 getArrangeGeneration() const { return mArrangeGeneration; } // applies filters to control visibility of items virtual void filter( LLFolderViewFilter& filter); @@ -227,27 +227,27 @@ public: void setShowSelectionContext(bool show) { mShowSelectionContext = show; } bool getShowSelectionContext(); void setShowSingleSelection(bool show); - bool getShowSingleSelection() { return mShowSingleSelection; } - F32 getSelectionFadeElapsedTime() { return mMultiSelectionFadeTimer.getElapsedTimeF32(); } - bool getUseEllipses() { return mUseEllipses; } - S32 getSelectedCount() { return (S32)mSelectedItems.size(); } + bool getShowSingleSelection() const { return mShowSingleSelection; } + F32 getSelectionFadeElapsedTime() const { return mMultiSelectionFadeTimer.getElapsedTimeF32(); } + bool getUseEllipses() const { return mUseEllipses; } + S32 getSelectedCount() const { return (S32)mSelectedItems.size(); } - void update(); // needs to be called periodically (e.g. once per frame) + void update(); // needs to be called periodically (e.g. once per frame) - bool needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; } - bool needsAutoRename() { return mNeedsAutoRename; } + bool needsAutoSelect() const { return mNeedsAutoSelect && !mAutoSelectOverride; } + bool needsAutoRename() const { return mNeedsAutoRename; } void setNeedsAutoRename(bool val) { mNeedsAutoRename = val; } void setPinningSelectedItem(bool val) { mPinningSelectedItem = val; } void setAutoSelectOverride(bool val) { mAutoSelectOverride = val; } - bool showItemLinkOverlays() { return mShowItemLinkOverlays; } + bool showItemLinkOverlays() const { return mShowItemLinkOverlays; } void setCallbackRegistrar(LLUICtrl::CommitCallbackRegistry::ScopedRegistrar* registrar) { mCallbackRegistrar = registrar; } void setEnableRegistrar(LLUICtrl::EnableCallbackRegistry::ScopedRegistrar* registrar) { mEnableRegistrar = registrar; } void setForceArrange(bool force) { mForceArrange = force; } - LLPanel* getParentPanel() { return mParentPanel.get(); } + LLPanel* getParentPanel() const { return mParentPanel.get(); } // DEBUG only void dumpSelectionInformation(); @@ -255,7 +255,7 @@ public: void setShowEmptyMessage(bool show_msg) { mShowEmptyMessage = show_msg; } - bool useLabelSuffix() { return mUseLabelSuffix; } + bool useLabelSuffix() const { return mUseLabelSuffix; } virtual void updateMenu(); void finishRenamingItem( void ); @@ -390,7 +390,7 @@ public: virtual ~LLSelectFirstFilteredItem() {} virtual void doFolder(LLFolderViewFolder* folder); virtual void doItem(LLFolderViewItem* item); - bool wasItemSelected() { return mItemSelected || mFolderSelected; } + bool wasItemSelected() const { return mItemSelected || mFolderSelected; } protected: bool mItemSelected; bool mFolderSelected; diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index cc8a7d934c..234d0dc7f9 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -282,7 +282,7 @@ public: // Does not need filter update virtual void refreshSuffix(); - bool isSingleFolderMode() { return mSingleFolderMode; } + bool isSingleFolderMode() const { return mSingleFolderMode; } // LLView functionality virtual bool handleRightMouseDown( S32 x, S32 y, MASK mask ); @@ -415,9 +415,6 @@ public: // doesn't delete it. virtual void extractItem( LLFolderViewItem* item, bool deparent_model = true); - // This function is called by a child that needs to be resorted. - void resort(LLFolderViewItem* item); - void setAutoOpenCountdown(F32 countdown) { mAutoOpenCountdown = countdown; } // folders can be opened. This will usually be called by internal diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 7bf43c22c1..2bea8fb4ed 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -170,7 +170,7 @@ std::string LLKeywords::getAttribute(std::string_view key) return (it != mAttributes.end()) ? it->second : ""; } -LLUIColor LLKeywords::getColorGroup(std::string_view key_in) +LLUIColor LLKeywords::getColorGroup(std::string_view key_in) const { std::string color_group = "ScriptText"; if (key_in == "functions") diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 328561c92a..5892238593 100644 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -111,8 +111,8 @@ public: ~LLKeywords(); void clearLoaded() { mLoaded = false; } - LLUIColor getColorGroup(std::string_view key_in); - bool isLoaded() const { return mLoaded; } + LLUIColor getColorGroup(std::string_view key_in) const; + bool isLoaded() const { return mLoaded; } void findSegments(std::vector *seg_list, const LLWString& text, diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 1c59938f90..fe0591ce4b 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -36,8 +36,8 @@ #include "lliconctrl.h" #include "boost/foreach.hpp" -static const F32 MIN_FRACTIONAL_SIZE = 0.00001f; -static const F32 MAX_FRACTIONAL_SIZE = 1.f; +static constexpr F32 MIN_FRACTIONAL_SIZE = 0.00001f; +static constexpr F32 MAX_FRACTIONAL_SIZE = 1.f; static LLDefaultChildRegistry::Register register_layout_stack("layout_stack"); static LLLayoutStack::LayoutStackRegistry::Register register_layout_panel("layout_panel"); diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 8459921c60..9e3536aaff 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -75,9 +75,6 @@ public: /*virtual*/ bool addChild(LLView* child, S32 tab_group = 0); /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); - - static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL); - typedef enum e_animate { NO_ANIMATE, @@ -86,7 +83,7 @@ public: void addPanel(LLLayoutPanel* panel, EAnimate animate = NO_ANIMATE); void collapsePanel(LLPanel* panel, bool collapsed = true); - S32 getNumPanels() { return static_cast(mPanels.size()); } + S32 getNumPanels() const { return static_cast(mPanels.size()); } void updateLayout(); @@ -190,7 +187,6 @@ public: bool isCollapsed() const { return mCollapsed;} void setOrientation(LLView::EOrientation orientation); - void storeOriginalDim(); void setIgnoreReshape(bool ignore) { mIgnoreReshape = ignore; } diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 12fe800acb..7533f76f1d 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -306,8 +306,6 @@ public: S32 calcCursorPos(S32 mouse_x); bool handleSpecialKey(KEY key, MASK mask); bool handleSelectionKey(KEY key, MASK mask); - bool handleControlKey(KEY key, MASK mask); - S32 handleCommitKey(KEY key, MASK mask); void updateTextPadding(); // Draw the background image depending on enabled/focused state. @@ -444,7 +442,7 @@ private: mText = ed->getText(); } - void doRollback( LLLineEditor* ed ) + void doRollback(LLLineEditor* ed) const { ed->mCursorPos = mCursorPos; ed->mScrollHPos = mScrollHPos; @@ -455,7 +453,7 @@ private: ed->mPrevText = mText; } - std::string getText() { return mText; } + std::string getText() const { return mText; } private: std::string mText; diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h index a77ae7dae7..3f96b28246 100644 --- a/indra/llui/llmenubutton.h +++ b/indra/llui/llmenubutton.h @@ -65,8 +65,8 @@ public: boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb ); - /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleKeyHere(KEY key, MASK mask ); + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleKeyHere(KEY key, MASK mask) override; void hideMenu(); diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 88608b20ab..e31cb184e5 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -439,8 +439,6 @@ protected: public: virtual ~LLMenuGL( void ); - void parseChildXML(LLXMLNodePtr child, LLView* parent); - // LLView Functionality /*virtual*/ bool handleUnicodeCharHere( llwchar uni_char ); /*virtual*/ bool handleHover( S32 x, S32 y, MASK mask ); diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index a7f9b8b2d9..f53e22c349 100644 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -390,7 +390,7 @@ LLFloater* LLMultiFloater::getActiveFloater() return (LLFloater*)mTabContainer->getCurrentPanel(); } -S32 LLMultiFloater::getFloaterCount() +S32 LLMultiFloater::getFloaterCount() const { return mTabContainer->getTabCount(); } diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h index eb0f917695..e0cd58aa3f 100644 --- a/indra/llui/llmultifloater.h +++ b/indra/llui/llmultifloater.h @@ -66,7 +66,7 @@ public: virtual LLFloater* getActiveFloater(); virtual bool isFloaterFlashing(LLFloater* floaterp); - virtual S32 getFloaterCount(); + virtual S32 getFloaterCount() const; virtual void setFloaterFlashing(LLFloater* floaterp, bool flashing); virtual bool closeAllFloaters(); //Returns false if the floater could not be closed due to pending confirmation dialogs diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index b2bfc8bc84..af255bcc8f 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -117,10 +117,10 @@ public: /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask) override; /*virtual*/ void draw() override; - S32 getMaxNumSliders() { return mMaxNumSliders; } - S32 getCurNumSliders() { return static_cast(mValue.size()); } - F32 getOverlapThreshold() { return mOverlapThreshold; } - bool canAddSliders() { return mValue.size() < mMaxNumSliders; } + S32 getMaxNumSliders() const { return mMaxNumSliders; } + S32 getCurNumSliders() const { return static_cast(mValue.size()); } + F32 getOverlapThreshold() const { return mOverlapThreshold; } + bool canAddSliders() const { return mValue.size() < mMaxNumSliders; } protected: diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h index dec6cb48b9..2c2bc5e4d9 100644 --- a/indra/llui/llmultisliderctrl.h +++ b/indra/llui/llmultisliderctrl.h @@ -124,10 +124,10 @@ public: F32 getMinValue() const { return mMultiSlider->getMinValue(); } F32 getMaxValue() const { return mMultiSlider->getMaxValue(); } - S32 getMaxNumSliders() { return mMultiSlider->getMaxNumSliders(); } - S32 getCurNumSliders() { return mMultiSlider->getCurNumSliders(); } - F32 getOverlapThreshold() { return mMultiSlider->getOverlapThreshold(); } - bool canAddSliders() { return mMultiSlider->canAddSliders(); } + S32 getMaxNumSliders() const { return mMultiSlider->getMaxNumSliders(); } + S32 getCurNumSliders() const { return mMultiSlider->getCurNumSliders(); } + F32 getOverlapThreshold() const { return mMultiSlider->getOverlapThreshold(); } + bool canAddSliders() const { return mMultiSlider->canAddSliders(); } void setLabel(const std::string& label) { if (mLabelBox) mLabelBox->setText(label); } void setLabelColor(const LLUIColor& c) { mTextEnabledColor = c; } @@ -147,7 +147,6 @@ public: static void onEditorCommit(LLUICtrl* ctrl, const LLSD& userdata); static void onEditorGainFocus(LLFocusableElement* caller, void *userdata); - static void onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata); private: void updateText(); diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 9b83da13ad..ef0762fc17 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -247,7 +247,6 @@ public: LLNotificationForm(const LLSD& sd); LLNotificationForm(const std::string& name, const Params& p); - void fromLLSD(const LLSD& sd); LLSD asLLSD() const; S32 getNumElements() { return static_cast(mFormData.size()); } @@ -266,8 +265,8 @@ public: bool getIgnored(); void setIgnored(bool ignored); - EIgnoreType getIgnoreType() { return mIgnore; } - std::string getIgnoreMessage() { return mIgnoreMsg; } + EIgnoreType getIgnoreType()const { return mIgnore; } + std::string getIgnoreMessage() const { return mIgnoreMsg; } private: LLSD mFormData; @@ -971,8 +970,6 @@ private: /*virtual*/ void initSingleton() override; /*virtual*/ void cleanupSingleton() override; - void loadPersistentNotifications(); - bool expirationFilter(LLNotificationPtr pNotification); bool expirationHandler(const LLSD& payload); bool uniqueFilter(LLNotificationPtr pNotification); diff --git a/indra/llui/llprogressbar.h b/indra/llui/llprogressbar.h index 0d5d32cf21..7245bbf1cf 100644 --- a/indra/llui/llprogressbar.h +++ b/indra/llui/llprogressbar.h @@ -48,9 +48,9 @@ public: LLProgressBar(const Params&); virtual ~LLProgressBar(); - void setValue(const LLSD& value); + void setValue(const LLSD& value) override; - /*virtual*/ void draw(); + void draw() override; private: F32 mPercentDone; diff --git a/indra/llui/llresizebar.h b/indra/llui/llresizebar.h index 4b0f435834..68bf0fd95e 100644 --- a/indra/llui/llresizebar.h +++ b/indra/llui/llresizebar.h @@ -61,7 +61,7 @@ public: void setResizeLimits( S32 min_size, S32 max_size ) { mMinSize = min_size; mMaxSize = max_size; } void setEnableSnapping(bool enable) { mSnappingEnabled = enable; } void setAllowDoubleClickSnapping(bool allow) { mAllowDoubleClickSnapping = allow; } - bool canResize() { return getEnabled() && mMaxSize > mMinSize; } + bool canResize() const { return getEnabled() && mMaxSize > mMinSize; } void setResizeListener(boost::function listener) {mResizeListener = listener;} void setImagePanel(LLPanel * panelp); LLPanel * getImagePanel() const; diff --git a/indra/llui/llresizehandle.h b/indra/llui/llresizehandle.h index 9cc4123544..caec33405c 100644 --- a/indra/llui/llresizehandle.h +++ b/indra/llui/llresizehandle.h @@ -50,10 +50,10 @@ protected: LLResizeHandle(const LLResizeHandle::Params&); friend class LLUICtrlFactory; public: - virtual void draw(); - virtual bool handleHover(S32 x, S32 y, MASK mask); - virtual bool handleMouseDown(S32 x, S32 y, MASK mask); - virtual bool handleMouseUp(S32 x, S32 y, MASK mask); + void draw() override; + bool handleHover(S32 x, S32 y, MASK mask) override; + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleMouseUp(S32 x, S32 y, MASK mask) override; void setResizeLimits( S32 min_width, S32 min_height ) { mMinWidth = min_width; mMinHeight = min_height; } @@ -71,8 +71,8 @@ private: const ECorner mCorner; }; -const S32 RESIZE_HANDLE_HEIGHT = 11; -const S32 RESIZE_HANDLE_WIDTH = 11; +constexpr S32 RESIZE_HANDLE_HEIGHT = 11; +constexpr S32 RESIZE_HANDLE_WIDTH = 11; #endif // LL_RESIZEHANDLE_H diff --git a/indra/llui/llrngwriter.h b/indra/llui/llrngwriter.h index 33ec049a1a..2c39472607 100644 --- a/indra/llui/llrngwriter.h +++ b/indra/llui/llrngwriter.h @@ -37,7 +37,7 @@ public: void writeRNG(const std::string& name, LLXMLNodePtr node, const LLInitParam::BaseBlock& block, const std::string& xml_namespace); void addDefinition(const std::string& type_name, const LLInitParam::BaseBlock& block); - /*virtual*/ std::string getCurrentElementName() { return LLStringUtil::null; } + std::string getCurrentElementName() override { return LLStringUtil::null; } LLRNGWriter(); diff --git a/indra/llui/llscrolllistcell.h b/indra/llui/llscrolllistcell.h index e7ff5c8424..7dded3c0b7 100644 --- a/indra/llui/llscrolllistcell.h +++ b/indra/llui/llscrolllistcell.h @@ -105,7 +105,7 @@ public: virtual const LLSD getAltValue() const; virtual void setValue(const LLSD& value) { } virtual void setAltValue(const LLSD& value) { } - virtual const std::string &getToolTip() const { return mToolTip; } + virtual const std::string& getToolTip() const { return mToolTip; } virtual void setToolTip(const std::string &str) { mToolTip = str; } virtual bool getVisible() const { return true; } virtual void setWidth(S32 width) { mWidth = width; } diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index c24784338a..1f04100306 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -165,7 +165,6 @@ public: void deleteAllItems() { clearRows(); } // Sets an array of column descriptors - void setColumnHeadings(const LLSD& headings); void sortByColumnIndex(U32 column, bool ascending); // LLCtrlListInterface functions @@ -318,7 +317,7 @@ public: void setAllowKeyboardMovement(bool b) { mAllowKeyboardMovement = b; } void setMaxSelectable(U32 max_selected) { mMaxSelectable = max_selected; } - S32 getMaxSelectable() { return mMaxSelectable; } + S32 getMaxSelectable() const { return mMaxSelectable; } virtual S32 getScrollPos() const; @@ -334,7 +333,7 @@ public: // support right-click context menus for avatar/group lists enum ContextMenuType { MENU_NONE, MENU_AVATAR, MENU_GROUP }; void setContextMenu(const ContextMenuType &menu) { mContextMenuType = menu; } - ContextMenuType getContextMenuType() { return mContextMenuType; } + ContextMenuType getContextMenuType() const { return mContextMenuType; } // Overridden from LLView /*virtual*/ void draw(); @@ -362,7 +361,6 @@ public: virtual void fitContents(S32 max_width, S32 max_height); virtual LLRect getRequiredRect(); - static bool rowPreceeds(LLScrollListItem *new_row, LLScrollListItem *test_row); LLRect getItemListRect() { return mItemListRect; } @@ -384,7 +382,6 @@ public: * then display all items. */ void setPageLines(S32 page_lines ); - void setCollapseEmptyColumns(bool collapse); LLScrollListItem* hitItem(S32 x,S32 y); virtual void scrollToShowSelected(); @@ -401,7 +398,7 @@ public: void setNumDynamicColumns(S32 num) { mNumDynamicWidthColumns = num; } void updateStaticColumnWidth(LLScrollListColumn* col, S32 new_width); - S32 getTotalStaticColumnWidth() { return mTotalStaticColumnWidth; } + S32 getTotalStaticColumnWidth() const { return mTotalStaticColumnWidth; } std::string getSortColumnName(); bool getSortAscending() { return mSortColumns.empty() ? true : mSortColumns.back().second; } diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h index 311377a61f..23ce8fd955 100644 --- a/indra/llui/llsliderctrl.h +++ b/indra/llui/llsliderctrl.h @@ -132,7 +132,6 @@ public: static void onEditorCommit(LLUICtrl* ctrl, const LLSD& userdata); static void onEditorGainFocus(LLFocusableElement* caller, void *userdata); - static void onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata); protected: virtual std::string _getSearchText() const diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index 58b38dc630..4ba8c97c63 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -94,7 +94,6 @@ public: void onEditorCommit(const LLSD& data); static void onEditorGainFocus(LLFocusableElement* caller, void *userdata); static void onEditorLostFocus(LLFocusableElement* caller, void *userdata); - static void onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata); void onUpBtn(const LLSD& data); void onDownBtn(const LLSD& data); diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index c36a138566..bbbf0b3a19 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -67,7 +67,7 @@ public: void setStat(const std::string& stat_name); void setRange(F32 bar_min, F32 bar_max); - void getRange(F32& bar_min, F32& bar_max) { bar_min = mTargetMinBar; bar_max = mTargetMaxBar; } + void getRange(F32& bar_min, F32& bar_max) const { bar_min = mTargetMinBar; bar_max = mTargetMaxBar; } /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index d97051247e..0af717d447 100644 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -36,7 +36,6 @@ #include "llglheaders.h" #include "lltracerecording.h" #include "lltracethreadrecorder.h" -//#include "llviewercontrol.h" /////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h index c254821870..6d9e3d1064 100644 --- a/indra/llui/llstatgraph.h +++ b/indra/llui/llstatgraph.h @@ -99,9 +99,7 @@ public: void setMin(const F32 min); void setMax(const F32 max); - virtual void draw(); - - /*virtual*/ void setValue(const LLSD& value); + void draw() override; private: LLTrace::StatType* mNewStatFloatp; @@ -133,9 +131,6 @@ private: }; typedef std::vector threshold_vec_t; threshold_vec_t mThresholds; - //S32 mNumThresholds; - //F32 mThresholds[4]; - //LLColor4 mThresholdColors[4]; }; #endif // LL_LLSTATGRAPH_H diff --git a/indra/llui/llstatview.h b/indra/llui/llstatview.h index b5187f886d..a396773057 100644 --- a/indra/llui/llstatview.h +++ b/indra/llui/llstatview.h @@ -29,7 +29,6 @@ #include "llstatbar.h" #include "llcontainerview.h" -#include class LLStatBar; diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 595ab0bd2b..5e0985c79c 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1370,17 +1370,17 @@ LLPanel* LLTabContainer::getCurrentPanel() return NULL; } -S32 LLTabContainer::getCurrentPanelIndex() +S32 LLTabContainer::getCurrentPanelIndex() const { return mCurrentTabIdx; } -S32 LLTabContainer::getTabCount() +S32 LLTabContainer::getTabCount() const { return static_cast(mTabList.size()); } -LLPanel* LLTabContainer::getPanelByIndex(S32 index) +LLPanel* LLTabContainer::getPanelByIndex(S32 index) const { if (index >= 0 && index < (S32)mTabList.size()) { @@ -1389,7 +1389,7 @@ LLPanel* LLTabContainer::getPanelByIndex(S32 index) return NULL; } -S32 LLTabContainer::getIndexForPanel(LLPanel* panel) +S32 LLTabContainer::getIndexForPanel(LLPanel* panel) const { for (S32 index = 0; index < (S32)mTabList.size(); index++) { @@ -1401,7 +1401,7 @@ S32 LLTabContainer::getIndexForPanel(LLPanel* panel) return -1; } -S32 LLTabContainer::getPanelIndexByTitle(std::string_view title) +S32 LLTabContainer::getPanelIndexByTitle(std::string_view title) const { for (S32 index = 0 ; index < (S32)mTabList.size(); index++) { diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 40f272ffa8..4ac7e73d25 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -182,15 +182,15 @@ public: void removeTabPanel( LLPanel* child ); void lockTabs(S32 num_tabs = 0); void unlockTabs(); - S32 getNumLockedTabs() { return mLockedTabCount; } + S32 getNumLockedTabs() const { return mLockedTabCount; } void enableTabButton(S32 which, bool enable); void deleteAllTabs(); LLPanel* getCurrentPanel(); - S32 getCurrentPanelIndex(); - S32 getTabCount(); - LLPanel* getPanelByIndex(S32 index); - S32 getIndexForPanel(LLPanel* panel); - S32 getPanelIndexByTitle(std::string_view title); + S32 getCurrentPanelIndex() const; + S32 getTabCount() const; + LLPanel* getPanelByIndex(S32 index) const; + S32 getIndexForPanel(LLPanel* panel) const; + S32 getPanelIndexByTitle(std::string_view title) const; LLPanel* getPanelByName(std::string_view name); S32 getTotalTabWidth() const; void setCurrentTabName(const std::string& name); diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index b3fde84f5f..5cc0f03bd3 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -146,7 +146,6 @@ public: /*virtual*/ void setStyle(LLStyleConstSP style) { mStyle = style; } /*virtual*/ void setToken( LLKeywordToken* token ) { mToken = token; } /*virtual*/ LLKeywordToken* getToken() const { return mToken; } - /*virtual*/ bool getToolTip( std::string& msg ) const; /*virtual*/ void setToolTip(const std::string& tooltip); /*virtual*/ void dump() const; @@ -451,7 +450,7 @@ public: virtual void setText(const LLStringExplicit &utf8str , const LLStyle::Params& input_params = LLStyle::Params()); // uses default style /*virtual*/ const std::string& getText() const override; void setMaxTextLength(S32 length) { mMaxTextByteLength = length; } - S32 getMaxTextLength() { return mMaxTextByteLength; } + S32 getMaxTextLength() const { return mMaxTextByteLength; } // wide-char versions void setWText(const LLWString& text); @@ -490,10 +489,10 @@ public: LLRect getTextBoundingRect(); LLRect getVisibleDocumentRect() const; - S32 getVPad() { return mVPad; } - S32 getHPad() { return mHPad; } - F32 getLineSpacingMult() { return mLineSpacingMult; } - S32 getLineSpacingPixels() { return mLineSpacingPixels; } // only for multiline + S32 getVPad() const { return mVPad; } + S32 getHPad() const { return mHPad; } + F32 getLineSpacingMult() const { return mLineSpacingMult; } + S32 getLineSpacingPixels() const { return mLineSpacingPixels; } // only for multiline S32 getDocIndexFromLocalCoord( S32 local_x, S32 local_y, bool round, bool hit_past_end_of_line = true) const; LLRect getLocalRectFromDocIndex(S32 pos) const; @@ -503,7 +502,7 @@ public: bool getReadOnly() const { return mReadOnly; } void setSkipLinkUnderline(bool skip_link_underline) { mSkipLinkUnderline = skip_link_underline; } - bool getSkipLinkUnderline() { return mSkipLinkUnderline; } + bool getSkipLinkUnderline() const { return mSkipLinkUnderline; } void setParseURLs(bool parse_urls) { mParseHTML = parse_urls; } @@ -517,8 +516,8 @@ public: void endOfLine(); void startOfDoc(); void endOfDoc(); - void changePage( S32 delta ); - void changeLine( S32 delta ); + void changePage(S32 delta); + void changeLine(S32 delta); bool scrolledToStart(); bool scrolledToEnd(); @@ -680,7 +679,6 @@ protected: void appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params = LLStyle::Params()); void appendAndHighlightTextImpl(const std::string &new_text, LLTextParser::EHighlightPosition highlight_part, const LLStyle::Params& style_params, bool underline_on_hover_only, std::string tooltip = LLStringUtil::null); - S32 normalizeUri(std::string& uri); protected: // virtual diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h index a3cde45cd0..69a7567a44 100644 --- a/indra/llui/lltextbox.h +++ b/indra/llui/lltextbox.h @@ -46,32 +46,32 @@ protected: friend class LLUICtrlFactory; public: - virtual ~LLTextBox(); + ~LLTextBox() override; - /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleMouseUp(S32 x, S32 y, MASK mask) override; + bool handleHover(S32 x, S32 y, MASK mask) override; - /*virtual*/ void setEnabled(bool enabled); + void setEnabled(bool enabled) override; - /*virtual*/ void setText( const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params() ); + void setText(const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params()) override; - void setRightAlign() { mHAlign = LLFontGL::RIGHT; } - void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; } - void setClickedCallback( boost::function cb, void* userdata = NULL ); + void setRightAlign() { mHAlign = LLFontGL::RIGHT; } + void setHAlign(LLFontGL::HAlign align) { mHAlign = align; } + void setClickedCallback(boost::function cb, void* userdata = NULL); - void reshapeToFitText(bool called_from_parent = false); + void reshapeToFitText(bool called_from_parent = false); - S32 getTextPixelWidth(); - S32 getTextPixelHeight(); + S32 getTextPixelWidth(); + S32 getTextPixelHeight(); - /*virtual*/ LLSD getValue() const; - /*virtual*/ bool setTextArg( const std::string& key, const LLStringExplicit& text ); + LLSD getValue() const override; + bool setTextArg(const std::string& key, const LLStringExplicit& text) override; - void setShowCursorHand(bool show_cursor) { mShowCursorHand = show_cursor; } + void setShowCursorHand(bool show_cursor) { mShowCursorHand = show_cursor; } protected: - void onUrlLabelUpdated(const std::string &url, const std::string &label); + void onUrlLabelUpdated(const std::string& url, const std::string& label); LLUIString mText; callback_t mClickedCallback; diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index fab46a00e3..6d45a72deb 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -201,7 +201,6 @@ public: const LLUUID& getSourceID() const { return mSourceID; } const LLTextSegmentPtr getPreviousSegment() const; - const LLTextSegmentPtr getLastSegment() const; void getSelectedSegments(segment_vec_t& segments) const; void setShowContextMenu(bool show) { mShowContextMenu = show; } @@ -217,8 +216,6 @@ protected: void showContextMenu(S32 x, S32 y); void drawPreeditMarker(); - void assignEmbedded(const std::string &s); - void removeCharOrTab(); void indentSelectedLines( S32 spaces ); @@ -238,7 +235,6 @@ protected: void autoIndent(); - void findEmbeddedItemSegments(S32 start, S32 end); void getSegmentsInRange(segment_vec_t& segments, S32 start, S32 end, bool include_partial) const; virtual llwchar pasteEmbeddedItem(llwchar ext_char) { return ext_char; } @@ -307,7 +303,7 @@ private: // Methods // void pasteHelper(bool is_primary); - void cleanStringForPaste(LLWString & clean_string); + void cleanStringForPaste(LLWString& clean_string); public: template @@ -315,7 +311,7 @@ public: { pasteTextWithLinebreaksImpl(ll_convert(clean_string)); } - void pasteTextWithLinebreaksImpl(const LLWString & clean_string); + void pasteTextWithLinebreaksImpl(const LLWString& clean_string); private: void onKeyStroke(); diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index c57c979525..5556406fbd 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -68,7 +68,7 @@ public: void reshape(S32 width, S32 height, bool called_from_parent = true); void setEnabled(bool enabled); void setCommandId(const LLCommandId& id) { mId = id; } - LLCommandId getCommandId() { return mId; } + LLCommandId getCommandId() const { return mId; } void setStartDragCallback(tool_startdrag_callback_t cb) { mStartDragItemCallback = cb; } void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; } @@ -256,7 +256,7 @@ public: // Methods used in loading and saving toolbar settings void setButtonType(LLToolBarEnums::ButtonType button_type); - LLToolBarEnums::ButtonType getButtonType() { return mButtonType; } + LLToolBarEnums::ButtonType getButtonType() const { return mButtonType; } command_id_list_t& getCommandsList() { return mButtonCommands; } void clearCommandsList(); diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 86525c2f7e..74f03618cf 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -390,22 +390,22 @@ void LLToolTip::draw() } } -bool LLToolTip::isFading() +bool LLToolTip::isFading() const { return mFadeTimer.getStarted(); } -F32 LLToolTip::getVisibleTime() +F32 LLToolTip::getVisibleTime() const { return mVisibleTimer.getStarted() ? mVisibleTimer.getElapsedTimeF32() : 0.f; } -bool LLToolTip::hasClickCallback() +bool LLToolTip::hasClickCallback() const { return mHasClickCallback; } -void LLToolTip::getToolTipMessage(std::string & message) +void LLToolTip::getToolTipMessage(std::string& message) const { if (mTextBox) { diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h index 8515504e3b..760acddd6f 100644 --- a/indra/llui/lltooltip.h +++ b/indra/llui/lltooltip.h @@ -44,15 +44,15 @@ public: Params(); }; LLToolTipView(const LLToolTipView::Params&); - /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleMiddleMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleScrollWheel( S32 x, S32 y, S32 clicks ); + bool handleHover(S32 x, S32 y, MASK mask) override; + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleMiddleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; + bool handleScrollWheel( S32 x, S32 y, S32 clicks ) override; void drawStickyRect(); - /*virtual*/ void draw(); + void draw() override; }; class LLToolTip : public LLPanel @@ -98,20 +98,20 @@ public: Params(); }; - /*virtual*/ void draw(); - /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); - /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); - /*virtual*/ void setVisible(bool visible); + void draw() override; + bool handleHover(S32 x, S32 y, MASK mask) override; + void onMouseLeave(S32 x, S32 y, MASK mask) override; + void setVisible(bool visible) override; - bool isFading(); - F32 getVisibleTime(); - bool hasClickCallback(); + bool isFading() const; + F32 getVisibleTime() const; + bool hasClickCallback() const; LLToolTip(const Params& p); virtual void initFromParams(const LLToolTip::Params& params); - void getToolTipMessage(std::string & message); - bool isTooltipPastable() { return mIsTooltipPastable; } + void getToolTipMessage(std::string & message) const; + bool isTooltipPastable() const { return mIsTooltipPastable; } protected: void updateTextBox(); diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 375cd539b7..051ecc4405 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -156,7 +156,7 @@ public: sanitizeRange(); } - S32 clamp(S32 input) + S32 clamp(S32 input) const { if (input < mMin) return mMin; if (input > mMax) return mMax; @@ -170,8 +170,8 @@ public: sanitizeRange(); } - S32 getMin() { return mMin; } - S32 getMax() { return mMax; } + S32 getMin() const { return mMin; } + S32 getMax() const { return mMax; } bool operator==(const RangeS32& other) const { @@ -225,7 +225,7 @@ public: mValue = clamp(value); } - S32 get() + S32 get() const { return mValue; } @@ -255,7 +255,7 @@ public: static std::string getLanguage(); // static for lldateutil_test compatibility //helper functions (should probably move free standing rendering helper functions here) - LLView* getRootView() { return mRootView; } + LLView* getRootView() const { return mRootView; } void setRootView(LLView* view) { mRootView = view; } /** * Walk the LLView tree to resolve a path @@ -298,7 +298,7 @@ public: LLControlGroup& getControlControlGroup (std::string_view controlname); F32 getMouseIdleTime() { return mMouseIdleTimer.getElapsedTimeF32(); } void resetMouseIdleTimer() { mMouseIdleTimer.reset(); } - LLWindow* getWindow() { return mWindow; } + LLWindow* getWindow() const { return mWindow; } void addPopup(LLView*); void removePopup(LLView*); diff --git a/indra/llui/lluiconstants.h b/indra/llui/lluiconstants.h index 5fdfd37c6e..a317c66008 100644 --- a/indra/llui/lluiconstants.h +++ b/indra/llui/lluiconstants.h @@ -28,23 +28,23 @@ #define LL_LLUICONSTANTS_H // spacing for small font lines of text, like LLTextBoxes -const S32 LINE = 16; +constexpr S32 LINE = 16; // spacing for larger lines of text -const S32 LINE_BIG = 24; +constexpr S32 LINE_BIG = 24; // default vertical padding -const S32 VPAD = 4; +constexpr S32 VPAD = 4; // default horizontal padding -const S32 HPAD = 4; +constexpr S32 HPAD = 4; // Account History, how far to look into past -const S32 SUMMARY_INTERVAL = 7; // one week -const S32 SUMMARY_MAX = 8; // -const S32 DETAILS_INTERVAL = 1; // one day -const S32 DETAILS_MAX = 30; // one month -const S32 TRANSACTIONS_INTERVAL = 1;// one day -const S32 TRANSACTIONS_MAX = 30; // one month +constexpr S32 SUMMARY_INTERVAL = 7; // one week +constexpr S32 SUMMARY_MAX = 8; // +constexpr S32 DETAILS_INTERVAL = 1; // one day +constexpr S32 DETAILS_MAX = 30; // one month +constexpr S32 TRANSACTIONS_INTERVAL = 1;// one day +constexpr S32 TRANSACTIONS_MAX = 30; // one month #endif diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 2c73ff6b57..b95c221d68 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -39,9 +39,9 @@ #include "llviewmodel.h" // *TODO move dependency to .cpp file #include "llsearchablecontrol.h" -const bool TAKE_FOCUS_YES = true; -const bool TAKE_FOCUS_NO = false; -const S32 DROP_SHADOW_FLOATER = 5; +constexpr bool TAKE_FOCUS_YES = true; +constexpr bool TAKE_FOCUS_NO = false; +constexpr S32 DROP_SHADOW_FLOATER = 5; class LLUICtrl : public LLView, public boost::signals2::trackable diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 75e7e396bc..91221dc7f3 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -184,7 +184,7 @@ fail: template static T* getDefaultWidget(std::string_view name) { - typename T::Params widget_params; + typename T::Params widget_params{}; widget_params.name = std::string(name); return create(widget_params); } diff --git a/indra/llui/llundo.h b/indra/llui/llundo.h index dc40702be0..990745e530 100644 --- a/indra/llui/llundo.h +++ b/indra/llui/llundo.h @@ -42,7 +42,7 @@ public: LLUndoAction(): mClusterID(0) {}; virtual ~LLUndoAction(){}; private: - S32 mClusterID; + S32 mClusterID; }; LLUndoBuffer( LLUndoAction (*create_func()), S32 initial_count ); @@ -51,8 +51,8 @@ public: LLUndoAction *getNextAction(bool setClusterBegin = true); bool undoAction(); bool redoAction(); - bool canUndo() { return (mNextAction != mFirstAction); } - bool canRedo() { return (mNextAction != mLastAction); } + bool canUndo() const { return (mNextAction != mFirstAction); } + bool canRedo() const { return (mNextAction != mLastAction); } void flushActions(); diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h index 0f54b66299..ac9741a7ad 100644 --- a/indra/llui/llurlaction.h +++ b/indra/llui/llurlaction.h @@ -45,8 +45,6 @@ class LLUrlAction { public: - LLUrlAction(); - /// load a Url in the user's preferred web browser static void openURL(std::string url); diff --git a/indra/llui/llurlmatch.h b/indra/llui/llurlmatch.h index ba822fbda6..887796bb37 100644 --- a/indra/llui/llurlmatch.h +++ b/indra/llui/llurlmatch.h @@ -31,7 +31,6 @@ //#include "linden_common.h" #include -#include #include "llstyle.h" /// diff --git a/indra/llui/llurlregistry.h b/indra/llui/llurlregistry.h index 64cfec3960..c22af0dbc4 100644 --- a/indra/llui/llurlregistry.h +++ b/indra/llui/llurlregistry.h @@ -34,7 +34,6 @@ #include "llstring.h" #include -#include class LLKeyBindingToStringHandler; diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 710ec3d05e..97212a9d2d 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -54,17 +54,17 @@ class LLSD; -const U32 FOLLOWS_NONE = 0x00; -const U32 FOLLOWS_LEFT = 0x01; -const U32 FOLLOWS_RIGHT = 0x02; -const U32 FOLLOWS_TOP = 0x10; -const U32 FOLLOWS_BOTTOM = 0x20; -const U32 FOLLOWS_ALL = 0x33; +constexpr U32 FOLLOWS_NONE = 0x00; +constexpr U32 FOLLOWS_LEFT = 0x01; +constexpr U32 FOLLOWS_RIGHT = 0x02; +constexpr U32 FOLLOWS_TOP = 0x10; +constexpr U32 FOLLOWS_BOTTOM = 0x20; +constexpr U32 FOLLOWS_ALL = 0x33; -const bool MOUSE_OPAQUE = true; -const bool NOT_MOUSE_OPAQUE = false; +constexpr bool MOUSE_OPAQUE = true; +constexpr bool NOT_MOUSE_OPAQUE = false; -const U32 GL_NAME_UI_RESERVED = 2; +constexpr U32 GL_NAME_UI_RESERVED = 2; // maintains render state during traversal of UI tree @@ -241,7 +241,7 @@ public: void setUseBoundingRect( bool use_bounding_rect ); bool getUseBoundingRect() const; - ECursorType getHoverCursor() { return mHoverCursor; } + ECursorType getHoverCursor() const { return mHoverCursor; } static F32 getTooltipTimeout(); virtual const std::string getToolTip() const; @@ -265,7 +265,7 @@ public: void setDefaultTabGroup(S32 d) { mDefaultTabGroup = d; } S32 getDefaultTabGroup() const { return mDefaultTabGroup; } - S32 getLastTabGroup() { return mLastTabGroup; } + S32 getLastTabGroup() const { return mLastTabGroup; } bool isInVisibleChain() const; bool isInEnabledChain() const; diff --git a/indra/llui/llviewborder.h b/indra/llui/llviewborder.h index 1f118a0d20..a4bb748b77 100644 --- a/indra/llui/llviewborder.h +++ b/indra/llui/llviewborder.h @@ -92,7 +92,6 @@ public: private: void drawOnePixelLines(); void drawTwoPixelLines(); - void drawTextures(); EBevel mBevel; EStyle mStyle; diff --git a/indra/llui/llviewereventrecorder.h b/indra/llui/llviewereventrecorder.h index 9e752e8090..5636c068d8 100644 --- a/indra/llui/llviewereventrecorder.h +++ b/indra/llui/llviewereventrecorder.h @@ -61,7 +61,7 @@ public: std::string get_xui(); void update_xui(std::string xui); - bool getLoggingStatus(){return logEvents;}; + bool getLoggingStatus() const { return logEvents; } void setEventLoggingOn(); void setEventLoggingOff(); diff --git a/indra/llui/llvirtualtrackball.h b/indra/llui/llvirtualtrackball.h index 61a78b2398..fbfda04585 100644 --- a/indra/llui/llvirtualtrackball.h +++ b/indra/llui/llvirtualtrackball.h @@ -78,20 +78,20 @@ public: }; - virtual ~LLVirtualTrackball(); - /*virtual*/ bool postBuild(); + ~LLVirtualTrackball() override; + bool postBuild() override; - virtual bool handleHover(S32 x, S32 y, MASK mask); - virtual bool handleMouseUp(S32 x, S32 y, MASK mask); - virtual bool handleMouseDown(S32 x, S32 y, MASK mask); - virtual bool handleRightMouseDown(S32 x, S32 y, MASK mask); - virtual bool handleKeyHere(KEY key, MASK mask); + bool handleHover(S32 x, S32 y, MASK mask) override; + bool handleMouseUp(S32 x, S32 y, MASK mask) override; + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; + bool handleKeyHere(KEY key, MASK mask) override; - virtual void draw(); + void draw() override; - virtual void setValue(const LLSD& value); - void setValue(F32 x, F32 y, F32 z, F32 w); - virtual LLSD getValue() const; + void setValue(const LLSD& value) override; + void setValue(F32 x, F32 y, F32 z, F32 w); + LLSD getValue() const override; void setRotation(const LLQuaternion &value); LLQuaternion getRotation() const; @@ -102,7 +102,6 @@ public: protected: friend class LLUICtrlFactory; LLVirtualTrackball(const Params&); - void onEditChange(); protected: LLTextBox* mNLabel; diff --git a/indra/llui/llwindowshade.h b/indra/llui/llwindowshade.h index da29188943..ee230cd2f6 100644 --- a/indra/llui/llwindowshade.h +++ b/indra/llui/llwindowshade.h @@ -49,7 +49,7 @@ public: }; void show(LLNotificationPtr); - /*virtual*/ void draw(); + void draw() override; void hide(); bool isShown() const; diff --git a/indra/llui/llxyvector.h b/indra/llui/llxyvector.h index bc41213c13..646771f387 100644 --- a/indra/llui/llxyvector.h +++ b/indra/llui/llxyvector.h @@ -65,18 +65,18 @@ public: }; - virtual ~LLXYVector(); - /*virtual*/ bool postBuild(); + ~LLXYVector() override; + bool postBuild() override; - virtual bool handleHover(S32 x, S32 y, MASK mask); - virtual bool handleMouseUp(S32 x, S32 y, MASK mask); - virtual bool handleMouseDown(S32 x, S32 y, MASK mask); + bool handleHover(S32 x, S32 y, MASK mask) override; + bool handleMouseUp(S32 x, S32 y, MASK mask) override; + bool handleMouseDown(S32 x, S32 y, MASK mask) override; - virtual void draw(); + void draw() override; - virtual void setValue(const LLSD& value); - void setValue(F32 x, F32 y); - virtual LLSD getValue() const; + void setValue(const LLSD& value) override; + void setValue(F32 x, F32 y); + LLSD getValue() const override; protected: friend class LLUICtrlFactory; -- cgit v1.2.3 From 6181a79170bce2987c1d98ec69ab7d69d4c7f138 Mon Sep 17 00:00:00 2001 From: Rye Cogtail Date: Thu, 3 Oct 2024 03:23:29 -0400 Subject: Fix LLFlatListView::getRequiredRect not overriding base class warning --- indra/llui/llflatlistview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 3c40f91ab0..112c330a15 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -126,7 +126,7 @@ public: /** Returns full rect of child panel */ const LLRect& getItemsRect() const; - LLRect getRequiredRect() const { return getItemsRect(); } + LLRect getRequiredRect() { return getItemsRect(); } /** Returns distance between items */ const S32 getItemsPad() const { return mItemPad; } -- cgit v1.2.3 From b33beb0fdb503544b1fd26da0341d5b406ffd8e4 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 3 Oct 2024 19:05:17 +0200 Subject: #2408 The long covenant with emojis (crash fix) --- indra/llui/llstyle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp index f1d57a2273..aafcfbc143 100644 --- a/indra/llui/llstyle.cpp +++ b/indra/llui/llstyle.cpp @@ -66,9 +66,9 @@ LLStyle* LLStyle::makeCopy() const copy->mDropShadow = mDropShadow; copy->mFontName = mFontName; copy->mLink = mLink; - copy->mColor = mColor; - copy->mReadOnlyColor = mReadOnlyColor; - copy->mSelectedColor = mSelectedColor; + copy->mColor.set(mColor.get()); + copy->mReadOnlyColor.set(mReadOnlyColor.get()); + copy->mSelectedColor.set(mSelectedColor.get()); copy->mFont = mFont; copy->mImagep = mImagep; copy->mAlpha = mAlpha; -- cgit v1.2.3