diff options
Diffstat (limited to 'indra/newview')
521 files changed, 2020 insertions, 2066 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index d69be4c8fb..a7a987bf8a 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -500,9 +500,9 @@ bool LLAvatarList::handleHover(S32 x, S32 y, MASK mask) return handled; } -void LLAvatarList::setVisible(BOOL visible) +void LLAvatarList::setVisible(bool visible) { - if ( visible == FALSE && mContextMenu ) + if ( visible == false && mContextMenu ) { mContextMenu->hide(); } diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 0a9d32c4a9..33c9c2aaed 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -65,7 +65,7 @@ public: virtual void clear(); - virtual void setVisible(BOOL visible); + virtual void setVisible(bool visible); void setNameFilter(const std::string& filter); void setDirty(bool val = true, bool force_refresh = false); diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 6b87d52064..0df3f156ef 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -103,7 +103,7 @@ LLAvatarListItem::~LLAvatarListItem() } } -BOOL LLAvatarListItem::postBuild() +bool LLAvatarListItem::postBuild() { mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); mAvatarName = getChild<LLTextBox>("avatar_name"); @@ -141,10 +141,10 @@ BOOL LLAvatarListItem::postBuild() sStaticInitialized = true; } - return TRUE; + return true; } -void LLAvatarListItem::handleVisibilityChange ( BOOL new_visibility ) +void LLAvatarListItem::handleVisibilityChange ( bool new_visibility ) { //Adjust positions of icons (info button etc) when //speaking indicator visibility was changed/toggled while panel was closed (not visible) diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index f542fe2121..222b4089c3 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -79,12 +79,12 @@ public: LLAvatarListItem(bool not_from_ui_factory = true); virtual ~LLAvatarListItem(); - virtual BOOL postBuild(); + virtual bool postBuild(); /** * Processes notification from speaker indicator to update children when indicator's visibility is changed. */ - virtual void handleVisibilityChange ( BOOL new_visibility ); + virtual void handleVisibilityChange ( bool new_visibility ); virtual S32 notifyParent(const LLSD& info); virtual void onMouseLeave(S32 x, S32 y, MASK mask); virtual void onMouseEnter(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llblockedlistitem.cpp b/indra/newview/llblockedlistitem.cpp index d9afd2b629..5346b39120 100644 --- a/indra/newview/llblockedlistitem.cpp +++ b/indra/newview/llblockedlistitem.cpp @@ -51,7 +51,7 @@ LLBlockedListItem::LLBlockedListItem(const LLMute* item) buildFromFile("panel_blocked_list_item.xml"); } -BOOL LLBlockedListItem::postBuild() +bool LLBlockedListItem::postBuild() { mTitleCtrl = getChild<LLTextBox>("item_name"); mTitleCtrl->setValue(mItemName); @@ -62,27 +62,27 @@ BOOL LLBlockedListItem::postBuild() case LLMute::EXTERNAL: { LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon"); - avatar_icon->setVisible(TRUE); + avatar_icon->setVisible(true); avatar_icon->setValue(mItemID); } break; case LLMute::GROUP: { LLGroupIconCtrl* group_icon = getChild<LLGroupIconCtrl>("group_icon"); - group_icon->setVisible(TRUE); + group_icon->setVisible(true); group_icon->setValue(mItemID); } break; case LLMute::OBJECT: case LLMute::BY_NAME: - getChild<LLUICtrl>("object_icon")->setVisible(TRUE); + getChild<LLUICtrl>("object_icon")->setVisible(true); break; default: break; } - return TRUE; + return true; } void LLBlockedListItem::onMouseEnter(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llblockedlistitem.h b/indra/newview/llblockedlistitem.h index 05409e8a3b..508614366a 100644 --- a/indra/newview/llblockedlistitem.h +++ b/indra/newview/llblockedlistitem.h @@ -49,7 +49,7 @@ class LLBlockedListItem : public LLPanel public: LLBlockedListItem(const LLMute* item); - virtual BOOL postBuild(); + virtual bool postBuild(); void onMouseEnter(S32 x, S32 y, MASK mask); void onMouseLeave(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 8d3323aa66..cf5aafb845 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -63,7 +63,7 @@ // // Globals // -const F32 AGENT_TYPING_TIMEOUT = 5.f; // seconds +constexpr F32 AGENT_TYPING_TIMEOUT = 5.f; // seconds LLChatBar *gChatBar = NULL; @@ -105,7 +105,7 @@ LLChatBar::~LLChatBar() // LLView destructor cleans up children } -BOOL LLChatBar::postBuild() +bool LLChatBar::postBuild() { getChild<LLUICtrl>("Say")->setCommitCallback(boost::bind(&LLChatBar::onClickSay, this, _1)); @@ -129,7 +129,7 @@ BOOL LLChatBar::postBuild() mIsBuilt = TRUE; - return TRUE; + return true; } //----------------------------------------------------------------------- @@ -137,9 +137,9 @@ BOOL LLChatBar::postBuild() //----------------------------------------------------------------------- // virtual -BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) +bool LLChatBar::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if( KEY_RETURN == key ) { @@ -147,13 +147,13 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) { // shout sendChat(CHAT_TYPE_SHOUT); - handled = TRUE; + handled = true; } else if (mask == MASK_NONE) { // say sendChat( CHAT_TYPE_NORMAL ); - handled = TRUE; + handled = true; } } // only do this in main chatbar @@ -161,7 +161,7 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) { stopChat(); - handled = TRUE; + handled = true; } return handled; diff --git a/indra/newview/llchatbar.h b/indra/newview/llchatbar.h index 26ef5f1535..47f850ec88 100644 --- a/indra/newview/llchatbar.h +++ b/indra/newview/llchatbar.h @@ -47,9 +47,9 @@ public: // constructor for inline chat-bars (e.g. hosted in chat history window) LLChatBar(); ~LLChatBar(); - virtual BOOL postBuild(); + virtual bool postBuild(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); void refresh(); void refreshGestures(); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 707b1ceda8..fbcff0fc5a 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -577,7 +577,7 @@ public: return false; } - BOOL postBuild() + bool postBuild() { setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this)); diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 7ec1ebb9f7..f6cb39485a 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -43,9 +43,9 @@ #include "llslurl.h" -static const S32 msg_left_offset = 10; -static const S32 msg_right_offset = 10; -static const S32 msg_height_pad = 5; +static constexpr S32 msg_left_offset = 10; +static constexpr S32 msg_right_offset = 10; +static constexpr S32 msg_height_pad = 5; //******************************************************************************************************************* // LLObjectHandler @@ -93,7 +93,7 @@ LLFloaterIMNearbyChatToastPanel* LLFloaterIMNearbyChatToastPanel::createInstance return item; } -void LLFloaterIMNearbyChatToastPanel::reshape (S32 width, S32 height, BOOL called_from_parent ) +void LLFloaterIMNearbyChatToastPanel::reshape (S32 width, S32 height, bool called_from_parent ) { LLPanel::reshape(width, height,called_from_parent); @@ -122,7 +122,7 @@ void LLFloaterIMNearbyChatToastPanel::reshape (S32 width, S32 height, BOOL call msg_text->setRect(msg_text_rect); } -BOOL LLFloaterIMNearbyChatToastPanel::postBuild() +bool LLFloaterIMNearbyChatToastPanel::postBuild() { return LLPanel::postBuild(); } diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h index c8c95426f8..1a6ad57641 100644 --- a/indra/newview/llchatitemscontainerctrl.h +++ b/indra/newview/llchatitemscontainerctrl.h @@ -69,9 +69,9 @@ public: bool handleMouseDown (S32 x, S32 y, MASK mask); bool handleMouseUp (S32 x, S32 y, MASK mask); - virtual BOOL postBuild(); + virtual bool postBuild(); - void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE); + void reshape (S32 width, S32 height, bool called_from_parent = true); void setHeaderVisibility(EShowItemHeader e); bool handleRightMouseDown(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 5bd37b2158..6239c0946c 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -334,12 +334,12 @@ LLIMChiclet::~LLIMChiclet() } /* virtual*/ -BOOL LLIMChiclet::postBuild() +bool LLIMChiclet::postBuild() { mChicletButton = getChild<LLButton>("chiclet_button"); mChicletButton->setCommitCallback(boost::bind(&LLIMChiclet::onMouseDown, this)); mChicletButton->setDoubleClickCallback(boost::bind(&LLIMChiclet::onMouseDown, this)); - return TRUE; + return true; } void LLIMChiclet::enableCounterControl(bool enable) @@ -498,7 +498,7 @@ void LLChicletPanel::objectChicletCallback(const LLSD& data) } } -BOOL LLChicletPanel::postBuild() +bool LLChicletPanel::postBuild() { LLPanel::postBuild(); LLIMModel::instance().addNewMsgCallback(boost::bind(&LLChicletPanel::onMessageCountChanged, this, _1)); @@ -520,7 +520,7 @@ BOOL LLChicletPanel::postBuild() mRightScrollButton->setHeldDownCallback(boost::bind(&LLChicletPanel::onRightScrollHeldDown,this)); mRightScrollButton->setEnabled(false); - return TRUE; + return true; } void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id) @@ -706,7 +706,7 @@ void LLChicletPanel::scrollToChiclet(const LLChiclet* chiclet) } } -void LLChicletPanel::reshape(S32 width, S32 height, BOOL called_from_parent ) +void LLChicletPanel::reshape(S32 width, S32 height, bool called_from_parent ) { LLPanel::reshape(width,height,called_from_parent); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 7056b1be14..4e54712d74 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -257,7 +257,7 @@ public: /** * It is used for default setting up of chicklet:click handler, etc. */ - BOOL postBuild(); + bool postBuild(); /** * Sets IM session name. This name will be displayed in chiclet tooltip. @@ -660,7 +660,7 @@ public: boost::signals2::connection setChicletClickedCallback( const commit_callback_t& cb); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** * Handler for the Voice Client's signal. Finds a corresponding chiclet and toggles its SpeakerControl @@ -670,7 +670,7 @@ public: /** * Reshapes controls and rearranges chiclets if needed. */ - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE ); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true ); /*virtual*/ void draw(); diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index 91b9d68fd2..f9490dcba4 100644 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -45,7 +45,7 @@ LLChicletBar::LLChicletBar() buildFromFile("panel_chiclet_bar.xml"); } -BOOL LLChicletBar::postBuild() +bool LLChicletBar::postBuild() { mToolbarStack = getChild<LLLayoutStack>("toolbar_stack"); mChicletPanel = getChild<LLChicletPanel>("chiclet_list"); @@ -55,7 +55,7 @@ BOOL LLChicletBar::postBuild() LLPanelTopInfoBar::instance().setResizeCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); LLPanelTopInfoBar::instance().setVisibleCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); - return TRUE; + return true; } void LLChicletBar::showWellButton(const std::string& well_name, bool visible) @@ -78,7 +78,7 @@ void LLChicletBar::log(LLView* panel, const std::string& descr) << LL_ENDL; } -void LLChicletBar::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLChicletBar::reshape(S32 width, S32 height, bool called_from_parent) { static S32 debug_calling_number = 0; LL_DEBUGS() << "**************************************** " << ++debug_calling_number << LL_ENDL; diff --git a/indra/newview/llchicletbar.h b/indra/newview/llchicletbar.h index 6c521dc1d5..fb8c6d400a 100644 --- a/indra/newview/llchicletbar.h +++ b/indra/newview/llchicletbar.h @@ -43,11 +43,11 @@ class LLChicletBar public: - BOOL postBuild(); + bool postBuild() override; LLChicletPanel* getChicletPanel() { return mChicletPanel; } - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); + void reshape(S32 width, S32 height, bool called_from_parent) override; /** diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index aa2ba752b7..bb3ce9eb00 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -307,7 +307,7 @@ LLCOFWearables::~LLCOFWearables() } // virtual -BOOL LLCOFWearables::postBuild() +bool LLCOFWearables::postBuild() { mAttachments = getChild<LLFlatListView>("list_attachments"); mClothing = getChild<LLFlatListView>("list_clothing"); diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index 9957d6a64e..53d39671f6 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -68,7 +68,7 @@ public: LLCOFWearables(); virtual ~LLCOFWearables(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); LLUUID getSelectedUUID(); bool getSelectedUUIDs(uuid_vec_t& selected_ids); diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index e4d0c26c11..e0673e04cd 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -253,7 +253,7 @@ void LLColorSwatchCtrl::draw() LLUICtrl::draw(); } -void LLColorSwatchCtrl::setEnabled( BOOL enabled ) +void LLColorSwatchCtrl::setEnabled( bool enabled ) { mCaption->setEnabled( enabled ); LLView::setEnabled( enabled ); diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index 80826da73b..c02919064e 100644 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -95,7 +95,7 @@ public: /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); /*virtual*/ bool handleUnicodeCharHere(llwchar uni_char); /*virtual*/ void draw(); - /*virtual*/ void setEnabled( BOOL enabled ); + /*virtual*/ void setEnabled( bool enabled ); static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE ); void closeFloaterColorPicker(); diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index eb2c156ca5..c93ce2c6a3 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -194,12 +194,12 @@ LLFloaterScriptQueue::~LLFloaterScriptQueue() { } -BOOL LLFloaterScriptQueue::postBuild() +bool LLFloaterScriptQueue::postBuild() { childSetAction("close",onCloseBtn,this); - getChildView("close")->setEnabled(FALSE); + getChildView("close")->setEnabled(false); setVisible(true); - return TRUE; + return true; } // static diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index a9bac345b5..1f36a775b0 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -53,7 +53,7 @@ public: LLFloaterScriptQueue(const LLSD& key); virtual ~LLFloaterScriptQueue(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void setMono(bool mono) { mMono = mono; } diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp index 4e984d603b..94628e3bf9 100644 --- a/indra/newview/llconversationloglistitem.cpp +++ b/indra/newview/llconversationloglistitem.cpp @@ -62,7 +62,7 @@ LLConversationLogListItem::~LLConversationLogListItem() mIMFloaterShowedConnection.disconnect(); } -BOOL LLConversationLogListItem::postBuild() +bool LLConversationLogListItem::postBuild() { initIcons(); @@ -77,7 +77,7 @@ BOOL LLConversationLogListItem::postBuild() getChild<LLButton>("delete_btn")->setClickedCallback(boost::bind(&LLConversationLogListItem::onRemoveBtnClicked, this)); setDoubleClickCallback(boost::bind(&LLConversationLogListItem::onDoubleClick, this)); - return TRUE; + return true; } void LLConversationLogListItem::initIcons() diff --git a/indra/newview/llconversationloglistitem.h b/indra/newview/llconversationloglistitem.h index ee28456bbb..55c3377302 100644 --- a/indra/newview/llconversationloglistitem.h +++ b/indra/newview/llconversationloglistitem.h @@ -53,7 +53,7 @@ public: virtual void setValue(const LLSD& value); - virtual BOOL postBuild(); + virtual bool postBuild(); void onIMFloaterShown(const LLUUID& session_id); void onRemoveBtnClicked(); diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 3f426327b0..497046ee7e 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -75,27 +75,27 @@ public: virtual std::string getSearchableUUIDString() const {return LLStringUtil::null;} virtual const LLUUID& getUUID() const { return mUUID; } virtual time_t getCreationDate() const { return 0; } - virtual LLPointer<LLUIImage> getIcon() const { return NULL; } + virtual LLPointer<LLUIImage> getIcon() const { return nullptr; } virtual LLPointer<LLUIImage> getOpenIcon() const { return getIcon(); } virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } - virtual BOOL isItemRenameable() const { return TRUE; } + virtual bool isItemRenameable() const { return true; } virtual bool renameItem(const std::string& new_name) { mName = new_name; mNeedsRefresh = true; return true; } - virtual BOOL isItemMovable( void ) const { return FALSE; } - virtual BOOL isItemRemovable( void ) const { return FALSE; } - virtual BOOL isItemInTrash( void) const { return FALSE; } - virtual BOOL removeItem() { return FALSE; } + virtual bool isItemMovable( void ) const { return false; } + virtual bool isItemRemovable( void ) const { return false; } + virtual bool isItemInTrash( void) const { return false; } + virtual bool removeItem() { return false; } virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch) { } virtual void move( LLFolderViewModelItem* parent_listener ) { } virtual bool isItemCopyable(bool can_copy_as_link = true) const { return false; } - virtual BOOL copyToClipboard() const { return FALSE; } - virtual BOOL cutToClipboard() { return FALSE; } - virtual BOOL isClipboardPasteable() const { return FALSE; } + virtual bool copyToClipboard() const { return false; } + virtual bool cutToClipboard() { return false; } + virtual bool isClipboardPasteable() const { return false; } virtual void pasteFromClipboard() { } virtual void pasteLinkFromClipboard() { } virtual void buildContextMenu(LLMenuGL& menu, U32 flags) { } - virtual BOOL isUpToDate() const { return TRUE; } - virtual bool hasChildren() const { return FALSE; } + virtual bool isUpToDate() const { return true; } + virtual bool hasChildren() const { return false; } virtual void addChild(LLFolderViewModelItem* child); virtual bool potentiallyVisible() { return true; } @@ -122,10 +122,10 @@ public: // performed, and will set drop to TRUE if a drop is // requested. // Returns TRUE if a drop is possible/happened, FALSE otherwise. - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, - std::string& tooltip_msg) { return FALSE; } + std::string& tooltip_msg) { return false; } // bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); } bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } @@ -159,7 +159,7 @@ public: LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); /*virtual*/ bool hasChildren() const; - LLPointer<LLUIImage> getIcon() const { return NULL; } + LLPointer<LLUIImage> getIcon() const { return nullptr; } void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; } void addParticipant(LLConversationItemParticipant* participant); void updateName(LLConversationItemParticipant* participant); diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 884d9376ec..5e18f7e045 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -204,7 +204,7 @@ bool LLConversationViewSession::isHighlightActive() return (mFlashStateOn ? (mFlashTimer->isFlashingInProgress() ? mFlashTimer->isCurrentlyHighlighted() : true) : mIsCurSelection); } -BOOL LLConversationViewSession::postBuild() +bool LLConversationViewSession::postBuild() { LLFolderViewItem::postBuild(); @@ -276,7 +276,7 @@ BOOL LLConversationViewSession::postBuild() refresh(); // requires vmi } - return TRUE; + return true; } void LLConversationViewSession::draw() @@ -614,7 +614,7 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti addChild(outputMonitor); } -BOOL LLConversationViewParticipant::postBuild() +bool LLConversationViewParticipant::postBuild() { mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); @@ -638,7 +638,7 @@ BOOL LLConversationViewParticipant::postBuild() LLFolderViewItem::postBuild(); refresh(); } - return TRUE; + return true; } void LLConversationViewParticipant::draw() diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index fc5b0c21e8..5fb7dbb79e 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -69,7 +69,7 @@ public: /*virtual*/ void destroyView(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); /*virtual*/ bool handleMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ bool handleRightMouseDown( S32 x, S32 y, MASK mask ); @@ -158,7 +158,7 @@ protected: friend class LLUICtrlFactory; LLConversationViewParticipant( const Params& p ); void initFromParams(const Params& params); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void draw(); /*virtual*/ S32 arrange(S32* width, S32* height); diff --git a/indra/newview/lldndbutton.cpp b/indra/newview/lldndbutton.cpp index 7c9dda6b1d..b8d5336ae4 100644 --- a/indra/newview/lldndbutton.cpp +++ b/indra/newview/lldndbutton.cpp @@ -35,7 +35,7 @@ LLDragAndDropButton::LLDragAndDropButton(const Params& params) : LLButton(params) {} -BOOL LLDragAndDropButton::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) +bool LLDragAndDropButton::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { if (mDragDropHandler) { diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h index 53ea2f5ea7..4f77219582 100644 --- a/indra/newview/lldndbutton.h +++ b/indra/newview/lldndbutton.h @@ -64,9 +64,9 @@ public: /** * Process Drag-And-Drop by delegating the event to drag_drop_handler_t. * - * @return BOOL - value returned by drag_drop_handler_t if it is set, FALSE otherwise. + * @return bool - value returned by drag_drop_handler_t if it is set, FALSE otherwise. */ - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 09cd7cb345..dea09276c2 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -119,7 +119,7 @@ LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) setMaxTextLength(p.max_text_length); } -void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, bool called_from_parent) { LLTextEditor::reshape(width, height, called_from_parent); } @@ -430,7 +430,7 @@ void LLExpandableTextBox::updateTextShape() updateTextBoxRect(); } -void LLExpandableTextBox::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLExpandableTextBox::reshape(S32 width, S32 height, bool called_from_parent) { mExpanded = false; LLUICtrl::reshape(width, height, called_from_parent); diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index aaf393277f..440262a522 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -52,7 +52,7 @@ protected: }; // adds or removes "More" link as needed - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); /*virtual*/ void setText(const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params()); void setTextBase(const std::string& text) { LLTextBase::setText(text); } @@ -147,7 +147,7 @@ public: * *HACK: Update the inner textbox shape. */ void updateTextShape(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); /** * Draws text box, collapses text box if its expanded and its parent's position changed diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index b5650d719d..ee1e0ed00f 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -59,11 +59,11 @@ using namespace LLTrace; -static const S32 MAX_VISIBLE_HISTORY = 12; -static const S32 LINE_GRAPH_HEIGHT = 240; -static const S32 MIN_BAR_HEIGHT = 3; -static const S32 RUNNING_AVERAGE_WIDTH = 100; -static const S32 NUM_FRAMES_HISTORY = 200; +static constexpr S32 MAX_VISIBLE_HISTORY = 12; +static constexpr S32 LINE_GRAPH_HEIGHT = 240; +static constexpr S32 MIN_BAR_HEIGHT = 3; +static constexpr S32 RUNNING_AVERAGE_WIDTH = 100; +static constexpr S32 NUM_FRAMES_HISTORY = 200; std::vector<BlockTimerStatHandle*> ft_display_idx; // line of table entry for display purposes (for collapse) @@ -126,13 +126,13 @@ void LLFastTimerView::setPauseState(bool pause_state) mPauseHistory = pause_state; } -BOOL LLFastTimerView::postBuild() +bool LLFastTimerView::postBuild() { LLButton& pause_btn = getChildRef<LLButton>("pause_btn"); mScrollBar = getChild<LLScrollbar>("scroll_vert"); pause_btn.setCommitCallback(boost::bind(&LLFastTimerView::onPause, this)); - return TRUE; + return true; } bool LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 2207188009..b1320f74c8 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -40,7 +40,7 @@ class LLFastTimerView : public LLFloater public: LLFastTimerView(const LLSD&); ~LLFastTimerView(); - BOOL postBuild(); + bool postBuild(); static BOOL sAnalyzePerformance; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 84de9c594c..8f658b7de9 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -287,7 +287,7 @@ class LLFavoriteLandmarkToggleableMenu : public LLToggleableMenu { public: // virtual - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override { mToolbar->handleDragAndDropToMenu(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); @@ -304,7 +304,7 @@ public: } // virtual - void setVisible(BOOL visible) override + void setVisible(bool visible) override { // Avoid of hiding the menu during hovering if (visible || !mIsHovering) @@ -320,9 +320,9 @@ public: ~LLFavoriteLandmarkToggleableMenu() { - // Enable subsequent setVisible(FALSE) + // Enable subsequent setVisible(false) mIsHovering = false; - setVisible(FALSE); + setVisible(false); } protected: @@ -458,7 +458,7 @@ LLFavoritesBarCtrl::~LLFavoritesBarCtrl() mContextMenuHandle.get()->die(); } -BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { *accept = ACCEPT_NO; @@ -586,7 +586,7 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, break; } - return TRUE; + return true; } bool LLFavoritesBarCtrl::handleDragAndDropToMenu(S32 x, S32 y, MASK mask, BOOL drop, @@ -801,7 +801,7 @@ void LLFavoritesBarCtrl::changed(U32 mask) } //virtual -void LLFavoritesBarCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFavoritesBarCtrl::reshape(S32 width, S32 height, bool called_from_parent) { S32 delta_width = width - getRect().getWidth(); S32 delta_height = height - getRect().getHeight(); @@ -1091,7 +1091,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem } -BOOL LLFavoritesBarCtrl::postBuild() +bool LLFavoritesBarCtrl::postBuild() { // make the popup menu available LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_favorites.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); @@ -1102,7 +1102,7 @@ BOOL LLFavoritesBarCtrl::postBuild() menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor")); mContextMenuHandle = menu->getHandle(); - return TRUE; + return true; } BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &items) diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index a1a7cc42d3..2580b9e514 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -56,9 +56,9 @@ protected: public: virtual ~LLFavoritesBarCtrl(); - /*virtual*/ BOOL postBuild() override; + /*virtual*/ bool postBuild() override; - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; bool handleDragAndDropToMenu(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); @@ -67,7 +67,7 @@ public: /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; // LLInventoryObserver observer trigger /*virtual*/ void changed(U32 mask) override; - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) override; + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true) override; /*virtual*/ void draw() override; void showDragMarker(bool show) { mShowDragMarker = show; } @@ -83,7 +83,6 @@ protected: void onButtonRightClick(LLUUID id,LLView* button,S32 x,S32 y,MASK mask); void onButtonMouseDown(LLUUID id, LLUICtrl* button, S32 x, S32 y, MASK mask); - void onOverflowMenuItemMouseDown(LLUUID id, LLUICtrl* item, S32 x, S32 y, MASK mask); void onButtonMouseUp(LLUUID id, LLUICtrl* button, S32 x, S32 y, MASK mask); void onEndDrag(); diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index a0890b7f9d..c1f6af9816 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -91,7 +91,7 @@ LLFloater360Capture::~LLFloater360Capture() } } -BOOL LLFloater360Capture::postBuild() +bool LLFloater360Capture::postBuild() { mCaptureBtn = getChild<LLUICtrl>("capture_button"); mCaptureBtn->setCommitCallback(boost::bind(&LLFloater360Capture::onCapture360ImagesBtn, this)); diff --git a/indra/newview/llfloater360capture.h b/indra/newview/llfloater360capture.h index 3fb2c7f3c7..f0b4057645 100644 --- a/indra/newview/llfloater360capture.h +++ b/indra/newview/llfloater360capture.h @@ -46,7 +46,7 @@ class LLFloater360Capture: LLFloater360Capture(const LLSD& key); ~LLFloater360Capture(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) override; diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 1fbd198019..f971f22aed 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -83,7 +83,7 @@ private: virtual ~LLFloaterAbout(); public: - /*virtual*/ BOOL postBuild(); + bool postBuild() override; /// Obtain the data used to fill out the contents string. This is /// separated so that we can programmatically access the same info. @@ -122,7 +122,7 @@ LLFloaterAbout::~LLFloaterAbout() { } -BOOL LLFloaterAbout::postBuild() +bool LLFloaterAbout::postBuild() { center(); LLViewerTextEditor *support_widget = @@ -201,7 +201,7 @@ BOOL LLFloaterAbout::postBuild() licenses_widget->setEnabled(FALSE); licenses_widget->startOfDoc(); - return TRUE; + return true; } LLSD LLFloaterAbout::getInfo() diff --git a/indra/newview/llfloateraddpaymentmethod.cpp b/indra/newview/llfloateraddpaymentmethod.cpp index 3952b48229..cd265707a5 100644 --- a/indra/newview/llfloateraddpaymentmethod.cpp +++ b/indra/newview/llfloateraddpaymentmethod.cpp @@ -41,12 +41,12 @@ LLFloaterAddPaymentMethod::~LLFloaterAddPaymentMethod() { } -BOOL LLFloaterAddPaymentMethod::postBuild() +bool LLFloaterAddPaymentMethod::postBuild() { - setCanDrag(FALSE); + setCanDrag(false); getChild<LLButton>("continue_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onContinueBtn, this)); getChild<LLButton>("close_btn")->setCommitCallback(boost::bind(&LLFloaterAddPaymentMethod::onCloseBtn, this)); - return TRUE; + return true; } void LLFloaterAddPaymentMethod::onOpen(const LLSD& key) diff --git a/indra/newview/llfloateraddpaymentmethod.h b/indra/newview/llfloateraddpaymentmethod.h index b3bb624484..d02b305d1b 100644 --- a/indra/newview/llfloateraddpaymentmethod.h +++ b/indra/newview/llfloateraddpaymentmethod.h @@ -34,8 +34,8 @@ class LLFloaterAddPaymentMethod: { friend class LLFloaterReg; public: - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; private: LLFloaterAddPaymentMethod(const LLSD& key); diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 6996224dcb..6bdc24fcd4 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -87,9 +87,9 @@ LLFloaterAuction::~LLFloaterAuction() { } -BOOL LLFloaterAuction::postBuild() +bool LLFloaterAuction::postBuild() { - return TRUE; + return true; } void LLFloaterAuction::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterauction.h b/indra/newview/llfloaterauction.h index c83a11ba8b..a20144d4cf 100644 --- a/indra/newview/llfloaterauction.h +++ b/indra/newview/llfloaterauction.h @@ -63,7 +63,7 @@ private: bool onSellToAnyoneConfirmed(const LLSD& notification, const LLSD& response); // Sell confirmation clicked static void onClickStartAuction(void* data); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void doResetParcel(); void doSellToAnyone(); diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index 0964daa4d5..9b541f8f15 100644 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -82,7 +82,7 @@ void LLFloaterAutoReplaceSettings::onClose(bool app_quitting) cleanUp(); } -BOOL LLFloaterAutoReplaceSettings::postBuild(void) +bool LLFloaterAutoReplaceSettings::postBuild(void) { // get copies of the current settings that we will operate on mEnabled = gSavedSettings.getBOOL("AutoReplace"); diff --git a/indra/newview/llfloaterautoreplacesettings.h b/indra/newview/llfloaterautoreplacesettings.h index 2109aa7026..863b3610bc 100644 --- a/indra/newview/llfloaterautoreplacesettings.h +++ b/indra/newview/llfloaterautoreplacesettings.h @@ -40,10 +40,8 @@ class LLFloaterAutoReplaceSettings : public LLFloater public: LLFloaterAutoReplaceSettings(const LLSD& key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onClose(bool app_quitting); - - void setData(void * data); + bool postBuild() override; + void onClose(bool app_quitting) override; private: diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp index f888d032ae..d76e6a2aa1 100644 --- a/indra/newview/llfloateravatar.cpp +++ b/indra/newview/llfloateravatar.cpp @@ -52,7 +52,7 @@ LLFloaterAvatar::~LLFloaterAvatar() } } -BOOL LLFloaterAvatar::postBuild() +bool LLFloaterAvatar::postBuild() { mAvatarPicker = findChild<LLMediaCtrl>("avatar_picker_contents"); if (mAvatarPicker) @@ -60,7 +60,7 @@ BOOL LLFloaterAvatar::postBuild() mAvatarPicker->clearCache(); } enableResizeCtrls(true, true, false); - return TRUE; + return true; } diff --git a/indra/newview/llfloateravatar.h b/indra/newview/llfloateravatar.h index 76e9372709..30800dae2f 100644 --- a/indra/newview/llfloateravatar.h +++ b/indra/newview/llfloateravatar.h @@ -37,8 +37,8 @@ class LLFloaterAvatar: friend class LLFloaterReg; private: LLFloaterAvatar(const LLSD& key); - /*virtual*/ ~LLFloaterAvatar(); - /*virtual*/ BOOL postBuild(); + ~LLFloaterAvatar(); + bool postBuild() override; LLMediaCtrl* mAvatarPicker; }; diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 2422596f60..9b5e084b34 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -118,19 +118,19 @@ LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key) mContextConeFadeTime = gSavedSettings.getF32("ContextConeFadeTime"); } -BOOL LLFloaterAvatarPicker::postBuild() +bool LLFloaterAvatarPicker::postBuild() { getChild<LLLineEditor>("Edit")->setKeystrokeCallback( boost::bind(&LLFloaterAvatarPicker::editKeystroke, this, _1, _2),NULL); childSetAction("Find", boost::bind(&LLFloaterAvatarPicker::onBtnFind, this)); - getChildView("Find")->setEnabled(FALSE); + getChildView("Find")->setEnabled(false); childSetAction("Refresh", boost::bind(&LLFloaterAvatarPicker::onBtnRefresh, this)); getChild<LLUICtrl>("near_me_range")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onRangeAdjust, this)); LLScrollListCtrl* searchresults = getChild<LLScrollListCtrl>("SearchResults"); searchresults->setDoubleClickCallback( boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); searchresults->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this)); - getChildView("SearchResults")->setEnabled(FALSE); + getChildView("SearchResults")->setEnabled(false); LLScrollListCtrl* nearme = getChild<LLScrollListCtrl>("NearMe"); nearme->setDoubleClickCallback(boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); @@ -141,10 +141,10 @@ BOOL LLFloaterAvatarPicker::postBuild() getChild<LLUICtrl>("Friends")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this)); childSetAction("ok_btn", boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); - getChildView("ok_btn")->setEnabled(FALSE); + getChildView("ok_btn")->setEnabled(false); childSetAction("cancel_btn", boost::bind(&LLFloaterAvatarPicker::onBtnClose, this)); - getChild<LLUICtrl>("Edit")->setFocus(TRUE); + getChild<LLUICtrl>("Edit")->setFocus(true); LLPanel* search_panel = getChild<LLPanel>("SearchPanel"); if (search_panel) @@ -164,7 +164,7 @@ BOOL LLFloaterAvatarPicker::postBuild() populateFriend(); - return TRUE; + return true; } void LLFloaterAvatarPicker::setOkBtnEnableCb(validate_callback_t cb) @@ -540,8 +540,8 @@ LLScrollListCtrl* LLFloaterAvatarPicker::getActiveList() return list; } -BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, +bool LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { @@ -553,7 +553,7 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, if (localRectToOtherView(rc_point, &rc_list, list)) { // Keep selected only one item - list->deselectAllItems(TRUE); + list->deselectAllItems(true); list->selectItemAt(rc_list.mLeft, rc_list.mBottom, mask); LLScrollListItem* selection = list->getFirstSelected(); if (selection) @@ -575,7 +575,7 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, } } *accept = ACCEPT_NO; - return TRUE; + return true; } @@ -748,7 +748,7 @@ void LLFloaterAvatarPicker::editKeystroke(LLLineEditor* caller, void* user_data) } // virtual -BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask) +bool LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask) { if (key == KEY_RETURN && mask == MASK_NONE) { @@ -760,12 +760,12 @@ BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask) { onBtnSelect(); } - return TRUE; + return true; } else if (key == KEY_ESCAPE && mask == MASK_NONE) { closeFloater(); - return TRUE; + return true; } return LLFloater::handleKeyHere(key, mask); diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index fbee61b054..6a4e0a75d6 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -55,15 +55,15 @@ public: LLFloaterAvatarPicker(const LLSD& key); virtual ~LLFloaterAvatarPicker(); - virtual BOOL postBuild(); + virtual bool postBuild(); void setOkBtnEnableCb(validate_callback_t cb); static void processAvatarPickerReply(class LLMessageSystem* msg, void**); void processResponse(const LLUUID& query_id, const LLSD& content); - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, + bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); @@ -93,7 +93,7 @@ private: void drawFrustum(); virtual void draw(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); LLUUID mQueryID; int mNumResultsReturned; diff --git a/indra/newview/llfloateravatarrendersettings.cpp b/indra/newview/llfloateravatarrendersettings.cpp index 7d098e6c88..def260e639 100644 --- a/indra/newview/llfloateravatarrendersettings.cpp +++ b/indra/newview/llfloateravatarrendersettings.cpp @@ -84,13 +84,13 @@ LLFloaterAvatarRenderSettings::~LLFloaterAvatarRenderSettings() LLRenderMuteList::getInstance()->removeObserver(&sAvatarRenderMuteListObserver); } -BOOL LLFloaterAvatarRenderSettings::postBuild() +bool LLFloaterAvatarRenderSettings::postBuild() { LLFloater::postBuild(); mAvatarSettingsList = getChild<LLNameListCtrl>("render_settings_list"); mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3)); - return TRUE; + return true; } void LLFloaterAvatarRenderSettings::draw() @@ -259,14 +259,14 @@ void LLFloaterAvatarRenderSettings::setAvatarRenderSetting(const LLUUID& av_id, } } -BOOL LLFloaterAvatarRenderSettings::handleKeyHere(KEY key, MASK mask ) +bool LLFloaterAvatarRenderSettings::handleKeyHere(KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if (KEY_DELETE == key) { setAvatarRenderSetting(mAvatarSettingsList->getCurrentID(), (S32)LLVOAvatar::AV_RENDER_NORMALLY); - handled = TRUE; + handled = true; } return handled; } diff --git a/indra/newview/llfloateravatarrendersettings.h b/indra/newview/llfloateravatarrendersettings.h index 2e0a844afd..962a810f2d 100644 --- a/indra/newview/llfloateravatarrendersettings.h +++ b/indra/newview/llfloateravatarrendersettings.h @@ -40,10 +40,10 @@ public: LLFloaterAvatarRenderSettings(const LLSD& key); virtual ~LLFloaterAvatarRenderSettings(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void draw(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); + bool postBuild() override; + void onOpen(const LLSD& key) override; + void draw() override; + bool handleKeyHere(KEY key, MASK mask) override; void onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y); @@ -59,7 +59,6 @@ public: private: void callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting); - void removePicker(); bool mNeedsUpdate; LLListContextMenu* mContextMenu; diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index ebb73fc1f7..895cd2a79e 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -51,7 +51,7 @@ LLFloaterAvatarTextures::~LLFloaterAvatarTextures() { } -BOOL LLFloaterAvatarTextures::postBuild() +bool LLFloaterAvatarTextures::postBuild() { for (U32 i=0; i < TEX_NUM_INDICES; i++) { @@ -63,7 +63,7 @@ BOOL LLFloaterAvatarTextures::postBuild() childSetAction("Dump", onClickDump, this); refresh(); - return TRUE; + return true; } void LLFloaterAvatarTextures::draw() diff --git a/indra/newview/llfloateravatartextures.h b/indra/newview/llfloateravatartextures.h index 02474a10e1..cbbb1b6a57 100644 --- a/indra/newview/llfloateravatartextures.h +++ b/indra/newview/llfloateravatartextures.h @@ -40,8 +40,8 @@ public: LLFloaterAvatarTextures(const LLSD& id); virtual ~LLFloaterAvatarTextures(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void draw(); + bool postBuild() override; + void draw() override; void refresh(); diff --git a/indra/newview/llfloaterbanduration.cpp b/indra/newview/llfloaterbanduration.cpp index 6ba6c30cab..1e26bd5f0b 100644 --- a/indra/newview/llfloaterbanduration.cpp +++ b/indra/newview/llfloaterbanduration.cpp @@ -35,7 +35,7 @@ LLFloaterBanDuration::LLFloaterBanDuration(const LLSD& target) { } -BOOL LLFloaterBanDuration::postBuild() +bool LLFloaterBanDuration::postBuild() { childSetAction("ok_btn", boost::bind(&LLFloaterBanDuration::onClickBan, this)); childSetAction("cancel_btn", boost::bind(&LLFloaterBanDuration::onClickCancel, this)); @@ -44,7 +44,7 @@ BOOL LLFloaterBanDuration::postBuild() getChild<LLRadioGroup>("ban_duration_radio")->setSelectedIndex(0); getChild<LLUICtrl>("ban_hours")->setEnabled(FALSE); - return TRUE; + return true; } LLFloaterBanDuration* LLFloaterBanDuration::show(select_callback_t callback, uuid_vec_t ids) diff --git a/indra/newview/llfloaterbanduration.h b/indra/newview/llfloaterbanduration.h index e8ec7cc669..4793b524f7 100644 --- a/indra/newview/llfloaterbanduration.h +++ b/indra/newview/llfloaterbanduration.h @@ -35,7 +35,7 @@ class LLFloaterBanDuration : public LLFloater public: LLFloaterBanDuration(const LLSD& target); - BOOL postBuild(); + bool postBuild() override; static LLFloaterBanDuration* show(select_callback_t callback, uuid_vec_t id); private: diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index cf38a00499..b88ac72dd5 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -52,9 +52,9 @@ LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed) mCommitCallbackRegistrar.add("Beacons.UICheck", boost::bind(&LLFloaterBeacons::onClickUICheck, this,_1)); } -BOOL LLFloaterBeacons::postBuild() +bool LLFloaterBeacons::postBuild() { - return TRUE; + return true; } // Callback attached to each check box control to both affect their main purpose diff --git a/indra/newview/llfloaterbeacons.h b/indra/newview/llfloaterbeacons.h index 47d0696296..d83085a913 100644 --- a/indra/newview/llfloaterbeacons.h +++ b/indra/newview/llfloaterbeacons.h @@ -36,7 +36,7 @@ class LLFloaterBeacons : public LLFloater public: - /*virtual*/ BOOL postBuild(); + bool postBuild() override; // Needed to make the floater visibility toggle the beacons. // Too bad we can't just add control_name="BeaconAlwaysOn" to the XML. diff --git a/indra/newview/llfloaterbigpreview.cpp b/indra/newview/llfloaterbigpreview.cpp index b516e9dd01..63439c816b 100644 --- a/indra/newview/llfloaterbigpreview.cpp +++ b/indra/newview/llfloaterbigpreview.cpp @@ -61,7 +61,7 @@ void LLFloaterBigPreview::closeOnFloaterOwnerClosing(LLFloater* floaterp) } } -BOOL LLFloaterBigPreview::postBuild() +bool LLFloaterBigPreview::postBuild() { mPreviewPlaceholder = getChild<LLUICtrl>("big_preview_placeholder"); return LLFloater::postBuild(); diff --git a/indra/newview/llfloaterbigpreview.h b/indra/newview/llfloaterbigpreview.h index 513ed8da6e..03a8699f3d 100644 --- a/indra/newview/llfloaterbigpreview.h +++ b/indra/newview/llfloaterbigpreview.h @@ -35,7 +35,7 @@ public: LLFloaterBigPreview(const LLSD& key); ~LLFloaterBigPreview(); - BOOL postBuild(); + bool postBuild(); void draw(); void onCancel(); diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp index 1b65d8d683..9eef704d65 100644 --- a/indra/newview/llfloaterbuildoptions.cpp +++ b/indra/newview/llfloaterbuildoptions.cpp @@ -49,9 +49,9 @@ LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key) LLFloaterBuildOptions::~LLFloaterBuildOptions() {} -BOOL LLFloaterBuildOptions::postBuild() +bool LLFloaterBuildOptions::postBuild() { - return TRUE; + return true; } // virtual @@ -63,5 +63,5 @@ void LLFloaterBuildOptions::onOpen(const LLSD& key) // virtual void LLFloaterBuildOptions::onClose(bool app_quitting) { - mObjectSelection = NULL; + mObjectSelection = nullptr; } diff --git a/indra/newview/llfloaterbuildoptions.h b/indra/newview/llfloaterbuildoptions.h index 02c56cb6a9..b21a0117a3 100644 --- a/indra/newview/llfloaterbuildoptions.h +++ b/indra/newview/llfloaterbuildoptions.h @@ -43,10 +43,10 @@ class LLFloaterBuildOptions : public LLFloater { public: - virtual BOOL postBuild(); + bool postBuild() override; - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onClose(bool app_quitting); + void onOpen(const LLSD& key) override; + void onClose(bool app_quitting) override; private: friend class LLFloaterReg; diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 392866682d..d70b7996d3 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -64,7 +64,7 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) mCommitCallbackRegistrar.add("BulkPermission.CommitCopy", boost::bind(&LLFloaterBulkPermission::onCommitCopy, this)); } -BOOL LLFloaterBulkPermission::postBuild() +bool LLFloaterBulkPermission::postBuild() { mBulkChangeIncludeAnimations = gSavedSettings.getBOOL("BulkChangeIncludeAnimations"); mBulkChangeIncludeBodyParts = gSavedSettings.getBOOL("BulkChangeIncludeBodyParts"); @@ -89,7 +89,7 @@ BOOL LLFloaterBulkPermission::postBuild() { mBulkChangeNextOwnerTransfer = true; } - return TRUE; + return true; } void LLFloaterBulkPermission::doApply() diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h index ab5d568667..dd0dd5f5a8 100644 --- a/indra/newview/llfloaterbulkpermission.h +++ b/indra/newview/llfloaterbulkpermission.h @@ -41,7 +41,7 @@ class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener friend class LLFloaterReg; public: - BOOL postBuild(); + bool postBuild(); private: diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 307ab8c4d1..707557d23d 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -77,7 +77,7 @@ LLFloaterBump::~LLFloaterBump() } } -BOOL LLFloaterBump::postBuild() +bool LLFloaterBump::postBuild() { mList = getChild<LLScrollListCtrl>("bump_list"); mList->setAllowMultipleSelection(false); @@ -93,7 +93,7 @@ BOOL LLFloaterBump::postBuild() menu->setItemVisible(std::string("Impostor seperator"), false); } - return TRUE; + return true; } // virtual void LLFloaterBump::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h index d2f9fabdd3..421d0b3f91 100644 --- a/indra/newview/llfloaterbump.h +++ b/indra/newview/llfloaterbump.h @@ -43,8 +43,8 @@ protected: void onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y); public: - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; static LLFloaterBump* getInstance(); diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index ea93d3bfaa..40d4ed7bfb 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -54,10 +54,10 @@ LLFloaterBuy::LLFloaterBuy(const LLSD& key) { } -BOOL LLFloaterBuy::postBuild() +bool LLFloaterBuy::postBuild() { - getChildView("object_list")->setEnabled(FALSE); - getChildView("item_list")->setEnabled(FALSE); + getChildView("object_list")->setEnabled(false); + getChildView("item_list")->setEnabled(false); getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuy::onClickCancel, this)); getChild<LLUICtrl>("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuy::onClickBuy, this)); @@ -70,12 +70,12 @@ BOOL LLFloaterBuy::postBuild() // mid-session and the saved rect is off-center. center(); - return TRUE; + return true; } LLFloaterBuy::~LLFloaterBuy() { - mObjectSelection = NULL; + mObjectSelection = nullptr; } void LLFloaterBuy::reset() diff --git a/indra/newview/llfloaterbuy.h b/indra/newview/llfloaterbuy.h index e83b3c6ba6..fedbdce965 100644 --- a/indra/newview/llfloaterbuy.h +++ b/indra/newview/llfloaterbuy.h @@ -49,19 +49,18 @@ public: LLFloaterBuy(const LLSD& key); ~LLFloaterBuy(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onClose(bool app_quitting); + bool postBuild() override; + void onClose(bool app_quitting) override; static void show(const LLSaleInfo& sale_info); protected: void reset(); - void requestObjectInventories(); - /*virtual*/ void inventoryChanged(LLViewerObject* obj, - LLInventoryObject::object_list_t* inv, - S32 serial_num, - void* data); + void inventoryChanged(LLViewerObject* obj, + LLInventoryObject::object_list_t* inv, + S32 serial_num, + void* data) override; void onSelectionChanged(); void showViews(bool show); diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index f9dfa0334f..317a23c82e 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -57,15 +57,15 @@ LLFloaterBuyContents::LLFloaterBuyContents(const LLSD& key) { } -BOOL LLFloaterBuyContents::postBuild() +bool LLFloaterBuyContents::postBuild() { getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuyContents::onClickCancel, this)); getChild<LLUICtrl>("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuyContents::onClickBuy, this)); - getChildView("item_list")->setEnabled(FALSE); - getChildView("buy_btn")->setEnabled(FALSE); - getChildView("wear_check")->setEnabled(FALSE); + getChildView("item_list")->setEnabled(false); + getChildView("buy_btn")->setEnabled(false); + getChildView("wear_check")->setEnabled(false); setDefaultBtn("cancel_btn"); // to avoid accidental buy (SL-43130) @@ -75,7 +75,7 @@ BOOL LLFloaterBuyContents::postBuild() // mid-session and the saved rect is off-center. center(); - return TRUE; + return true; } LLFloaterBuyContents::~LLFloaterBuyContents() diff --git a/indra/newview/llfloaterbuycontents.h b/indra/newview/llfloaterbuycontents.h index 19393fb6af..93d53a8a89 100644 --- a/indra/newview/llfloaterbuycontents.h +++ b/indra/newview/llfloaterbuycontents.h @@ -48,14 +48,13 @@ public: LLFloaterBuyContents(const LLSD& key); ~LLFloaterBuyContents(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; protected: - void requestObjectInventories(); - /*virtual*/ void inventoryChanged(LLViewerObject* obj, - LLInventoryObject::object_list_t* inv, - S32 serial_num, - void* data); + void inventoryChanged(LLViewerObject* obj, + LLInventoryObject::object_list_t* inv, + S32 serial_num, + void* data) override; void onClickBuy(); void onClickCancel(); diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 0cfac166c7..f9beb30510 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -66,13 +66,13 @@ public: void noTarget(); void target(const std::string& name, S32 price); - virtual BOOL postBuild(); + virtual bool postBuild(); void updateUI(); void collapsePanels(bool collapse); virtual void draw(); - virtual BOOL canClose(); + virtual bool canClose(); void onClickBuy(); void onClickCancel(); @@ -135,7 +135,7 @@ void LLFloaterBuyCurrencyUI::target(const std::string& name, S32 price) // virtual -BOOL LLFloaterBuyCurrencyUI::postBuild() +bool LLFloaterBuyCurrencyUI::postBuild() { mManager.prepare(); @@ -146,7 +146,7 @@ BOOL LLFloaterBuyCurrencyUI::postBuild() updateUI(); - return TRUE; + return true; } void LLFloaterBuyCurrencyUI::draw() @@ -169,7 +169,7 @@ void LLFloaterBuyCurrencyUI::draw() LLFloater::draw(); } -BOOL LLFloaterBuyCurrencyUI::canClose() +bool LLFloaterBuyCurrencyUI::canClose() { return mManager.canCancel(); } diff --git a/indra/newview/llfloaterbuycurrencyhtml.cpp b/indra/newview/llfloaterbuycurrencyhtml.cpp index a69aa8d227..07d21df179 100644 --- a/indra/newview/llfloaterbuycurrencyhtml.cpp +++ b/indra/newview/llfloaterbuycurrencyhtml.cpp @@ -42,13 +42,13 @@ LLFloaterBuyCurrencyHTML::LLFloaterBuyCurrencyHTML( const LLSD& key ): //////////////////////////////////////////////////////////////////////////////// // -BOOL LLFloaterBuyCurrencyHTML::postBuild() +bool LLFloaterBuyCurrencyHTML::postBuild() { // observer media events mBrowser = getChild<LLMediaCtrl>( "browser" ); mBrowser->addObserver( this ); - return TRUE; + return true; } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llfloaterbuycurrencyhtml.h b/indra/newview/llfloaterbuycurrencyhtml.h index 6b1fc53f1f..53532d6265 100644 --- a/indra/newview/llfloaterbuycurrencyhtml.h +++ b/indra/newview/llfloaterbuycurrencyhtml.h @@ -37,7 +37,7 @@ class LLFloaterBuyCurrencyHTML : public: LLFloaterBuyCurrencyHTML( const LLSD& key ); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onClose( bool app_quitting ); // inherited from LLViewerMediaObserver diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 464e7ff4a2..62699c5ef3 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -187,7 +187,7 @@ public: void tellUserError(const std::string& message, const std::string& uri); - virtual BOOL postBuild(); + virtual bool postBuild(); void startBuyPreConfirm(); void startBuyPostConfirm(const std::string& password); @@ -197,7 +197,7 @@ public: void onClickErrorWeb(); virtual void draw(); - virtual BOOL canClose(); + virtual bool canClose(); void onVisibilityChanged ( const LLSD& new_visibility ); @@ -929,7 +929,7 @@ void LLFloaterBuyLandUI::tellUserError( // virtual -BOOL LLFloaterBuyLandUI::postBuild() +bool LLFloaterBuyLandUI::postBuild() { setVisibleCallback(boost::bind(&LLFloaterBuyLandUI::onVisibilityChanged, this, _2)); @@ -941,7 +941,7 @@ BOOL LLFloaterBuyLandUI::postBuild() center(); - return TRUE; + return true; } void LLFloaterBuyLandUI::setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel) @@ -994,7 +994,7 @@ void LLFloaterBuyLandUI::draw() } // virtual -BOOL LLFloaterBuyLandUI::canClose() +bool LLFloaterBuyLandUI::canClose() { // mTransactionType check for pre-buy estimation stage and mCurrency to allow exit after transaction bool can_close = !mTransaction && (mTransactionType != TransactionBuy || mCurrency.canCancel()); diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 810c4cfa36..a1d7bbe1a8 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -188,14 +188,14 @@ std::map <std::string, std::string> LLFloaterBvhPreview::getJointAliases() //----------------------------------------------------------------------------- // postBuild() //----------------------------------------------------------------------------- -BOOL LLFloaterBvhPreview::postBuild() +bool LLFloaterBvhPreview::postBuild() { LLKeyframeMotion* motionp = NULL; LLBVHLoader* loaderp = NULL; if (!LLFloaterNameDesc::postBuild()) { - return FALSE; + return false; } getChild<LLUICtrl>("name_form")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitName, this)); @@ -372,7 +372,7 @@ BOOL LLFloaterBvhPreview::postBuild() delete loaderp; - return TRUE; + return true; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterbvhpreview.h b/indra/newview/llfloaterbvhpreview.h index 9dc6ed62da..31eeefd357 100644 --- a/indra/newview/llfloaterbvhpreview.h +++ b/indra/newview/llfloaterbvhpreview.h @@ -73,7 +73,7 @@ public: LLFloaterBvhPreview(const std::string& filename); virtual ~LLFloaterBvhPreview(); - BOOL postBuild(); + bool postBuild(); bool handleMouseDown(S32 x, S32 y, MASK mask); bool handleMouseUp(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 1c69b9d60b..e649c9f682 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -68,7 +68,7 @@ class LLPanelCameraZoom public: LLPanelCameraZoom(); - /* virtual */ BOOL postBuild(); + /* virtual */ bool postBuild(); /* virtual */ void draw(); protected: @@ -129,13 +129,13 @@ void set_view_visible(LLView* parent, const std::string& name, bool visible) parent->getChildView(name)->setVisible(visible); } -BOOL LLPanelCameraItem::postBuild() +bool LLPanelCameraItem::postBuild() { setMouseEnterCallback(boost::bind(set_view_visible, this, "hovered_icon", true)); setMouseLeaveCallback(boost::bind(set_view_visible, this, "hovered_icon", false)); setMouseDownCallback(boost::bind(&LLPanelCameraItem::onAnyMouseClick, this)); setRightMouseDownCallback(boost::bind(&LLPanelCameraItem::onAnyMouseClick, this)); - return TRUE; + return true; } void LLPanelCameraItem::onAnyMouseClick() @@ -170,7 +170,7 @@ LLPanelCameraZoom::LLPanelCameraZoom() mCommitCallbackRegistrar.add("Camera.rotate", boost::bind(&LLPanelCameraZoom::onCameraRotate, this)); } -BOOL LLPanelCameraZoom::postBuild() +bool LLPanelCameraZoom::postBuild() { mPlusBtn = getChild <LLButton> ("zoom_plus_btn"); mMinusBtn = getChild <LLButton> ("zoom_minus_btn"); @@ -356,7 +356,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) } // virtual -BOOL LLFloaterCamera::postBuild() +bool LLFloaterCamera::postBuild() { updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index a69b87ad16..6f10c4a064 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -89,7 +89,7 @@ private: /* return instance if it exists - created by LLFloaterReg */ static LLFloaterCamera* findInstance(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); F32 getCurrentTransparency(); @@ -151,7 +151,7 @@ public: Optional<CommitCallbackParam> mousedown_callback; Params(); }; - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** setting on/off background icon to indicate selected state */ /*virtual*/ void setValue(const LLSD& value); // sends commit signal diff --git a/indra/newview/llfloatercamerapresets.cpp b/indra/newview/llfloatercamerapresets.cpp index a1cbffd094..76e24a9d16 100644 --- a/indra/newview/llfloatercamerapresets.cpp +++ b/indra/newview/llfloatercamerapresets.cpp @@ -38,14 +38,14 @@ LLFloaterCameraPresets::LLFloaterCameraPresets(const LLSD& key) LLFloaterCameraPresets::~LLFloaterCameraPresets() {} -BOOL LLFloaterCameraPresets::postBuild() +bool LLFloaterCameraPresets::postBuild() { mPresetList = getChild<LLFlatListView>("preset_list"); mPresetList->setCommitCallback(boost::bind(&LLFloaterCameraPresets::onSelectionChange, this)); mPresetList->setCommitOnSelectionChange(true); LLPresetsManager::getInstance()->setPresetListChangeCameraCallback(boost::bind(&LLFloaterCameraPresets::populateList, this)); - return TRUE; + return true; } void LLFloaterCameraPresets::onOpen(const LLSD& key) { @@ -99,7 +99,7 @@ LLCameraPresetFlatItem::~LLCameraPresetFlatItem() { } -BOOL LLCameraPresetFlatItem::postBuild() +bool LLCameraPresetFlatItem::postBuild() { mDeleteBtn = getChild<LLButton>("delete_btn"); mDeleteBtn->setVisible(false); diff --git a/indra/newview/llfloatercamerapresets.h b/indra/newview/llfloatercamerapresets.h index 4430a4209e..9b07987755 100644 --- a/indra/newview/llfloatercamerapresets.h +++ b/indra/newview/llfloatercamerapresets.h @@ -34,7 +34,7 @@ class LLFloaterCameraPresets : public LLFloater { friend class LLFloaterReg; - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void onOpen(const LLSD& key); void populateList(); @@ -55,7 +55,7 @@ public: void setValue(const LLSD& value); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void onMouseEnter(S32 x, S32 y, MASK mask); virtual void onMouseLeave(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llfloaterchangeitemthumbnail.cpp b/indra/newview/llfloaterchangeitemthumbnail.cpp index cfdd7aa834..ca27739bd5 100644 --- a/indra/newview/llfloaterchangeitemthumbnail.cpp +++ b/indra/newview/llfloaterchangeitemthumbnail.cpp @@ -114,7 +114,7 @@ LLFloaterChangeItemThumbnail::~LLFloaterChangeItemThumbnail() removeVOInventoryListener(); } -BOOL LLFloaterChangeItemThumbnail::postBuild() +bool LLFloaterChangeItemThumbnail::postBuild() { mItemNameText = getChild<LLUICtrl>("item_name"); mItemTypeIcon = getChild<LLIconCtrl>("item_type_icon"); @@ -223,11 +223,11 @@ void LLFloaterChangeItemThumbnail::onMouseEnter(S32 x, S32 y, MASK mask) mPasteFromClipboardBtn->setEnabled(LLClipboard::instance().hasContents()); } -BOOL LLFloaterChangeItemThumbnail::handleDragAndDrop( +bool LLFloaterChangeItemThumbnail::handleDragAndDrop( S32 x, S32 y, MASK mask, - BOOL drop, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, @@ -257,7 +257,7 @@ BOOL LLFloaterChangeItemThumbnail::handleDragAndDrop( LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFloaterChangeItemThumbnail " << getKey() << LL_ENDL; - return TRUE; + return true; } void LLFloaterChangeItemThumbnail::changed(U32 mask) diff --git a/indra/newview/llfloaterchangeitemthumbnail.h b/indra/newview/llfloaterchangeitemthumbnail.h index c817ffb268..63bbb8e36f 100644 --- a/indra/newview/llfloaterchangeitemthumbnail.h +++ b/indra/newview/llfloaterchangeitemthumbnail.h @@ -45,16 +45,16 @@ public: LLFloaterChangeItemThumbnail(const LLSD& key); ~LLFloaterChangeItemThumbnail(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; void onFocusReceived() override; void onMouseEnter(S32 x, S32 y, MASK mask) override; - BOOL handleDragAndDrop( + bool handleDragAndDrop( S32 x, S32 y, MASK mask, - BOOL drop, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, diff --git a/indra/newview/llfloaterclassified.cpp b/indra/newview/llfloaterclassified.cpp index 3520b0f67a..9001f2198e 100644 --- a/indra/newview/llfloaterclassified.cpp +++ b/indra/newview/llfloaterclassified.cpp @@ -51,9 +51,9 @@ void LLFloaterClassified::onOpen(const LLSD& key) LLFloater::onOpen(key); } -BOOL LLFloaterClassified::postBuild() +bool LLFloaterClassified::postBuild() { - return TRUE; + return true; } diff --git a/indra/newview/llfloaterclassified.h b/indra/newview/llfloaterclassified.h index 2c95d82b2c..45bd56695d 100644 --- a/indra/newview/llfloaterclassified.h +++ b/indra/newview/llfloaterclassified.h @@ -37,7 +37,7 @@ public: virtual ~LLFloaterClassified(); void onOpen(const LLSD& key) override; - BOOL postBuild() override; + bool postBuild() override; bool matchesKey(const LLSD& key) override; }; diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 0b904010a7..851d086feb 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -211,14 +211,14 @@ void LLFloaterColorPicker::showUI () ////////////////////////////////////////////////////////////////////////////// // called after the dialog is rendered -BOOL LLFloaterColorPicker::postBuild() +bool LLFloaterColorPicker::postBuild() { mCancelBtn = getChild<LLButton>( "cancel_btn" ); mCancelBtn->setClickedCallback ( onClickCancel, this ); mSelectBtn = getChild<LLButton>( "select_btn"); mSelectBtn->setClickedCallback ( onClickSelect, this ); - mSelectBtn->setFocus ( TRUE ); + mSelectBtn->setFocus ( true ); mPipetteBtn = getChild<LLButton>("color_pipette" ); @@ -239,7 +239,7 @@ BOOL LLFloaterColorPicker::postBuild() LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterColorPicker::onColorSelect, this, _1)); - return TRUE; + return true; } ////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h index 9747ffac80..f42c05ee46 100644 --- a/indra/newview/llfloatercolorpicker.h +++ b/indra/newview/llfloatercolorpicker.h @@ -48,7 +48,7 @@ class LLFloaterColorPicker virtual ~LLFloaterColorPicker (); // overrides - virtual BOOL postBuild (); + virtual bool postBuild (); virtual void draw (); virtual bool handleMouseDown ( S32 x, S32 y, MASK mask ); virtual bool handleMouseUp ( S32 x, S32 y, MASK mask ); diff --git a/indra/newview/llfloaterconversationlog.cpp b/indra/newview/llfloaterconversationlog.cpp index 4c910c5655..244f251e4b 100644 --- a/indra/newview/llfloaterconversationlog.cpp +++ b/indra/newview/llfloaterconversationlog.cpp @@ -39,7 +39,7 @@ LLFloaterConversationLog::LLFloaterConversationLog(const LLSD& key) mEnableCallbackRegistrar.add("CallLog.Check", boost::bind(&LLFloaterConversationLog::isActionChecked, this, _2)); } -BOOL LLFloaterConversationLog::postBuild() +bool LLFloaterConversationLog::postBuild() { mConversationLogList = getChild<LLConversationLogList>("conversation_log_list"); diff --git a/indra/newview/llfloaterconversationlog.h b/indra/newview/llfloaterconversationlog.h index e971330f3d..b73878f401 100644 --- a/indra/newview/llfloaterconversationlog.h +++ b/indra/newview/llfloaterconversationlog.h @@ -37,9 +37,9 @@ public: LLFloaterConversationLog(const LLSD& key); virtual ~LLFloaterConversationLog(){}; - virtual BOOL postBuild(); + bool postBuild() override; - virtual void draw(); + void draw() override; void onFilterEdit(const std::string& search_string); diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp index 580a3f2610..d4833984e7 100644 --- a/indra/newview/llfloaterconversationpreview.cpp +++ b/indra/newview/llfloaterconversationpreview.cpp @@ -59,7 +59,7 @@ LLFloaterConversationPreview::~LLFloaterConversationPreview() { } -BOOL LLFloaterConversationPreview::postBuild() +bool LLFloaterConversationPreview::postBuild() { mChatHistory = getChild<LLChatHistory>("chat_history"); diff --git a/indra/newview/llfloaterconversationpreview.h b/indra/newview/llfloaterconversationpreview.h index 7ca4ee6945..1d9ceba6ea 100644 --- a/indra/newview/llfloaterconversationpreview.h +++ b/indra/newview/llfloaterconversationpreview.h @@ -41,12 +41,12 @@ public: LLFloaterConversationPreview(const LLSD& session_id); virtual ~LLFloaterConversationPreview(); - virtual BOOL postBuild(); + bool postBuild() override; void setPages(std::list<LLSD>* messages,const std::string& file_name); - virtual void draw(); - virtual void onOpen(const LLSD& key); - virtual void onClose(bool app_quitting); + void draw() override; + void onOpen(const LLSD& key) override; + void onClose(bool app_quitting) override; private: void onMoreHistoryBtnClick(); diff --git a/indra/newview/llfloatercreatelandmark.cpp b/indra/newview/llfloatercreatelandmark.cpp index 6faa659d87..9ffde4744a 100644 --- a/indra/newview/llfloatercreatelandmark.cpp +++ b/indra/newview/llfloatercreatelandmark.cpp @@ -116,7 +116,7 @@ LLFloaterCreateLandmark::~LLFloaterCreateLandmark() removeObserver(); } -BOOL LLFloaterCreateLandmark::postBuild() +bool LLFloaterCreateLandmark::postBuild() { mFolderCombo = getChild<LLComboBox>("folder_combo"); mLandmarkTitleEditor = getChild<LLLineEditor>("title_editor"); @@ -131,7 +131,7 @@ BOOL LLFloaterCreateLandmark::postBuild() mLandmarksID = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); - return TRUE; + return true; } void LLFloaterCreateLandmark::removeObserver() diff --git a/indra/newview/llfloatercreatelandmark.h b/indra/newview/llfloatercreatelandmark.h index d84f5ae1fc..abe901303f 100644 --- a/indra/newview/llfloatercreatelandmark.h +++ b/indra/newview/llfloatercreatelandmark.h @@ -45,8 +45,8 @@ public: LLFloaterCreateLandmark(const LLSD& key); ~LLFloaterCreateLandmark(); - BOOL postBuild(); - void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void setItem(const uuid_set_t& items); void updateItem(const uuid_set_t& items, U32 mask); diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp index 819b2bcee2..46fd1c5288 100644 --- a/indra/newview/llfloaterdeleteprefpreset.cpp +++ b/indra/newview/llfloaterdeleteprefpreset.cpp @@ -42,7 +42,7 @@ LLFloaterDeletePrefPreset::LLFloaterDeletePrefPreset(const LLSD &key) } // virtual -BOOL LLFloaterDeletePrefPreset::postBuild() +bool LLFloaterDeletePrefPreset::postBuild() { LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences"); if (preferences) @@ -53,7 +53,7 @@ BOOL LLFloaterDeletePrefPreset::postBuild() getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterDeletePrefPreset::onBtnCancel, this)); LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterDeletePrefPreset::onPresetsListChange, this)); - return TRUE; + return true; } void LLFloaterDeletePrefPreset::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterdeleteprefpreset.h b/indra/newview/llfloaterdeleteprefpreset.h index 0ab3da7139..e10bd79c81 100644 --- a/indra/newview/llfloaterdeleteprefpreset.h +++ b/indra/newview/llfloaterdeleteprefpreset.h @@ -38,8 +38,8 @@ class LLFloaterDeletePrefPreset : public LLFloater public: LLFloaterDeletePrefPreset(const LLSD &key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void onBtnDelete(); void onBtnCancel(); diff --git a/indra/newview/llfloaterdestinations.cpp b/indra/newview/llfloaterdestinations.cpp index af21cb593f..5dcf68d864 100644 --- a/indra/newview/llfloaterdestinations.cpp +++ b/indra/newview/llfloaterdestinations.cpp @@ -45,10 +45,10 @@ LLFloaterDestinations::~LLFloaterDestinations() { } -BOOL LLFloaterDestinations::postBuild() +bool LLFloaterDestinations::postBuild() { enableResizeCtrls(true, true, false); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterdestinations.h b/indra/newview/llfloaterdestinations.h index 85d9b3391e..b659ff4df7 100644 --- a/indra/newview/llfloaterdestinations.h +++ b/indra/newview/llfloaterdestinations.h @@ -36,8 +36,8 @@ class LLFloaterDestinations: friend class LLFloaterReg; private: LLFloaterDestinations(const LLSD& key); - /*virtual*/ ~LLFloaterDestinations(); - /*virtual*/ BOOL postBuild(); + ~LLFloaterDestinations(); + bool postBuild() override; }; #endif diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index ad2533debc..9dc602c6f6 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -45,7 +45,7 @@ class LLFloaterDisplayName : public LLFloater public: LLFloaterDisplayName(const LLSD& key); virtual ~LLFloaterDisplayName() { } - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void onSave(); void onReset(); void onCancel(); @@ -100,7 +100,7 @@ void LLFloaterDisplayName::onOpen(const LLSD& key) } } -BOOL LLFloaterDisplayName::postBuild() +bool LLFloaterDisplayName::postBuild() { getChild<LLUICtrl>("reset_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onReset, this)); getChild<LLUICtrl>("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onCancel, this)); @@ -108,7 +108,7 @@ BOOL LLFloaterDisplayName::postBuild() center(); - return TRUE; + return true; } void LLFloaterDisplayName::onCacheSetName(bool success, diff --git a/indra/newview/llfloatereditenvironmentbase.h b/indra/newview/llfloatereditenvironmentbase.h index d900d7f003..96cb37c6ee 100644 --- a/indra/newview/llfloatereditenvironmentbase.h +++ b/indra/newview/llfloatereditenvironmentbase.h @@ -57,7 +57,7 @@ public: virtual LLSettingsBase::ptr_t getEditSettings() const = 0; - virtual BOOL isDirty() const override { return getIsDirty(); } + virtual bool isDirty() const override { return getIsDirty(); } protected: typedef std::function<void()> on_confirm_fn; diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index bb47feaa95..c1c6a82e29 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -203,7 +203,7 @@ LLFloaterEditExtDayCycle::~LLFloaterEditExtDayCycle() } // virtual -BOOL LLFloaterEditExtDayCycle::postBuild() +bool LLFloaterEditExtDayCycle::postBuild() { getChild<LLLineEditor>(TXT_DAY_NAME)->setKeystrokeCallback(boost::bind(&LLFloaterEditExtDayCycle::onCommitName, this, _1, _2), NULL); @@ -264,7 +264,7 @@ BOOL LLFloaterEditExtDayCycle::postBuild() panel->setOnDirtyFlagChanged([this](LLPanel *, bool val) { onPanelDirtyFlagChanged(val); }); } - return TRUE; + return true; } void LLFloaterEditExtDayCycle::onOpen(const LLSD& key) @@ -423,7 +423,7 @@ void LLFloaterEditExtDayCycle::onClose(bool app_quitting) } -void LLFloaterEditExtDayCycle::onVisibilityChange(BOOL new_visibility) +void LLFloaterEditExtDayCycle::onVisibilityChange(bool new_visibility) { } @@ -534,7 +534,7 @@ void LLFloaterEditExtDayCycle::setEditName(const std::string &name) } /* virtual */ -BOOL LLFloaterEditExtDayCycle::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) +bool LLFloaterEditExtDayCycle::handleKeyUp(KEY key, MASK mask, bool called_from_parent) { if (!mEditDay) { diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h index 025a2ee5d1..e9acec0d12 100644 --- a/indra/newview/llfloatereditextdaycycle.h +++ b/indra/newview/llfloatereditextdaycycle.h @@ -79,12 +79,12 @@ public: LLFloaterEditExtDayCycle(const LLSD &key); virtual ~LLFloaterEditExtDayCycle(); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override; virtual void onClose(bool app_quitting) override; //virtual void onFocusReceived() override; //virtual void onFocusLost() override; - virtual void onVisibilityChange(BOOL new_visibility) override; + virtual void onVisibilityChange(bool new_visibility) override; connection_t setEditCommitSignal(edit_commit_signal_t::slot_type cb); @@ -100,7 +100,7 @@ public: virtual LLSettingsBase::ptr_t getEditSettings() const override { return mEditDay; } - BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) override; + bool handleKeyUp(KEY key, MASK mask, bool called_from_parent) override; protected: virtual void setEditSettingsAndUpdate(const LLSettingsBase::ptr_t &settings) override; diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp index c64ee5a69c..cc5936be03 100644 --- a/indra/newview/llfloaterenvironmentadjust.cpp +++ b/indra/newview/llfloaterenvironmentadjust.cpp @@ -84,7 +84,7 @@ LLFloaterEnvironmentAdjust::~LLFloaterEnvironmentAdjust() {} //------------------------------------------------------------------------- -BOOL LLFloaterEnvironmentAdjust::postBuild() +bool LLFloaterEnvironmentAdjust::postBuild() { getChild<LLUICtrl>(FIELD_SKY_AMBIENT_LIGHT)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAmbientLightChanged(); }); getChild<LLUICtrl>(FIELD_SKY_BLUE_HORIZON)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onBlueHorizonChanged(); }); @@ -122,7 +122,7 @@ BOOL LLFloaterEnvironmentAdjust::postBuild() getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); }); refresh(); - return TRUE; + return true; } void LLFloaterEnvironmentAdjust::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterenvironmentadjust.h b/indra/newview/llfloaterenvironmentadjust.h index db893cca12..228771418d 100644 --- a/indra/newview/llfloaterenvironmentadjust.h +++ b/indra/newview/llfloaterenvironmentadjust.h @@ -49,7 +49,7 @@ public: virtual ~LLFloaterEnvironmentAdjust(); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override; virtual void onClose(bool app_quitting) override; diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp index a3504ac6ee..52be7d76e3 100644 --- a/indra/newview/llfloaterevent.cpp +++ b/indra/newview/llfloaterevent.cpp @@ -71,7 +71,7 @@ LLFloaterEvent::~LLFloaterEvent() } -BOOL LLFloaterEvent::postBuild() +bool LLFloaterEvent::postBuild() { mBrowser = getChild<LLMediaCtrl>("browser"); if (mBrowser) @@ -79,7 +79,7 @@ BOOL LLFloaterEvent::postBuild() mBrowser->addObserver(this); } - return TRUE; + return true; } void LLFloaterEvent::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event) diff --git a/indra/newview/llfloaterevent.h b/indra/newview/llfloaterevent.h index ed90055d95..a0cd7de9e2 100644 --- a/indra/newview/llfloaterevent.h +++ b/indra/newview/llfloaterevent.h @@ -42,7 +42,7 @@ public: LLFloaterEvent(const LLSD& key); /*virtual*/ ~LLFloaterEvent(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void setEventID(const U32 event_id); diff --git a/indra/newview/llfloaterexperiencepicker.cpp b/indra/newview/llfloaterexperiencepicker.cpp index c642da7b83..9858f38210 100644 --- a/indra/newview/llfloaterexperiencepicker.cpp +++ b/indra/newview/llfloaterexperiencepicker.cpp @@ -102,7 +102,7 @@ LLFloaterExperiencePicker::~LLFloaterExperiencePicker() gFocusMgr.releaseFocusIfNeeded( this ); } -BOOL LLFloaterExperiencePicker::postBuild() +bool LLFloaterExperiencePicker::postBuild() { mSearchPanel = new LLPanelExperiencePicker(); addChild(mSearchPanel); diff --git a/indra/newview/llfloaterexperiencepicker.h b/indra/newview/llfloaterexperiencepicker.h index 29054a57db..5ef3281a82 100644 --- a/indra/newview/llfloaterexperiencepicker.h +++ b/indra/newview/llfloaterexperiencepicker.h @@ -48,9 +48,9 @@ public: LLFloaterExperiencePicker(const LLSD& key); virtual ~LLFloaterExperiencePicker(); - BOOL postBuild(); + bool postBuild() override; - virtual void draw(); + void draw() override; private: LLPanelExperiencePicker* mSearchPanel; diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp index f6afdd29fb..931cfee735 100644 --- a/indra/newview/llfloaterexperienceprofile.cpp +++ b/indra/newview/llfloaterexperienceprofile.cpp @@ -140,7 +140,7 @@ LLFloaterExperienceProfile::~LLFloaterExperienceProfile() } -BOOL LLFloaterExperienceProfile::postBuild() +bool LLFloaterExperienceProfile::postBuild() { if (mExperienceId.notNull()) @@ -190,7 +190,7 @@ BOOL LLFloaterExperienceProfile::postBuild() changeToEdit(); } - return TRUE; + return true; } void LLFloaterExperienceProfile::experienceCallback(LLHandle<LLFloaterExperienceProfile> handle, const LLSD& experience ) @@ -533,17 +533,17 @@ void LLFloaterExperienceProfile::onFieldChanged() } -BOOL LLFloaterExperienceProfile::canClose() +bool LLFloaterExperienceProfile::canClose() { if(mForceClose || !mDirty) { - return TRUE; + return true; } else { // Bring up view-modal dialog: Save changes? Yes, No, Cancel LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLFloaterExperienceProfile::handleSaveChangesDialog, this, _1, _2, CLOSE)); - return FALSE; + return false; } } diff --git a/indra/newview/llfloaterexperienceprofile.h b/indra/newview/llfloaterexperienceprofile.h index f9b6e2e2eb..0f4a3eeea2 100644 --- a/indra/newview/llfloaterexperienceprofile.h +++ b/indra/newview/llfloaterexperienceprofile.h @@ -60,7 +60,7 @@ public: void refreshExperience(const LLSD& experience); void onSaveComplete( const LLSD& content ); - virtual BOOL canClose(); + virtual bool canClose(); virtual void onClose(bool app_quitting); protected: @@ -87,7 +87,7 @@ protected: static void experienceCallback(LLHandle<LLFloaterExperienceProfile> handle, const LLSD& experience); static bool experiencePermission(LLHandle<LLFloaterExperienceProfile> handle, const LLSD& permission); - BOOL postBuild(); + bool postBuild(); bool setMaturityString(U8 maturity, LLTextBox* child, LLComboBox* combo); bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response, PostSaveAction action); void doSave( int success_action ); diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp index 184e39402a..2dcda52b53 100644 --- a/indra/newview/llfloaterexperiences.cpp +++ b/indra/newview/llfloaterexperiences.cpp @@ -58,7 +58,7 @@ LLPanelExperiences* LLFloaterExperiences::addTab(const std::string& name, bool s return newPanel; } -BOOL LLFloaterExperiences::postBuild() +bool LLFloaterExperiences::postBuild() { getChild<LLTabContainer>("xp_tabs")->addTabPanel(new LLPanelExperiencePicker()); addTab("Allowed_Experiences_Tab", true); @@ -74,7 +74,7 @@ BOOL LLFloaterExperiences::postBuild() getChild<LLTabContainer>("xp_tabs")->addTabPanel(new LLPanelExperienceLog()); resizeToTabs(); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterexperiences.h b/indra/newview/llfloaterexperiences.h index 6d0559af7c..241798490c 100644 --- a/indra/newview/llfloaterexperiences.h +++ b/indra/newview/llfloaterexperiences.h @@ -47,7 +47,7 @@ protected: void clearFromRecent(const LLSD& ids); void resizeToTabs(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void refreshContents(); void setupRecentTabs(); LLPanelExperiences* addTab(const std::string& name, bool select); diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 8e28fd6234..04fd6cb1c8 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -94,7 +94,7 @@ LLFloaterFixedEnvironment::~LLFloaterFixedEnvironment() delete mFlyoutControl; } -BOOL LLFloaterFixedEnvironment::postBuild() +bool LLFloaterFixedEnvironment::postBuild() { mTab = getChild<LLTabContainer>(CONTROL_TAB_AREA); mTxtName = getChild<LLLineEditor>(FIELD_SETTINGS_NAME); @@ -110,7 +110,7 @@ BOOL LLFloaterFixedEnvironment::postBuild() mFlyoutControl->setAction([this](LLUICtrl *ctrl, const LLSD &data) { onButtonApply(ctrl, data); }); mFlyoutControl->setMenuItemVisible(ACTION_COMMIT, false); - return TRUE; + return true; } void LLFloaterFixedEnvironment::onOpen(const LLSD& key) @@ -411,10 +411,10 @@ LLFloaterFixedEnvironmentWater::LLFloaterFixedEnvironmentWater(const LLSD &key): LLFloaterFixedEnvironment(key) {} -BOOL LLFloaterFixedEnvironmentWater::postBuild() +bool LLFloaterFixedEnvironmentWater::postBuild() { if (!LLFloaterFixedEnvironment::postBuild()) - return FALSE; + return false; LLPanelSettingsWater * panel; panel = new LLPanelSettingsWaterMainTab; @@ -423,7 +423,7 @@ BOOL LLFloaterFixedEnvironmentWater::postBuild() panel->setOnDirtyFlagChanged( [this] (LLPanel *, bool value) { onPanelDirtyFlagChanged(value); }); mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true)); - return TRUE; + return true; } void LLFloaterFixedEnvironmentWater::updateEditEnvironment(void) @@ -478,10 +478,10 @@ LLFloaterFixedEnvironmentSky::LLFloaterFixedEnvironmentSky(const LLSD &key) : LLFloaterFixedEnvironment(key) {} -BOOL LLFloaterFixedEnvironmentSky::postBuild() +bool LLFloaterFixedEnvironmentSky::postBuild() { if (!LLFloaterFixedEnvironment::postBuild()) - return FALSE; + return false; LLPanelSettingsSky * panel; panel = new LLPanelSettingsSkyAtmosTab; @@ -502,7 +502,7 @@ BOOL LLFloaterFixedEnvironmentSky::postBuild() panel->setOnDirtyFlagChanged([this](LLPanel *, bool value) { onPanelDirtyFlagChanged(value); }); mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(false)); - return TRUE; + return true; } void LLFloaterFixedEnvironmentSky::updateEditEnvironment(void) diff --git a/indra/newview/llfloaterfixedenvironment.h b/indra/newview/llfloaterfixedenvironment.h index f35f4a4368..a5d3e50f7c 100644 --- a/indra/newview/llfloaterfixedenvironment.h +++ b/indra/newview/llfloaterfixedenvironment.h @@ -50,7 +50,7 @@ public: LLFloaterFixedEnvironment(const LLSD &key); ~LLFloaterFixedEnvironment(); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override; virtual void onClose(bool app_quitting) override; @@ -101,7 +101,7 @@ class LLFloaterFixedEnvironmentWater : public LLFloaterFixedEnvironment public: LLFloaterFixedEnvironmentWater(const LLSD &key); - BOOL postBuild() override; + bool postBuild() override; virtual void onOpen(const LLSD& key) override; @@ -121,7 +121,7 @@ class LLFloaterFixedEnvironmentSky : public LLFloaterFixedEnvironment public: LLFloaterFixedEnvironmentSky(const LLSD &key); - BOOL postBuild() override; + bool postBuild() override; virtual void onOpen(const LLSD& key) override; virtual void onClose(bool app_quitting) override; diff --git a/indra/newview/llfloaterforgetuser.cpp b/indra/newview/llfloaterforgetuser.cpp index f576ce7a76..b51a2812b1 100644 --- a/indra/newview/llfloaterforgetuser.cpp +++ b/indra/newview/llfloaterforgetuser.cpp @@ -56,7 +56,7 @@ LLFloaterForgetUser::~LLFloaterForgetUser() } } -BOOL LLFloaterForgetUser::postBuild() +bool LLFloaterForgetUser::postBuild() { mScrollList = getChild<LLScrollListCtrl>("user_list"); @@ -120,12 +120,12 @@ BOOL LLFloaterForgetUser::postBuild() bool enable_button = mScrollList->getFirstSelectedIndex() != -1; LLCheckBoxCtrl *chk_box = getChild<LLCheckBoxCtrl>("delete_data"); chk_box->setEnabled(enable_button); - chk_box->set(FALSE); + chk_box->set(false); LLButton *button = getChild<LLButton>("forget"); button->setEnabled(enable_button); button->setCommitCallback(boost::bind(&LLFloaterForgetUser::onForgetClicked, this)); - return TRUE; + return true; } void LLFloaterForgetUser::onForgetClicked() diff --git a/indra/newview/llfloaterforgetuser.h b/indra/newview/llfloaterforgetuser.h index 801fcbb412..2bbccc8192 100644 --- a/indra/newview/llfloaterforgetuser.h +++ b/indra/newview/llfloaterforgetuser.h @@ -37,7 +37,7 @@ public: LLFloaterForgetUser(const LLSD &key); ~LLFloaterForgetUser(); - BOOL postBuild(); + bool postBuild() override; void onForgetClicked(); private: diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 2ebe67e600..3191e5f566 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -188,7 +188,7 @@ LLFloaterGesture::~LLFloaterGesture() } // virtual -BOOL LLFloaterGesture::postBuild() +bool LLFloaterGesture::postBuild() { std::string label; @@ -224,9 +224,9 @@ BOOL LLFloaterGesture::postBuild() { buildGestureList(); - mGestureList->setFocus(TRUE); + mGestureList->setFocus(true); - const BOOL ascending = TRUE; + constexpr bool ascending = true; mGestureList->sortByColumn(std::string("name"), ascending); mGestureList->selectFirstItem(); } @@ -234,7 +234,7 @@ BOOL LLFloaterGesture::postBuild() // Update button labels onCommitList(); - return TRUE; + return true; } diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h index 1d702c6704..63d7e0e548 100644 --- a/indra/newview/llfloatergesture.h +++ b/indra/newview/llfloatergesture.h @@ -56,7 +56,7 @@ public: LLFloaterGesture(const LLSD& key); virtual ~LLFloaterGesture(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void done (); void refreshAll(); /** diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index 24e7d8af04..6c50369c8b 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -124,11 +124,11 @@ LLFloaterGodTools::LLFloaterGodTools(const LLSD& key) mFactoryMap["request"] = LLCallbackMap(createPanelRequest, this); } -BOOL LLFloaterGodTools::postBuild() +bool LLFloaterGodTools::postBuild() { sendRegionInfoRequest(); getChild<LLTabContainer>("GodTools Tabs")->selectTabByName("region"); - return TRUE; + return true; } // static void* LLFloaterGodTools::createPanelGrid(void *userdata) @@ -442,22 +442,22 @@ LLPanelRegionTools::LLPanelRegionTools() mCommitCallbackRegistrar.add("RegionTools.SaveState", boost::bind(&LLPanelRegionTools::onSaveState, this)); } -BOOL LLPanelRegionTools::postBuild() +bool LLPanelRegionTools::postBuild() { getChild<LLLineEditor>("region name")->setKeystrokeCallback(onChangeSimName, this); getChild<LLLineEditor>("region name")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); getChild<LLLineEditor>("estate")->setPrevalidate(&LLTextValidate::validatePositiveS32); getChild<LLLineEditor>("parentestate")->setPrevalidate(&LLTextValidate::validatePositiveS32); - getChildView("parentestate")->setEnabled(FALSE); + getChildView("parentestate")->setEnabled(false); getChild<LLLineEditor>("gridposx")->setPrevalidate(&LLTextValidate::validatePositiveS32); - getChildView("gridposx")->setEnabled(FALSE); + getChildView("gridposx")->setEnabled(false); getChild<LLLineEditor>("gridposy")->setPrevalidate(&LLTextValidate::validatePositiveS32); - getChildView("gridposy")->setEnabled(FALSE); + getChildView("gridposy")->setEnabled(false); getChild<LLLineEditor>("redirectx")->setPrevalidate(&LLTextValidate::validatePositiveS32); getChild<LLLineEditor>("redirecty")->setPrevalidate(&LLTextValidate::validatePositiveS32); - return TRUE; + return true; } // Destroys the object @@ -862,9 +862,9 @@ LLPanelGridTools::~LLPanelGridTools() { } -BOOL LLPanelGridTools::postBuild() +bool LLPanelGridTools::postBuild() { - return TRUE; + return true; } void LLPanelGridTools::refresh() @@ -946,10 +946,10 @@ LLPanelObjectTools::~LLPanelObjectTools() // base class will take care of everything } -BOOL LLPanelObjectTools::postBuild() +bool LLPanelObjectTools::postBuild() { refresh(); - return TRUE; + return true; } void LLPanelObjectTools::setTargetAvatar(const LLUUID &target_id) @@ -1231,11 +1231,11 @@ LLPanelRequestTools::~LLPanelRequestTools() { } -BOOL LLPanelRequestTools::postBuild() +bool LLPanelRequestTools::postBuild() { refresh(); - return TRUE; + return true; } void LLPanelRequestTools::refresh() diff --git a/indra/newview/llfloatergodtools.h b/indra/newview/llfloatergodtools.h index cbaeee7051..71396c8716 100644 --- a/indra/newview/llfloatergodtools.h +++ b/indra/newview/llfloatergodtools.h @@ -102,7 +102,7 @@ protected: protected: - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); // When the floater is going away, reset any options that need to be // cleared. void resetToolState(); @@ -127,7 +127,7 @@ public: LLPanelRegionTools(); /*virtual*/ ~LLPanelRegionTools(); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void refresh(); @@ -189,7 +189,7 @@ public: LLPanelGridTools(); virtual ~LLPanelGridTools(); - BOOL postBuild(); + bool postBuild(); void refresh(); @@ -213,7 +213,7 @@ public: LLPanelObjectTools(); /*virtual*/ ~LLPanelObjectTools(); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void refresh(); @@ -254,7 +254,7 @@ public: LLPanelRequestTools(); /*virtual*/ ~LLPanelRequestTools(); - BOOL postBuild(); + bool postBuild(); void refresh(); diff --git a/indra/newview/llfloatergotoline.cpp b/indra/newview/llfloatergotoline.cpp index 3b34f03532..2b3c55c831 100644 --- a/indra/newview/llfloatergotoline.cpp +++ b/indra/newview/llfloatergotoline.cpp @@ -58,16 +58,16 @@ LLFloaterGotoLine::LLFloaterGotoLine(LLScriptEdCore* editor_core) } } -BOOL LLFloaterGotoLine::postBuild() +bool LLFloaterGotoLine::postBuild() { mGotoBox = getChild<LLLineEditor>("goto_line"); mGotoBox->setCommitCallback(boost::bind(&LLFloaterGotoLine::onGotoBoxCommit, this)); - mGotoBox->setCommitOnFocusLost(FALSE); + mGotoBox->setCommitOnFocusLost(false); getChild<LLLineEditor>("goto_line")->setPrevalidate(LLTextValidate::validateNonNegativeS32); childSetAction("goto_btn", onBtnGoto,this); setDefaultBtn("goto_btn"); - return TRUE; + return true; } //static @@ -122,17 +122,17 @@ bool LLFloaterGotoLine::hasAccelerators() const { return mEditorCore->hasAccelerators(); } - return FALSE; + return false; } -BOOL LLFloaterGotoLine::handleKeyHere(KEY key, MASK mask) +bool LLFloaterGotoLine::handleKeyHere(KEY key, MASK mask) { if (mEditorCore) { return mEditorCore->handleKeyHere(key, mask); } - return FALSE; + return false; } void LLFloaterGotoLine::onGotoBoxCommit() diff --git a/indra/newview/llfloatergotoline.h b/indra/newview/llfloatergotoline.h index 058d601752..ae388ee33c 100644 --- a/indra/newview/llfloatergotoline.h +++ b/indra/newview/llfloatergotoline.h @@ -40,7 +40,7 @@ public: LLFloaterGotoLine(LLScriptEdCore* editor_core); ~LLFloaterGotoLine(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; static void show(LLScriptEdCore* editor_core); static void onBtnGoto(void* userdata); @@ -49,8 +49,8 @@ public: LLScriptEdCore* getEditorCore() { return mEditorCore; } static LLFloaterGotoLine* getInstance() { return sInstance; } - virtual bool hasAccelerators() const; - virtual BOOL handleKeyHere(KEY key, MASK mask); + bool hasAccelerators() const override; + bool handleKeyHere(KEY key, MASK mask) override; private: diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index 9745e17bbb..64f4de262f 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -47,12 +47,12 @@ LLFloaterGridStatus::LLFloaterGridStatus(const Params& key) : { } -BOOL LLFloaterGridStatus::postBuild() +bool LLFloaterGridStatus::postBuild() { LLFloaterWebContent::postBuild(); mWebBrowser->addObserver(this); - return TRUE; + return true; } void LLFloaterGridStatus::onOpen(const LLSD& key) diff --git a/indra/newview/llfloatergridstatus.h b/indra/newview/llfloatergridstatus.h index 0c3deb7d4c..a6a2f48631 100644 --- a/indra/newview/llfloatergridstatus.h +++ b/indra/newview/llfloatergridstatus.h @@ -57,7 +57,7 @@ public: private: - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void applyPreferredRect(); diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index f341e2ebcb..41c4d62826 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -75,7 +75,7 @@ void LLFloaterGroupPicker::setPowersMask(U64 powers_mask) } -BOOL LLFloaterGroupPicker::postBuild() +bool LLFloaterGroupPicker::postBuild() { LLScrollListCtrl* list_ctrl = getChild<LLScrollListCtrl>("group list"); if (list_ctrl) @@ -91,9 +91,9 @@ BOOL LLFloaterGroupPicker::postBuild() setDefaultBtn("OK"); - getChildView("OK")->setEnabled(TRUE); + getChildView("OK")->setEnabled(true); - return TRUE; + return true; } void LLFloaterGroupPicker::removeNoneOption() @@ -179,7 +179,7 @@ void LLPanelGroups::reset() enableButtons(); } -BOOL LLPanelGroups::postBuild() +bool LLPanelGroups::postBuild() { childSetCommitCallback("group list", onGroupList, this); @@ -210,7 +210,7 @@ BOOL LLPanelGroups::postBuild() reset(); - return TRUE; + return true; } void LLPanelGroups::enableButtons() @@ -224,23 +224,23 @@ void LLPanelGroups::enableButtons() if(group_id != gAgent.getGroupID()) { - getChildView("Activate")->setEnabled(TRUE); + getChildView("Activate")->setEnabled(true); } else { - getChildView("Activate")->setEnabled(FALSE); + getChildView("Activate")->setEnabled(false); } if (group_id.notNull()) { - getChildView("Info")->setEnabled(TRUE); - getChildView("IM")->setEnabled(TRUE); - getChildView("Leave")->setEnabled(TRUE); + getChildView("Info")->setEnabled(true); + getChildView("IM")->setEnabled(true); + getChildView("Leave")->setEnabled(true); } else { - getChildView("Info")->setEnabled(FALSE); - getChildView("IM")->setEnabled(FALSE); - getChildView("Leave")->setEnabled(FALSE); + getChildView("Info")->setEnabled(false); + getChildView("IM")->setEnabled(false); + getChildView("Leave")->setEnabled(false); } getChildView("Create")->setEnabled(gAgent.canJoinGroups()); } diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h index 1ad27cea19..10c060ee70 100644 --- a/indra/newview/llfloatergroups.h +++ b/indra/newview/llfloatergroups.h @@ -60,11 +60,7 @@ public: typedef boost::signals2::signal<void (LLUUID id)> signal_t; void setSelectGroupCallback(const signal_t::slot_type& cb) { mGroupSelectSignal.connect(cb); } void setPowersMask(U64 powers_mask); - BOOL postBuild(); - - // implementation of factory policy - static LLFloaterGroupPicker* findInstance(const LLSD& seed); - static LLFloaterGroupPicker* createInstance(const LLSD& seed); + bool postBuild(); // for cases like inviting avatar to group we don't want the none option void removeNoneOption(); @@ -97,7 +93,7 @@ public: protected: // initialize based on the type - BOOL postBuild(); + bool postBuild(); // highlight_id is a group id to highlight void enableButtons(); @@ -109,8 +105,6 @@ protected: static void onBtnIM(void* userdata); static void onBtnLeave(void* userdata); static void onBtnSearch(void* userdata); - static void onBtnVote(void* userdata); - static void onDoubleClickGroup(void* userdata); void create(); void activate(); @@ -118,10 +112,6 @@ protected: void startIM(); void leave(); void search(); - void callVote(); - - static bool callbackLeaveGroup(const LLSD& notification, const LLSD& response); - }; diff --git a/indra/newview/llfloaterhelpbrowser.cpp b/indra/newview/llfloaterhelpbrowser.cpp index eb1f7f7965..4ec56cb092 100644 --- a/indra/newview/llfloaterhelpbrowser.cpp +++ b/indra/newview/llfloaterhelpbrowser.cpp @@ -47,7 +47,7 @@ LLFloaterHelpBrowser::LLFloaterHelpBrowser(const LLSD& key) { } -BOOL LLFloaterHelpBrowser::postBuild() +bool LLFloaterHelpBrowser::postBuild() { mBrowser = getChild<LLMediaCtrl>("browser"); mBrowser->addObserver(this); @@ -56,7 +56,7 @@ BOOL LLFloaterHelpBrowser::postBuild() childSetAction("open_browser", onClickOpenWebBrowser, this); buildURLHistory(); - return TRUE; + return true; } void LLFloaterHelpBrowser::buildURLHistory() diff --git a/indra/newview/llfloaterhelpbrowser.h b/indra/newview/llfloaterhelpbrowser.h index bf4f544a14..aaec3cde86 100644 --- a/indra/newview/llfloaterhelpbrowser.h +++ b/indra/newview/llfloaterhelpbrowser.h @@ -40,7 +40,7 @@ class LLFloaterHelpBrowser : public: LLFloaterHelpBrowser(const LLSD& key); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void onOpen(const LLSD& key); diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index a00fc4aa84..56656d8dac 100644 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -56,7 +56,7 @@ void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data, bool updat } } -BOOL LLFloaterHoverHeight::postBuild() +bool LLFloaterHoverHeight::postBuild() { LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); sldrCtrl->setMinValue(MIN_HOVER_Z); @@ -86,7 +86,7 @@ BOOL LLFloaterHoverHeight::postBuild() // Set up based on initial region. onRegionChanged(); - return TRUE; + return true; } void LLFloaterHoverHeight::onClose(bool app_quitting) diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h index a643fa2516..08d3f26acb 100644 --- a/indra/newview/llfloaterhoverheight.h +++ b/indra/newview/llfloaterhoverheight.h @@ -33,7 +33,7 @@ class LLFloaterHoverHeight: public LLFloater { public: LLFloaterHoverHeight(const LLSD& key); - BOOL postBuild(); + bool postBuild(); static void onSliderMoved(LLUICtrl* ctrl, void* userData); diff --git a/indra/newview/llfloaterhowto.cpp b/indra/newview/llfloaterhowto.cpp index a359fb7c7d..2cbff9de28 100644 --- a/indra/newview/llfloaterhowto.cpp +++ b/indra/newview/llfloaterhowto.cpp @@ -33,8 +33,8 @@ #include "llweb.h" -const S32 STACK_WIDTH = 300; -const S32 STACK_HEIGHT = 505; // content will be 500 +constexpr S32 STACK_WIDTH = 300; +constexpr S32 STACK_HEIGHT = 505; // content will be 500 LLFloaterHowTo::LLFloaterHowTo(const Params& key) : LLFloaterWebContent(key) @@ -42,11 +42,11 @@ LLFloaterHowTo::LLFloaterHowTo(const Params& key) : mShowPageTitle = false; } -BOOL LLFloaterHowTo::postBuild() +bool LLFloaterHowTo::postBuild() { LLFloaterWebContent::postBuild(); - return TRUE; + return true; } void LLFloaterHowTo::onOpen(const LLSD& key) @@ -78,14 +78,14 @@ LLFloaterHowTo* LLFloaterHowTo::getInstance() return LLFloaterReg::getTypedInstance<LLFloaterHowTo>("guidebook"); } -BOOL LLFloaterHowTo::handleKeyHere(KEY key, MASK mask) +bool LLFloaterHowTo::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; if (KEY_F1 == key ) { closeFloater(); - handled = TRUE; + handled = true; } return handled; diff --git a/indra/newview/llfloaterhowto.h b/indra/newview/llfloaterhowto.h index d8da355600..c6dee0099a 100644 --- a/indra/newview/llfloaterhowto.h +++ b/indra/newview/llfloaterhowto.h @@ -44,14 +44,14 @@ public: void onOpen(const LLSD& key) override; - BOOL handleKeyHere(KEY key, MASK mask) override; + bool handleKeyHere(KEY key, MASK mask) override; static LLFloaterHowTo* getInstance(); bool matchesKey(const LLSD& key) override { return true; /*single instance*/ }; private: - BOOL postBuild() override; + bool postBuild() override; }; #endif // LL_LLFLOATERHOWTO_H diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp index 58c76a0b85..9de78bb8ab 100644 --- a/indra/newview/llfloaterhud.cpp +++ b/indra/newview/llfloaterhud.cpp @@ -55,10 +55,10 @@ LLFloaterHUD::LLFloaterHUD(const LLSD& key) } // Opaque background since we never get the focus - setBackgroundOpaque(TRUE); + setBackgroundOpaque(true); } -BOOL LLFloaterHUD::postBuild() +bool LLFloaterHUD::postBuild() { mWebBrowser = getChild<LLMediaCtrl>("floater_hud_browser" ); if (mWebBrowser) @@ -75,7 +75,7 @@ BOOL LLFloaterHUD::postBuild() mWebBrowser->navigateTo(url); } - return TRUE; + return true; } // Destructor diff --git a/indra/newview/llfloaterhud.h b/indra/newview/llfloaterhud.h index e560d6320b..8940e5fe2f 100644 --- a/indra/newview/llfloaterhud.h +++ b/indra/newview/llfloaterhud.h @@ -36,7 +36,7 @@ class LLFloaterHUD : public LLFloater friend class LLFloaterReg; public: - BOOL postBuild(); + bool postBuild() override; private: // Handles its own construction and destruction, so private. diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index f4d203aac5..c63312e199 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -86,11 +86,11 @@ LLFloaterImagePreview::LLFloaterImagePreview(const std::string& filename) : //----------------------------------------------------------------------------- // postBuild() //----------------------------------------------------------------------------- -BOOL LLFloaterImagePreview::postBuild() +bool LLFloaterImagePreview::postBuild() { if (!LLFloaterNameDesc::postBuild()) { - return FALSE; + return false; } LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo"); @@ -106,7 +106,7 @@ BOOL LLFloaterImagePreview::postBuild() PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f); - getChildView("bad_image_text")->setVisible(FALSE); + getChildView("bad_image_text")->setVisible(false); if (mRawImagep.notNull() && gAgent.getRegion() != NULL) { @@ -121,7 +121,7 @@ BOOL LLFloaterImagePreview::postBuild() // We want "lossless_check" to be unchecked when it is disabled, regardless of // LosslessJ2CUpload state, so only assign control when enabling checkbox LLCheckBoxCtrl* check_box = getChild<LLCheckBoxCtrl>("lossless_check"); - check_box->setEnabled(TRUE); + check_box->setEnabled(true); check_box->setControlVariable(gSavedSettings.getControl("LosslessJ2CUpload")); } } @@ -129,9 +129,9 @@ BOOL LLFloaterImagePreview::postBuild() { mAvatarPreview = NULL; mSculptedPreview = NULL; - getChildView("bad_image_text")->setVisible(TRUE); - getChildView("clothing_type_combo")->setEnabled(FALSE); - getChildView("ok_btn")->setEnabled(FALSE); + getChildView("bad_image_text")->setVisible(true); + getChildView("clothing_type_combo")->setEnabled(false); + getChildView("ok_btn")->setEnabled(false); if(!mImageLoadError.empty()) { @@ -141,7 +141,7 @@ BOOL LLFloaterImagePreview::postBuild() getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); - return TRUE; + return true; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterimagepreview.h b/indra/newview/llfloaterimagepreview.h index 9658afffff..109a1ce457 100644 --- a/indra/newview/llfloaterimagepreview.h +++ b/indra/newview/llfloaterimagepreview.h @@ -113,7 +113,7 @@ public: LLFloaterImagePreview(const std::string& filename); virtual ~LLFloaterImagePreview(); - virtual BOOL postBuild(); + virtual bool postBuild(); bool handleMouseDown(S32 x, S32 y, MASK mask); bool handleMouseUp(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 635aee64ff..65d002e77c 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -183,7 +183,7 @@ void LLFloaterIMContainer::onCurrentChannelChanged(const LLUUID& session_id) } } -BOOL LLFloaterIMContainer::postBuild() +bool LLFloaterIMContainer::postBuild() { mOrigMinWidth = getMinWidth(); mOrigMinHeight = getMinHeight(); @@ -295,7 +295,7 @@ BOOL LLFloaterIMContainer::postBuild() mParticipantRefreshTimer.setTimerExpirySec(0); mParticipantRefreshTimer.start(); - return TRUE; + return true; } void LLFloaterIMContainer::onOpen(const LLSD& key) @@ -310,7 +310,7 @@ void LLFloaterIMContainer::onOpen(const LLSD& key) // virtual void LLFloaterIMContainer::addFloater(LLFloater* floaterp, - BOOL select_added_floater, + bool select_added_floater, LLTabContainer::eInsertionPoint insertion_point) { if(!floaterp) return; @@ -373,7 +373,7 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp, void LLFloaterIMContainer::onCloseFloater(LLUUID& id) { mSessions.erase(id); - setFocus(TRUE); + setFocus(true); } void LLFloaterIMContainer::onNewMessageReceived(const LLSD& data) @@ -719,7 +719,7 @@ void LLFloaterIMContainer::returnFloaterToHost() floater->onTearOffClicked(); } -void LLFloaterIMContainer::setMinimized(BOOL b) +void LLFloaterIMContainer::setMinimized(bool b) { bool was_minimized = isMinimized(); LLMultiFloater::setMinimized(b); @@ -742,7 +742,7 @@ void LLFloaterIMContainer::setMinimized(BOOL b) } } -void LLFloaterIMContainer::setVisible(BOOL visible) +void LLFloaterIMContainer::setVisible(bool visible) { LLFloaterIMNearbyChat* nearby_chat; if (visible) @@ -825,7 +825,7 @@ void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& float } } -void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key) +void LLFloaterIMContainer::setVisibleAndFrontmost(bool take_focus, const LLSD& key) { LLMultiFloater::setVisibleAndFrontmost(take_focus, key); // Do not select "Nearby Chat" conversation, since it will bring its window to front @@ -2312,27 +2312,27 @@ bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conve return !mConversationsRoot->getVisibleRect().overlaps(widget_rect); } -BOOL LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask ) +bool LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if(mask == MASK_ALT) { if (KEY_RETURN == key ) { expandConversation(); - handled = TRUE; + handled = true; } if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) { selectNextorPreviousConversation(true); - handled = TRUE; + handled = true; } if ((KEY_UP == key) || (KEY_LEFT == key)) { selectNextorPreviousConversation(false); - handled = TRUE; + handled = true; } } return handled; @@ -2410,7 +2410,7 @@ bool LLFloaterIMContainer::isParticipantListExpanded() // Exclude "Nearby Chat" session from the check, as "Nearby Chat" window and "Conversations" floater can be brought // to front independently /*virtual*/ -BOOL LLFloaterIMContainer::isFrontmost() +bool LLFloaterIMContainer::isFrontmost() { LLFloaterIMSessionTab* selected_session = LLFloaterIMSessionTab::getConversation(mSelectedSession); LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 82f3b00ebc..fb74d3c7ef 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -56,19 +56,19 @@ public: LLFloaterIMContainer(const LLSD& seed, const Params& params = getDefaultParams()); virtual ~LLFloaterIMContainer(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void draw(); - /*virtual*/ void setMinimized(BOOL b); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); + /*virtual*/ void setMinimized(bool b); + /*virtual*/ void setVisible(bool visible); + /*virtual*/ void setVisibleAndFrontmost(bool take_focus=true, const LLSD& key = LLSD()); /*virtual*/ void updateResizeLimits(); /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onCloseFloater(LLUUID& id); /*virtual*/ void addFloater(LLFloater* floaterp, - BOOL select_added_floater, + bool select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); void returnFloaterToHost(); void showConversation(const LLUUID& session_id); @@ -83,7 +83,6 @@ public: /*virtual*/ void tabClose(); void showStub(bool visible); - static LLFloater* getCurrentVoiceFloater(); static LLFloaterIMContainer* findInstance(); static LLFloaterIMContainer* getInstance(); @@ -116,11 +115,11 @@ public: void doToParticipants(const std::string& item, uuid_vec_t& selectedIDS); void assignResizeLimits(); - virtual BOOL handleKeyHere(KEY key, MASK mask ); + virtual bool handleKeyHere(KEY key, MASK mask ); /*virtual*/ void closeFloater(bool app_quitting = false); void closeAllConversations(); void closeSelectedConversations(const uuid_vec_t& ids); - /*virtual*/ BOOL isFrontmost(); + /*virtual*/ bool isFrontmost(); private: diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index bb4cc9bca3..62ced2b710 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -71,9 +71,9 @@ S32 LLFloaterIMNearbyChat::sLastSpecialChatChannel = 0; -const S32 EXPANDED_HEIGHT = 266; -const S32 COLLAPSED_HEIGHT = 60; -const S32 EXPANDED_MIN_HEIGHT = 150; +constexpr S32 EXPANDED_HEIGHT = 266; +constexpr S32 COLLAPSED_HEIGHT = 60; +constexpr S32 EXPANDED_MIN_HEIGHT = 150; // legacy callback glue void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); @@ -120,10 +120,10 @@ LLFloaterIMNearbyChat* LLFloaterIMNearbyChat::buildFloater(const LLSD& key) } //virtual -BOOL LLFloaterIMNearbyChat::postBuild() +bool LLFloaterIMNearbyChat::postBuild() { setIsSingleInstance(TRUE); - BOOL result = LLFloaterIMSessionTab::postBuild(); + bool result = LLFloaterIMSessionTab::postBuild(); mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5)); mInputEditor->setCommitCallback(boost::bind(&LLFloaterIMNearbyChat::onChatBoxCommit, this)); @@ -268,7 +268,7 @@ void LLFloaterIMNearbyChat::removeScreenChat() } -void LLFloaterIMNearbyChat::setVisible(BOOL visible) +void LLFloaterIMNearbyChat::setVisible(bool visible) { LLFloaterIMSessionTab::setVisible(visible); @@ -279,7 +279,7 @@ void LLFloaterIMNearbyChat::setVisible(BOOL visible) } -void LLFloaterIMNearbyChat::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key) +void LLFloaterIMNearbyChat::setVisibleAndFrontmost(bool take_focus, const LLSD& key) { LLFloaterIMSessionTab::setVisibleAndFrontmost(take_focus, key); @@ -391,21 +391,21 @@ std::string LLFloaterIMNearbyChat::getCurrentChat() } // virtual -BOOL LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask ) +bool LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if( KEY_RETURN == key && mask == MASK_CONTROL) { // shout sendChat(CHAT_TYPE_SHOUT); - handled = TRUE; + handled = true; } else if (KEY_RETURN == key && mask == MASK_SHIFT) { // whisper sendChat(CHAT_TYPE_WHISPER); - handled = TRUE; + handled = true; } @@ -415,12 +415,12 @@ BOOL LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask ) if ((KEY_UP == key) || (KEY_LEFT == key)) { floater_container->selectNextorPreviousConversation(false); - handled = TRUE; + handled = true; } if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) { floater_container->selectNextorPreviousConversation(true); - handled = TRUE; + handled = true; } } diff --git a/indra/newview/llfloaterimnearbychat.h b/indra/newview/llfloaterimnearbychat.h index f0daacd6a9..67f7808021 100644 --- a/indra/newview/llfloaterimnearbychat.h +++ b/indra/newview/llfloaterimnearbychat.h @@ -50,11 +50,11 @@ public: static LLFloaterIMNearbyChat* buildFloater(const LLSD& key); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); + /*virtual*/ void setVisible(bool visible); + /*virtual*/ void setVisibleAndFrontmost(bool take_focus=true, const LLSD& key = LLSD()); /*virtual*/ void closeHostedFloater(); void loadHistory(); @@ -72,7 +72,7 @@ public: std::string getCurrentChat(); S32 getMessageArchiveLength() {return mMessageArchive.size();} - virtual BOOL handleKeyHere( KEY key, MASK mask ); + virtual bool handleKeyHere( KEY key, MASK mask ); static void startChat(const char* line); static void stopChat(); diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index ee9dc35283..58788603f4 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -340,9 +340,9 @@ void LLFloaterIMSession::initIMFloater() } //virtual -BOOL LLFloaterIMSession::postBuild() +bool LLFloaterIMSession::postBuild() { - BOOL result = LLFloaterIMSessionTab::postBuild(); + bool result = LLFloaterIMSessionTab::postBuild(); mInputEditor->setMaxTextLength(1023); mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5)); @@ -666,7 +666,7 @@ void LLFloaterIMSession::setDocked(bool docked, bool pop_on_undock) } } -void LLFloaterIMSession::setMinimized(BOOL b) +void LLFloaterIMSession::setMinimized(bool b) { bool wasMinimized = isMinimized(); LLFloaterIMSessionTab::setMinimized(b); @@ -683,7 +683,7 @@ void LLFloaterIMSession::setMinimized(BOOL b) } } -void LLFloaterIMSession::setVisible(BOOL visible) +void LLFloaterIMSession::setVisible(bool visible) { LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> (LLNotificationsUI::LLChannelManager::getInstance()-> @@ -719,7 +719,7 @@ void LLFloaterIMSession::setVisible(BOOL visible) } -BOOL LLFloaterIMSession::getVisible() +bool LLFloaterIMSession::getVisible() { bool visible; @@ -751,7 +751,7 @@ BOOL LLFloaterIMSession::getVisible() return visible; } -void LLFloaterIMSession::setFocus(BOOL focus) +void LLFloaterIMSession::setFocus(bool focus) { LLFloaterIMSessionTab::setFocus(focus); @@ -1128,7 +1128,7 @@ void LLFloaterIMSession::draw() } // virtual -BOOL LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1151,7 +1151,7 @@ BOOL LLFloaterIMSession::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, cargo_type, cargo_data, accept); } - return TRUE; + return true; } bool LLFloaterIMSession::dropPerson(LLUUID* person_id, bool drop) diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h index 28464fc14b..d942aa3192 100644 --- a/indra/newview/llfloaterimsession.h +++ b/indra/newview/llfloaterimsession.h @@ -64,15 +64,15 @@ public: void initIMFloater(); // LLView overrides - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setMinimized(BOOL b); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ BOOL getVisible(); - /*virtual*/ void setFocus(BOOL focus); + /*virtual*/ bool postBuild(); + /*virtual*/ void setMinimized(bool b); + /*virtual*/ void setVisible(bool visible); + /*virtual*/ bool getVisible(); + /*virtual*/ void setFocus(bool focus); // Check typing timeout timer. /*virtual*/ void draw(); - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 0b0dce29fb..0a62481468 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -136,7 +136,7 @@ LLFloaterIMSessionTab* LLFloaterIMSessionTab::getConversation(const LLUUID& uuid return conv; }; -void LLFloaterIMSessionTab::setVisible(BOOL visible) +void LLFloaterIMSessionTab::setVisible(bool visible) { if(visible && !mHasVisibleBeenInitialized) { @@ -159,7 +159,7 @@ void LLFloaterIMSessionTab::setVisible(BOOL visible) } /*virtual*/ -void LLFloaterIMSessionTab::setFocus(BOOL focus) +void LLFloaterIMSessionTab::setFocus(bool focus) { LLTransientDockableFloater::setFocus(focus); @@ -170,7 +170,7 @@ void LLFloaterIMSessionTab::setFocus(BOOL focus) if (mInputEditor) { - mInputEditor->setFocus(TRUE); + mInputEditor->setFocus(true); } } } @@ -233,9 +233,9 @@ void LLFloaterIMSessionTab::assignResizeLimits() this->mParticipantListAndHistoryStack->updateLayout(); } -BOOL LLFloaterIMSessionTab::postBuild() +bool LLFloaterIMSessionTab::postBuild() { - BOOL result; + bool result; mBodyStack = getChild<LLLayoutStack>("main_stack"); mParticipantListAndHistoryStack = getChild<LLLayoutStack>("im_panels"); @@ -283,8 +283,8 @@ BOOL LLFloaterIMSessionTab::postBuild() mInputEditor->setTextExpandedCallback(boost::bind(&LLFloaterIMSessionTab::reshapeChatLayoutPanel, this)); mInputEditor->setMouseUpCallback(boost::bind(&LLFloaterIMSessionTab::onInputEditorClicked, this)); - mInputEditor->setCommitOnFocusLost( FALSE ); - mInputEditor->setPassDelete(TRUE); + mInputEditor->setCommitOnFocusLost(false); + mInputEditor->setPassDelete(true); mInputEditor->setFont(LLViewerChat::getChatFont()); mChatLayoutPanelHeight = mChatLayoutPanel->getRect().getHeight(); @@ -1019,8 +1019,7 @@ void LLFloaterIMSessionTab::onTearOffClicked() void LLFloaterIMSessionTab::updateGearBtn() { - - BOOL prevVisibility = mGearBtn->getVisible(); + bool prevVisibility = mGearBtn->getVisible(); mGearBtn->setVisible(checkIfTornOff() && mIsP2PChat); @@ -1165,9 +1164,9 @@ LLView* LLFloaterIMSessionTab::getChatHistory() return mChatHistory; } -BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) +bool LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; if(mask == MASK_ALT) { @@ -1175,17 +1174,17 @@ BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) if (KEY_RETURN == key && !isTornOff()) { floater_container->expandConversation(); - handled = TRUE; + handled = true; } if ((KEY_UP == key) || (KEY_LEFT == key)) { floater_container->selectNextorPreviousConversation(false); - handled = TRUE; + handled = true; } if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) { floater_container->selectNextorPreviousConversation(true); - handled = TRUE; + handled = true; } } return handled; diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index d478922617..a54c463470 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -76,10 +76,10 @@ public: // LLFloater overrides /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ void setFocus(BOOL focus); + /*virtual*/ void setVisible(bool visible); + /*virtual*/ void setFocus(bool focus); // Handle the left hand participant list widgets void addConversationViewParticipant(LLConversationItem* item, bool update_view = true); @@ -95,7 +95,7 @@ public: virtual void updateMessages() {} LLConversationItem* getCurSelectedViewModelItem(); void forceReshape(); - virtual BOOL handleKeyHere( KEY key, MASK mask ); + virtual bool handleKeyHere( KEY key, MASK mask ); bool isMessagePaneExpanded(){return mMessagePaneExpanded;} void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;} void restoreFloater(); diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 10088d20c2..45ec1f03cb 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -56,7 +56,7 @@ LLFloaterInspect::LLFloaterInspect(const LLSD& key) mCommitCallbackRegistrar.add("Inspect.SelectObject", boost::bind(&LLFloaterInspect::onSelectObject, this)); } -BOOL LLFloaterInspect::postBuild() +bool LLFloaterInspect::postBuild() { mObjectList = getChild<LLScrollListCtrl>("object_list"); // childSetAction("button owner",onClickOwnerProfile, this); @@ -65,7 +65,7 @@ BOOL LLFloaterInspect::postBuild() refresh(); - return TRUE; + return true; } LLFloaterInspect::~LLFloaterInspect(void) diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h index 44381eac96..d6eb23b2e8 100644 --- a/indra/newview/llfloaterinspect.h +++ b/indra/newview/llfloaterinspect.h @@ -44,12 +44,12 @@ public: // static void show(void* ignored = NULL); void onOpen(const LLSD& key); - virtual BOOL postBuild(); + virtual bool postBuild(); void dirty(); LLUUID getSelectedUUID(); virtual void draw(); virtual void refresh(); -// static BOOL isVisible(); +// static bool isVisible(); virtual void onFocusReceived(); void onClickCreatorProfile(); void onClickOwnerProfile(); diff --git a/indra/newview/llfloaterinventorysettings.cpp b/indra/newview/llfloaterinventorysettings.cpp index 29d6e90a33..e5ee69f240 100644 --- a/indra/newview/llfloaterinventorysettings.cpp +++ b/indra/newview/llfloaterinventorysettings.cpp @@ -36,9 +36,9 @@ LLFloaterInventorySettings::LLFloaterInventorySettings(const LLSD& key) LLFloaterInventorySettings::~LLFloaterInventorySettings() {} -BOOL LLFloaterInventorySettings::postBuild() +bool LLFloaterInventorySettings::postBuild() { getChild<LLButton>("ok_btn")->setCommitCallback(boost::bind(&LLFloater::closeFloater, this, false)); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterinventorysettings.h b/indra/newview/llfloaterinventorysettings.h index 50304276c7..3fe3a001b9 100644 --- a/indra/newview/llfloaterinventorysettings.h +++ b/indra/newview/llfloaterinventorysettings.h @@ -35,7 +35,7 @@ class LLFloaterInventorySettings friend class LLFloaterReg; public: - virtual BOOL postBuild(); + bool postBuild() override; private: LLFloaterInventorySettings(const LLSD& key); diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 558b14bba7..f847ccdd9e 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -132,7 +132,7 @@ void LLFloaterJoystick::draw() LLFloater::draw(); } -BOOL LLFloaterJoystick::postBuild() +bool LLFloaterJoystick::postBuild() { center(); F32 range = gSavedSettings.getBOOL("Cursor3D") ? 128.f : 2.f; @@ -160,7 +160,7 @@ BOOL LLFloaterJoystick::postBuild() refresh(); refreshListOfDevices(); - return TRUE; + return true; } LLFloaterJoystick::~LLFloaterJoystick() diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h index 1d46efd3f6..97eee0a630 100644 --- a/indra/newview/llfloaterjoystick.h +++ b/indra/newview/llfloaterjoystick.h @@ -39,7 +39,7 @@ class LLFloaterJoystick : public LLFloater public: - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void refresh(); virtual void apply(); // Apply the changed values. virtual void cancel(); // Cancel the changed values. diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp index db00f69f03..071c73ca6a 100644 --- a/indra/newview/llfloaterlagmeter.cpp +++ b/indra/newview/llfloaterlagmeter.cpp @@ -50,11 +50,11 @@ LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key) mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this)); } -BOOL LLFloaterLagMeter::postBuild() +bool LLFloaterLagMeter::postBuild() { // Don't let this window take keyboard focus -- it's confusing to // lose arrow-key driving when testing lag. - setIsChrome(TRUE); + setIsChrome(true); // were we shrunk last time? if (isShrunk()) @@ -117,7 +117,7 @@ BOOL LLFloaterLagMeter::postBuild() // childSetAction("minimize", onClickShrink, this); updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079) - return TRUE; + return true; } LLFloaterLagMeter::~LLFloaterLagMeter() { diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h index 929ea40629..559e462b5d 100644 --- a/indra/newview/llfloaterlagmeter.h +++ b/indra/newview/llfloaterlagmeter.h @@ -37,7 +37,7 @@ class LLFloaterLagMeter : public LLFloater public: /*virtual*/ void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); private: LLFloaterLagMeter(const LLSD& key); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 07bd77460f..6ed958f12a 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -125,7 +125,7 @@ class LLPanelLandExperiences { public: LLPanelLandExperiences(LLSafeHandle<LLParcelSelection>& parcelp); - virtual BOOL postBuild(); + virtual bool postBuild(); void refresh(); void experienceAdded(const LLUUID& id, U32 xp_type, U32 access_type); @@ -155,7 +155,7 @@ public: return ((parcelp) ? (parcelp->getArea() >= MINIMUM_PARCEL_SIZE) : false); } - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void refresh() override; virtual LLParcel * getParcel() override; @@ -318,7 +318,7 @@ LLFloaterLand::LLFloaterLand(const LLSD& seed) LLViewerParcelMgr::getInstance()->addObserver( sObserver ); } -BOOL LLFloaterLand::postBuild() +bool LLFloaterLand::postBuild() { setVisibleCallback(boost::bind(&LLFloaterLand::onVisibilityChanged, this, _2)); @@ -331,7 +331,7 @@ BOOL LLFloaterLand::postBuild() tab->selectTab(sLastTab); } - return TRUE; + return true; } @@ -444,7 +444,7 @@ LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel) { } -BOOL LLPanelLandGeneral::postBuild() +bool LLPanelLandGeneral::postBuild() { mEditName = getChild<LLLineEditor>("Name"); mEditName->setCommitCallback(onCommitAny, this); @@ -544,7 +544,7 @@ BOOL LLPanelLandGeneral::postBuild() if(gDisconnected) { - return TRUE; + return true; } // note: on region change this will not be re checked, should not matter on Agni as @@ -566,7 +566,7 @@ BOOL LLPanelLandGeneral::postBuild() } } - return TRUE; + return true; } @@ -1191,7 +1191,7 @@ LLPanelLandObjects::LLPanelLandObjects(LLParcelSelectionHandle& parcel) -BOOL LLPanelLandObjects::postBuild() +bool LLPanelLandObjects::postBuild() { mFirstReply = TRUE; @@ -1245,7 +1245,7 @@ BOOL LLPanelLandObjects::postBuild() mOwnerList->setDoubleClickCallback(onDoubleClickOwner, this); mOwnerList->setContextMenu(LLScrollListCtrl::MENU_AVATAR); - return TRUE; + return true; } @@ -1934,7 +1934,7 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel) } -BOOL LLPanelLandOptions::postBuild() +bool LLPanelLandOptions::postBuild() { mCheckEditObjects = getChild<LLCheckBoxCtrl>( "edit objects check"); childSetCommitCallback("edit objects check", onCommitAny, this); @@ -2024,7 +2024,7 @@ BOOL LLPanelLandOptions::postBuild() mLandingTypeCombo = getChild<LLComboBox>( "landing type"); childSetCommitCallback("landing type", onCommitAny, this); - return TRUE; + return true; } @@ -2441,7 +2441,7 @@ LLPanelLandAccess::LLPanelLandAccess(LLParcelSelectionHandle& parcel) } -BOOL LLPanelLandAccess::postBuild() +bool LLPanelLandAccess::postBuild() { childSetCommitCallback("public_access", onCommitPublicAccess, this); childSetCommitCallback("limit_payment", onCommitAny, this); @@ -2472,7 +2472,7 @@ BOOL LLPanelLandAccess::postBuild() mListBanned->setAlternateSort(); } - return TRUE; + return true; } @@ -3051,13 +3051,13 @@ LLPanelLandCovenant::~LLPanelLandCovenant() { } -BOOL LLPanelLandCovenant::postBuild() +bool LLPanelLandCovenant::postBuild() { mLastRegionID = LLUUID::null; mNextUpdateTime = 0; mTextEstateOwner = getChild<LLTextBox>("estate_owner_text"); mTextEstateOwner->setIsFriendCallback(LLAvatarActions::isFriend); - return TRUE; + return true; } // virtual @@ -3224,7 +3224,7 @@ LLPanelLandExperiences::LLPanelLandExperiences( LLSafeHandle<LLParcelSelection>& } -BOOL LLPanelLandExperiences::postBuild() +bool LLPanelLandExperiences::postBuild() { mAllowed = setupList("panel_allowed", EXPERIENCE_KEY_TYPE_ALLOWED, AL_ALLOW_EXPERIENCE); mBlocked = setupList("panel_blocked", EXPERIENCE_KEY_TYPE_BLOCKED, AL_BLOCK_EXPERIENCE); @@ -3326,17 +3326,17 @@ LLPanelLandEnvironment::LLPanelLandEnvironment(LLParcelSelectionHandle& parcel) { } -BOOL LLPanelLandEnvironment::postBuild() +bool LLPanelLandEnvironment::postBuild() { if (!LLPanelEnvironmentInfo::postBuild()) - return FALSE; + return false; getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEREGION)); - getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(FALSE); - getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(FALSE); - getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(TRUE); + getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(false); + getChild<LLUICtrl>(PNL_REGION_MSG)->setVisible(false); + getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true); - return TRUE; + return true; } void LLPanelLandEnvironment::refresh() diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index 684950d88b..3f154b55e9 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -82,7 +82,7 @@ public: LLParcel* getCurrentSelectedParcel(); virtual void onOpen(const LLSD& key); - virtual BOOL postBuild(); + virtual bool postBuild(); private: // Does its own instance management, so clients not allowed @@ -175,7 +175,7 @@ public: static void confirmSaleChange(S32 landSize, S32 salePrice, std::string authorizedName, void(*callback)(void*), void* userdata); static void callbackConfirmSaleChange(S32 option, void* userdata); - virtual BOOL postBuild(); + virtual bool postBuild(); protected: BOOL mUncheckedSell; // True only when verifying land information when land is for sale on sale info change @@ -274,7 +274,7 @@ public: static void onCommitClean(LLUICtrl* caller, void* user_data); static void processParcelObjectOwnersReply(LLMessageSystem *msg, void **); - virtual BOOL postBuild(); + virtual bool postBuild(); protected: @@ -319,7 +319,7 @@ class LLPanelLandOptions public: LLPanelLandOptions(LLSafeHandle<LLParcelSelection>& parcelp); virtual ~LLPanelLandOptions(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); /*virtual*/ void refresh(); @@ -378,7 +378,7 @@ public: static void onClickRemoveAccess(void*); static void onClickRemoveBanned(void*); - virtual BOOL postBuild(); + virtual bool postBuild(); void onClickAddAccess(); void onClickAddBanned(); @@ -400,7 +400,7 @@ class LLPanelLandCovenant public: LLPanelLandCovenant(LLSafeHandle<LLParcelSelection>& parcelp); virtual ~LLPanelLandCovenant(); - virtual BOOL postBuild(); + virtual bool postBuild(); void refresh(); static void updateCovenantText(const std::string& string); static void updateEstateName(const std::string& name); diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp index a3222d622f..7260b61781 100644 --- a/indra/newview/llfloaterlandholdings.cpp +++ b/indra/newview/llfloaterlandholdings.cpp @@ -66,14 +66,14 @@ LLFloaterLandHoldings::LLFloaterLandHoldings(const LLSD& key) { } -BOOL LLFloaterLandHoldings::postBuild() +bool LLFloaterLandHoldings::postBuild() { childSetAction("Teleport", onClickTeleport, this); childSetAction("Show on Map", onClickMap, this); // Grant list LLScrollListCtrl* grant_list = getChild<LLScrollListCtrl>("grant list"); - grant_list->sortByColumnIndex(0, TRUE); + grant_list->sortByColumnIndex(0, true); grant_list->setDoubleClickCallback(onGrantList, this); S32 count = gAgent.mGroups.size(); @@ -99,7 +99,7 @@ BOOL LLFloaterLandHoldings::postBuild() center(); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterlandholdings.h b/indra/newview/llfloaterlandholdings.h index 90e75b1062..c3279d2bc6 100644 --- a/indra/newview/llfloaterlandholdings.h +++ b/indra/newview/llfloaterlandholdings.h @@ -41,7 +41,7 @@ public: LLFloaterLandHoldings(const LLSD& key); virtual ~LLFloaterLandHoldings(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void onOpen(const LLSD& key); virtual void draw(); diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp index 459fff0812..3f90ba6118 100644 --- a/indra/newview/llfloaterlinkreplace.cpp +++ b/indra/newview/llfloaterlinkreplace.cpp @@ -52,7 +52,7 @@ LLFloaterLinkReplace::~LLFloaterLinkReplace() { } -BOOL LLFloaterLinkReplace::postBuild() +bool LLFloaterLinkReplace::postBuild() { mStartBtn = getChild<LLButton>("btn_start"); mStartBtn->setCommitCallback(boost::bind(&LLFloaterLinkReplace::onStartClicked, this)); @@ -68,7 +68,7 @@ BOOL LLFloaterLinkReplace::postBuild() mStatusText = getChild<LLTextBox>("status_text"); - return TRUE; + return true; } void LLFloaterLinkReplace::onOpen(const LLSD& key) @@ -378,7 +378,7 @@ void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items) static LLDefaultChildRegistry::Register<LLInventoryLinkReplaceDropTarget> r("inventory_link_replace_drop_target"); -BOOL LLInventoryLinkReplaceDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLInventoryLinkReplaceDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -411,7 +411,7 @@ BOOL LLInventoryLinkReplaceDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask *accept = ACCEPT_NO; } - return TRUE; + return true; } void LLInventoryLinkReplaceDropTarget::setItem(LLInventoryItem* item) diff --git a/indra/newview/llfloaterlinkreplace.h b/indra/newview/llfloaterlinkreplace.h index ab2ff87042..7096eedd4b 100644 --- a/indra/newview/llfloaterlinkreplace.h +++ b/indra/newview/llfloaterlinkreplace.h @@ -56,13 +56,13 @@ public: return mDADSignal.connect(cb); } - virtual BOOL postBuild() + virtual bool postBuild() { - setEnabled(FALSE); + setEnabled(false); return LLLineEditor::postBuild(); } - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -86,7 +86,7 @@ public: LLFloaterLinkReplace(const LLSD& key); virtual ~LLFloaterLinkReplace(); - BOOL postBuild(); + bool postBuild(); virtual void onOpen(const LLSD& key); virtual bool tick(); diff --git a/indra/newview/llfloaterloadprefpreset.cpp b/indra/newview/llfloaterloadprefpreset.cpp index 8ed76b1df4..8281cc3f4b 100644 --- a/indra/newview/llfloaterloadprefpreset.cpp +++ b/indra/newview/llfloaterloadprefpreset.cpp @@ -41,7 +41,7 @@ LLFloaterLoadPrefPreset::LLFloaterLoadPrefPreset(const LLSD &key) } // virtual -BOOL LLFloaterLoadPrefPreset::postBuild() +bool LLFloaterLoadPrefPreset::postBuild() { LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences"); if (preferences) @@ -52,7 +52,7 @@ BOOL LLFloaterLoadPrefPreset::postBuild() getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this)); LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this)); - return TRUE; + return true; } void LLFloaterLoadPrefPreset::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterloadprefpreset.h b/indra/newview/llfloaterloadprefpreset.h index 9471f6f1e1..cae05bc062 100644 --- a/indra/newview/llfloaterloadprefpreset.h +++ b/indra/newview/llfloaterloadprefpreset.h @@ -38,8 +38,8 @@ class LLFloaterLoadPrefPreset : public LLFloater public: LLFloaterLoadPrefPreset(const LLSD &key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void onBtnOk(); void onBtnCancel(); diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index e8c65e2768..8cf6e2e307 100755 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -75,7 +75,7 @@ LLFloaterMap::~LLFloaterMap() { } -BOOL LLFloaterMap::postBuild() +bool LLFloaterMap::postBuild() { mMap = getChild<LLNetMap>("Net Map"); mMap->setToolTipMsg(getString("ToolTipMsg")); @@ -241,7 +241,7 @@ void LLFloaterMap::draw() LLFloater::draw(); } -void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFloaterMap::reshape(S32 width, S32 height, bool called_from_parent) { LLFloater::reshape(width, height, called_from_parent); diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h index 10934b4c5c..8005e40327 100644 --- a/indra/newview/llfloatermap.h +++ b/indra/newview/llfloatermap.h @@ -42,10 +42,10 @@ public: static LLFloaterMap* getInstance(); virtual ~LLFloaterMap(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ bool handleDoubleClick( S32 x, S32 y, MASK mask ); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - /*virtual*/ void draw(); + bool postBuild() override; + bool handleDoubleClick( S32 x, S32 y, MASK mask ) override; + void reshape(S32 width, S32 height, bool called_from_parent = true) override; + void draw() override; private: void setDirectionPos( LLTextBox* text_box, F32 rotation ); diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index de9fb5255e..e97a37a85b 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -62,7 +62,7 @@ LLPanelMarketplaceListings::LLPanelMarketplaceListings() mEnableCallbackRegistrar.add("Marketplace.ViewSort.CheckItem", boost::bind(&LLPanelMarketplaceListings::onViewSortMenuItemCheck, this, _2)); } -BOOL LLPanelMarketplaceListings::postBuild() +bool LLPanelMarketplaceListings::postBuild() { childSetAction("add_btn", boost::bind(&LLPanelMarketplaceListings::onAddButtonClicked, this)); childSetAction("audit_btn", boost::bind(&LLPanelMarketplaceListings::onAuditButtonClicked, this)); @@ -76,14 +76,14 @@ BOOL LLPanelMarketplaceListings::postBuild() return LLPanel::postBuild(); } -BOOL LLPanelMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { LLView * handled_view = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - BOOL handled = (handled_view != NULL); + bool handled = (handled_view != NULL); // Special case the drop zone if (handled && (handled_view->getName() == "marketplace_drop_zone")) { @@ -394,7 +394,7 @@ LLFloaterMarketplaceListings::~LLFloaterMarketplaceListings() delete mCategoryAddedObserver; } -BOOL LLFloaterMarketplaceListings::postBuild() +bool LLFloaterMarketplaceListings::postBuild() { mInventoryStatus = getChild<LLTextBox>("marketplace_status"); mInventoryInitializationInProgress = getChild<LLView>("initialization_progress_indicator"); @@ -413,7 +413,7 @@ BOOL LLFloaterMarketplaceListings::postBuild() // Fetch aggressively so we can interact with listings right onOpen() fetchContents(); - return TRUE; + return true; } void LLFloaterMarketplaceListings::onClose(bool app_quitting) @@ -695,7 +695,7 @@ bool LLFloaterMarketplaceListings::isAccepted(EAcceptance accept) return (accept >= ACCEPT_YES_COPY_SINGLE); } -BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -704,7 +704,7 @@ BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BO // If there's no panel to accept drops or no existing marketplace listings folder, we refuse all drop if (!mPanelListings || mRootFolderId.isNull()) { - return FALSE; + return false; } tooltip_msg = ""; @@ -776,7 +776,7 @@ LLFloaterAssociateListing::~LLFloaterAssociateListing() gFocusMgr.releaseFocusIfNeeded( this ); } -BOOL LLFloaterAssociateListing::postBuild() +bool LLFloaterAssociateListing::postBuild() { getChild<LLButton>("OK")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::apply, this, TRUE)); getChild<LLButton>("Cancel")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::cancel, this)); @@ -786,17 +786,17 @@ BOOL LLFloaterAssociateListing::postBuild() return LLFloater::postBuild(); } -BOOL LLFloaterAssociateListing::handleKeyHere(KEY key, MASK mask) +bool LLFloaterAssociateListing::handleKeyHere(KEY key, MASK mask) { if (key == KEY_RETURN && mask == MASK_NONE) { apply(); - return TRUE; + return true; } else if (key == KEY_ESCAPE && mask == MASK_NONE) { cancel(); - return TRUE; + return true; } return LLFloater::handleKeyHere(key, mask); @@ -867,17 +867,17 @@ mEditor(NULL) { } -BOOL LLFloaterMarketplaceValidation::postBuild() +bool LLFloaterMarketplaceValidation::postBuild() { childSetAction("OK", onOK, this); // This widget displays the validation messages mEditor = getChild<LLTextEditor>("validation_text"); - mEditor->setEnabled(FALSE); - mEditor->setFocus(TRUE); + mEditor->setEnabled(false); + mEditor->setFocus(true); mEditor->setValue(LLSD()); - return TRUE; + return true; } LLFloaterMarketplaceValidation::~LLFloaterMarketplaceValidation() @@ -1012,7 +1012,7 @@ LLFloaterItemProperties::~LLFloaterItemProperties() { } -BOOL LLFloaterItemProperties::postBuild() +bool LLFloaterItemProperties::postBuild() { return LLFloater::postBuild(); } diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h index 15854f67ee..7e6b2c9957 100644 --- a/indra/newview/llfloatermarketplacelistings.h +++ b/indra/newview/llfloatermarketplacelistings.h @@ -52,8 +52,8 @@ class LLPanelMarketplaceListings : public LLPanel { public: LLPanelMarketplaceListings(); - BOOL postBuild(); - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool postBuild(); + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -99,8 +99,8 @@ public: void initializeMarketPlace(); // virtuals - BOOL postBuild(); - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool postBuild(); + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -152,8 +152,8 @@ class LLFloaterAssociateListing : public LLFloater { friend class LLFloaterReg; public: - virtual BOOL postBuild(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool postBuild(); + virtual bool handleKeyHere(KEY key, MASK mask); static LLFloaterAssociateListing* show(const LLUUID& folder_id); @@ -184,7 +184,7 @@ public: LLFloaterMarketplaceValidation(const LLSD& key); virtual ~LLFloaterMarketplaceValidation(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void draw(); virtual void onOpen(const LLSD& key); @@ -219,7 +219,7 @@ public: LLFloaterItemProperties(const LLSD& key); virtual ~LLFloaterItemProperties(); - BOOL postBuild(); + bool postBuild(); virtual void onOpen(const LLSD& key); private: diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index b34961e8a2..3749ee3aa7 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -80,7 +80,7 @@ LLFloaterMediaSettings::~LLFloaterMediaSettings() //////////////////////////////////////////////////////////////////////////////// // -BOOL LLFloaterMediaSettings::postBuild() +bool LLFloaterMediaSettings::postBuild() { mApplyBtn = getChild<LLButton>("Apply"); mApplyBtn->setClickedCallback(onBtnApply, this); @@ -121,7 +121,7 @@ BOOL LLFloaterMediaSettings::postBuild() sInstance = this; - return TRUE; + return true; } //static diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h index 151e43e6b9..c3070241b8 100644 --- a/indra/newview/llfloatermediasettings.h +++ b/indra/newview/llfloatermediasettings.h @@ -41,9 +41,9 @@ public: LLFloaterMediaSettings(const LLSD& key); ~LLFloaterMediaSettings(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onClose(bool app_quitting); + bool postBuild() override; + void onOpen(const LLSD& key) override; + void onClose(bool app_quitting) override; static LLFloaterMediaSettings* getInstance(); static bool instanceExists(); diff --git a/indra/newview/llfloatermemleak.cpp b/indra/newview/llfloatermemleak.cpp index c43526acaf..50be7ec6c6 100644 --- a/indra/newview/llfloatermemleak.cpp +++ b/indra/newview/llfloatermemleak.cpp @@ -57,7 +57,7 @@ LLFloaterMemLeak::LLFloaterMemLeak(const LLSD& key) } //---------------------------------------------- -BOOL LLFloaterMemLeak::postBuild(void) +bool LLFloaterMemLeak::postBuild(void) { F32 a, b ; a = getChild<LLUICtrl>("leak_speed")->getValue().asReal(); @@ -80,7 +80,7 @@ BOOL LLFloaterMemLeak::postBuild(void) } sbAllocationFailed = FALSE ; - return TRUE ; + return true ; } LLFloaterMemLeak::~LLFloaterMemLeak() { diff --git a/indra/newview/llfloatermemleak.h b/indra/newview/llfloatermemleak.h index 86416eaa07..932a838a96 100644 --- a/indra/newview/llfloatermemleak.h +++ b/indra/newview/llfloatermemleak.h @@ -35,8 +35,8 @@ class LLFloaterMemLeak : public LLFloater public: /// initialize all the callbacks for the menu - virtual BOOL postBuild() ; - virtual void draw() ; + bool postBuild() override; + void draw() override; void onChangeLeakingSpeed(); void onChangeMaxMemLeaking(); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 1993b6b2a3..a6eaf2d4e1 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -75,15 +75,15 @@ LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL; // should be represented by Retain spinner with values from 1 to 100 by 1. // To achieve this, RETAIN_COEFFICIENT is used while creating spinner // and when value is requested from spinner. -const double RETAIN_COEFFICIENT = 100; +constexpr double RETAIN_COEFFICIENT = 100; // "Cosine%" decomp parameter has values from 0.9 to 1 by 0.001 // But according to the UI spec for upload model floater, this parameter // should be represented by Smooth combobox with only 10 values. // So this const is used as a size of Smooth combobox list. -const S32 SMOOTH_VALUES_NUMBER = 10; -const S32 PREVIEW_RENDER_SIZE = 1024; -const F32 PREVIEW_CAMERA_DISTANCE = 16.f; +constexpr S32 SMOOTH_VALUES_NUMBER = 10; +constexpr S32 PREVIEW_RENDER_SIZE = 1024; +constexpr F32 PREVIEW_CAMERA_DISTANCE = 16.f; class LLMeshFilePicker : public LLFilePickerThread { @@ -148,11 +148,11 @@ mAvatarTabIndex(0) //----------------------------------------------------------------------------- // postBuild() //----------------------------------------------------------------------------- -BOOL LLFloaterModelPreview::postBuild() +bool LLFloaterModelPreview::postBuild() { if (!LLFloater::postBuild()) { - return FALSE; + return false; } childSetCommitCallback("cancel_btn", onCancel, this); @@ -283,14 +283,14 @@ BOOL LLFloaterModelPreview::postBuild() mCalculateBtn->setEnabled(false); } - return TRUE; + return true; } //----------------------------------------------------------------------------- // reshape() //----------------------------------------------------------------------------- -void LLFloaterModelPreview::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFloaterModelPreview::reshape(S32 width, S32 height, bool called_from_parent) { LLFloaterModelUploadBase::reshape(width, height, called_from_parent); diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index cb5d5a36e7..72d191f8ee 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -69,8 +69,8 @@ public: LLFloaterModelPreview(const LLSD& key); virtual ~LLFloaterModelPreview(); - virtual BOOL postBuild(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual bool postBuild(); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); void initModelPreview(); static bool showModelPreview(); diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index ba1ca868bc..b6b6a7308b 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -97,7 +97,7 @@ LLFloaterMyEnvironment::~LLFloaterMyEnvironment() } -BOOL LLFloaterMyEnvironment::postBuild() +bool LLFloaterMyEnvironment::postBuild() { mInventoryList = getChild<LLInventoryPanel>(PANEL_SETTINGS); @@ -122,8 +122,8 @@ BOOL LLFloaterMyEnvironment::postBuild() mFilterEdit->setCommitCallback([this](LLUICtrl*, const LLSD& param){ onFilterEdit(param.asString()); }); childSetCommitCallback(BUTTON_DELETE, [this](LLUICtrl *, void*) { onDeleteSelected(); }, nullptr); - mSavedFolderState.setApply(FALSE); - return TRUE; + mSavedFolderState.setApply(false); + return true; } void LLFloaterMyEnvironment::refresh() diff --git a/indra/newview/llfloatermyenvironment.h b/indra/newview/llfloatermyenvironment.h index fea0981590..b98ccc52db 100644 --- a/indra/newview/llfloatermyenvironment.h +++ b/indra/newview/llfloatermyenvironment.h @@ -43,7 +43,7 @@ public: LLFloaterMyEnvironment(const LLSD& key); virtual ~LLFloaterMyEnvironment(); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void refresh() override; virtual void onOpen(const LLSD& key) override; diff --git a/indra/newview/llfloatermyscripts.cpp b/indra/newview/llfloatermyscripts.cpp index 6f9a6c9066..e3c0523b74 100644 --- a/indra/newview/llfloatermyscripts.cpp +++ b/indra/newview/llfloatermyscripts.cpp @@ -36,7 +36,7 @@ #include "lltrans.h" #include "llviewerregion.h" -const S32 SIZE_OF_ONE_KB = 1024; +constexpr S32 SIZE_OF_ONE_KB = 1024; LLFloaterMyScripts::LLFloaterMyScripts(const LLSD& seed) : LLFloater(seed), @@ -50,14 +50,14 @@ LLFloaterMyScripts::LLFloaterMyScripts(const LLSD& seed) { } -BOOL LLFloaterMyScripts::postBuild() +bool LLFloaterMyScripts::postBuild() { childSetAction("refresh_list_btn", onClickRefresh, this); std::string msg_waiting = LLTrans::getString("ScriptLimitsRequestWaiting"); getChild<LLUICtrl>("loading_text")->setValue(LLSD(msg_waiting)); mAttachmentDetailsRequested = requestAttachmentDetails(); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloatermyscripts.h b/indra/newview/llfloatermyscripts.h index 3c053a0223..d22286814a 100644 --- a/indra/newview/llfloatermyscripts.h +++ b/indra/newview/llfloatermyscripts.h @@ -35,8 +35,8 @@ class LLFloaterMyScripts : public LLFloater public: LLFloaterMyScripts(const LLSD& seed); - BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void setAttachmentDetails(LLSD content); void setAttachmentSummary(LLSD content); bool requestAttachmentDetails(); diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 1e9549a04e..bbe125659f 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -64,7 +64,7 @@ const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; //----------------------------------------------------------------------------- LLFloaterNameDesc::LLFloaterNameDesc(const LLSD& filename ) : LLFloater(filename), - mIsAudio(FALSE) + mIsAudio(false) { mFilenameAndPath = filename.asString(); mFilename = gDirUtilp->getBaseFileName(mFilenameAndPath, false); @@ -73,7 +73,7 @@ LLFloaterNameDesc::LLFloaterNameDesc(const LLSD& filename ) //----------------------------------------------------------------------------- // postBuild() //----------------------------------------------------------------------------- -BOOL LLFloaterNameDesc::postBuild() +bool LLFloaterNameDesc::postBuild() { LLRect r; @@ -135,7 +135,7 @@ BOOL LLFloaterNameDesc::postBuild() setDefaultBtn("ok_btn"); - return TRUE; + return true; } S32 LLFloaterNameDesc::getExpectedUploadCost() const @@ -186,7 +186,7 @@ void LLFloaterNameDesc::doCommit() //----------------------------------------------------------------------------- void LLFloaterNameDesc::onBtnOK( ) { - getChildView("ok_btn")->setEnabled(FALSE); // don't allow inadvertent extra uploads + getChildView("ok_btn")->setEnabled(false); // don't allow inadvertent extra uploads LLAssetStorage::LLStoreAssetCallback callback; S32 expected_upload_cost = getExpectedUploadCost(); @@ -233,17 +233,17 @@ void LLFloaterNameDesc::onBtnCancel() LLFloaterSoundPreview::LLFloaterSoundPreview(const LLSD& filename ) : LLFloaterNameDesc(filename) { - mIsAudio = TRUE; + mIsAudio = true; } -BOOL LLFloaterSoundPreview::postBuild() +bool LLFloaterSoundPreview::postBuild() { if (!LLFloaterNameDesc::postBuild()) { - return FALSE; + return false; } getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); - return TRUE; + return true; } @@ -256,14 +256,14 @@ LLFloaterAnimPreview::LLFloaterAnimPreview(const LLSD& filename ) { } -BOOL LLFloaterAnimPreview::postBuild() +bool LLFloaterAnimPreview::postBuild() { if (!LLFloaterNameDesc::postBuild()) { - return FALSE; + return false; } getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -273,15 +273,15 @@ BOOL LLFloaterAnimPreview::postBuild() LLFloaterScriptPreview::LLFloaterScriptPreview(const LLSD& filename ) : LLFloaterNameDesc(filename) { - mIsText = TRUE; + mIsText = true; } -BOOL LLFloaterScriptPreview::postBuild() +bool LLFloaterScriptPreview::postBuild() { if (!LLFloaterNameDesc::postBuild()) { - return FALSE; + return false; } getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); - return TRUE; + return true; } diff --git a/indra/newview/llfloaternamedesc.h b/indra/newview/llfloaternamedesc.h index 589f470e82..e6a7c71141 100644 --- a/indra/newview/llfloaternamedesc.h +++ b/indra/newview/llfloaternamedesc.h @@ -41,7 +41,7 @@ class LLFloaterNameDesc : public LLFloater public: LLFloaterNameDesc(const LLSD& filename); virtual ~LLFloaterNameDesc(); - virtual BOOL postBuild(); + bool postBuild() override; void onBtnOK(); void onBtnCancel(); @@ -53,7 +53,7 @@ protected: virtual void onCommit(); protected: - BOOL mIsAudio; + bool mIsAudio; bool mIsText; std::string mFilenameAndPath; @@ -64,21 +64,21 @@ class LLFloaterSoundPreview : public LLFloaterNameDesc { public: LLFloaterSoundPreview(const LLSD& filename ); - virtual BOOL postBuild(); + bool postBuild() override; }; class LLFloaterAnimPreview : public LLFloaterNameDesc { public: LLFloaterAnimPreview(const LLSD& filename ); - virtual BOOL postBuild(); + bool postBuild() override; }; class LLFloaterScriptPreview : public LLFloaterNameDesc { public: LLFloaterScriptPreview(const LLSD& filename ); - virtual BOOL postBuild(); + bool postBuild() override; }; #endif // LL_LLFLOATERNAMEDESC_H diff --git a/indra/newview/llfloaternewfeaturenotification.cpp b/indra/newview/llfloaternewfeaturenotification.cpp index 1e50024967..20469db509 100644 --- a/indra/newview/llfloaternewfeaturenotification.cpp +++ b/indra/newview/llfloaternewfeaturenotification.cpp @@ -38,7 +38,7 @@ LLFloaterNewFeatureNotification::~LLFloaterNewFeatureNotification() { } -BOOL LLFloaterNewFeatureNotification::postBuild() +bool LLFloaterNewFeatureNotification::postBuild() { setCanDrag(FALSE); getChild<LLButton>("close_btn")->setCommitCallback(boost::bind(&LLFloaterNewFeatureNotification::onCloseBtn, this)); @@ -57,7 +57,7 @@ BOOL LLFloaterNewFeatureNotification::postBuild() reshape(rect.getWidth() + 90, rect.getHeight() + 45); } - return TRUE; + return true; } void LLFloaterNewFeatureNotification::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaternewfeaturenotification.h b/indra/newview/llfloaternewfeaturenotification.h index 95501451dc..c007e01d9f 100644 --- a/indra/newview/llfloaternewfeaturenotification.h +++ b/indra/newview/llfloaternewfeaturenotification.h @@ -34,7 +34,7 @@ class LLFloaterNewFeatureNotification: { friend class LLFloaterReg; public: - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; private: diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index fd03efa061..ce32630eee 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -42,7 +42,7 @@ class LLNotificationChannelPanel : public LLLayoutPanel public: LLNotificationChannelPanel(const Params& p); ~LLNotificationChannelPanel(); - BOOL postBuild(); + bool postBuild(); private: bool update(const LLSD& payload); @@ -72,7 +72,7 @@ LLNotificationChannelPanel::~LLNotificationChannelPanel() } } -BOOL LLNotificationChannelPanel::postBuild() +bool LLNotificationChannelPanel::postBuild() { LLButton* header_button = getChild<LLButton>("header"); header_button->setLabel(mChannelPtr->getName()); @@ -83,7 +83,7 @@ BOOL LLNotificationChannelPanel::postBuild() LLScrollListCtrl* scroll = getChild<LLScrollListCtrl>("notifications_list"); scroll->setDoubleClickCallback(onClickNotification, this); scroll->setRect(LLRect( getRect().mLeft, getRect().mTop, getRect().mRight, 0)); - return TRUE; + return true; } //static @@ -154,7 +154,7 @@ LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key) mCommitCallbackRegistrar.add("ClickAdd", boost::bind(&LLFloaterNotificationConsole::onClickAdd, this)); } -BOOL LLFloaterNotificationConsole::postBuild() +bool LLFloaterNotificationConsole::postBuild() { // these are in the order of processing addChannel("Unexpired"); @@ -181,7 +181,7 @@ BOOL LLFloaterNotificationConsole::postBuild() } notifications->sortByName(); - return TRUE; + return true; } void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open) @@ -240,7 +240,7 @@ LLFloaterNotification::LLFloaterNotification(LLNotification* note) buildFromFile("floater_notification.xml"); } -BOOL LLFloaterNotification::postBuild() +bool LLFloaterNotification::postBuild() { setTitle(mNote->getName()); getChild<LLUICtrl>("payload")->setValue(mNote->getMessage()); @@ -250,7 +250,7 @@ BOOL LLFloaterNotification::postBuild() LLNotificationFormPtr form(mNote->getForm()); if(!form) { - return TRUE; + return true; } responses_combo->setCommitCallback(onCommitResponse, this); @@ -264,7 +264,7 @@ BOOL LLFloaterNotification::postBuild() response_list->addSimpleElement(text); } - return TRUE; + return true; } void LLFloaterNotification::respond() diff --git a/indra/newview/llfloaternotificationsconsole.h b/indra/newview/llfloaternotificationsconsole.h index 4e92b7d857..c3bc2d39be 100644 --- a/indra/newview/llfloaternotificationsconsole.h +++ b/indra/newview/llfloaternotificationsconsole.h @@ -41,7 +41,7 @@ class LLFloaterNotificationConsole : public: // LLPanel - BOOL postBuild(); + bool postBuild(); void addChannel(const std::string& type, bool open = false); void updateResizeLimits(LLLayoutStack &stack); @@ -64,7 +64,7 @@ public: LLFloaterNotification(LLNotification* note); // LLPanel - BOOL postBuild(); + bool postBuild(); void respond(); private: diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index d1679fd936..1cea7d03fe 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -58,7 +58,7 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LL } //--------------------------------------------------------------------------------- -BOOL LLFloaterNotificationsTabbed::postBuild() +bool LLFloaterNotificationsTabbed::postBuild() { mGroupInviteMessageList = getChild<LLNotificationListView>("group_invite_notification_list"); mGroupNoticeMessageList = getChild<LLNotificationListView>("group_notice_notification_list"); @@ -78,14 +78,14 @@ BOOL LLFloaterNotificationsTabbed::postBuild() // get a corresponding channel initChannel(); - BOOL rv = LLTransientDockableFloater::postBuild(); + bool rv = LLTransientDockableFloater::postBuild(); setTitle(getString("title_notification_tabbed_window")); return rv; } //--------------------------------------------------------------------------------- -void LLFloaterNotificationsTabbed::setMinimized(BOOL minimize) +void LLFloaterNotificationsTabbed::setMinimized(bool minimize) { LLTransientDockableFloater::setMinimized(minimize); } @@ -168,7 +168,7 @@ void LLFloaterNotificationsTabbed::initChannel() } //--------------------------------------------------------------------------------- -void LLFloaterNotificationsTabbed::setVisible(BOOL visible) +void LLFloaterNotificationsTabbed::setVisible(bool visible) { if (visible) { diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h index 8dd20b18c4..a8ff3d8002 100644 --- a/indra/newview/llfloaternotificationstabbed.h +++ b/indra/newview/llfloaternotificationstabbed.h @@ -72,7 +72,7 @@ public: LLFloaterNotificationsTabbed(const LLSD& key); virtual ~LLFloaterNotificationsTabbed(); - BOOL postBuild(); + bool postBuild(); // other interface functions // check is window empty @@ -85,11 +85,11 @@ public: void updateNotificationCounter(S32 panelIndex, S32 counterValue, std::string stringName); // Operating with outfit - virtual void setVisible(BOOL visible); + virtual void setVisible(bool visible); /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 - /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void setMinimized(bool minimize); /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onStartUpToastClick(S32 x, S32 y, MASK mask); @@ -101,8 +101,8 @@ public: static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD()); // size constants for the window and for its elements - static const S32 MAX_WINDOW_HEIGHT = 200; - static const S32 MIN_WINDOW_WIDTH = 318; + static constexpr S32 MAX_WINDOW_HEIGHT = 200; + static constexpr S32 MIN_WINDOW_WIDTH = 318; private: // init Window's channel diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp index ed1ad4426f..96e7ae8b98 100644 --- a/indra/newview/llfloaterobjectweights.cpp +++ b/indra/newview/llfloaterobjectweights.cpp @@ -84,7 +84,7 @@ LLFloaterObjectWeights::~LLFloaterObjectWeights() } // virtual -BOOL LLFloaterObjectWeights::postBuild() +bool LLFloaterObjectWeights::postBuild() { mSelectedObjects = getChild<LLTextBox>("objects"); mSelectedPrims = getChild<LLTextBox>("prims"); @@ -99,7 +99,7 @@ BOOL LLFloaterObjectWeights::postBuild() mRemainingCapacity = getChild<LLTextBox>("remaining_capacity"); mTotalCapacity = getChild<LLTextBox>("total_capacity"); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h index 1a2c317bad..90df0a47ee 100644 --- a/indra/newview/llfloaterobjectweights.h +++ b/indra/newview/llfloaterobjectweights.h @@ -58,7 +58,7 @@ public: LLFloaterObjectWeights(const LLSD& key); ~LLFloaterObjectWeights(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index d3ab22f792..b246f6283d 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -65,13 +65,13 @@ LLFloaterOpenObject::~LLFloaterOpenObject() } // virtual -BOOL LLFloaterOpenObject::postBuild() +bool LLFloaterOpenObject::postBuild() { getChild<LLUICtrl>("object_name")->setTextArg("[DESC]", std::string("Object") ); // *Note: probably do not want to translate this mPanelInventoryObject = getChild<LLPanelObjectInventory>("object_contents"); refresh(); - return TRUE; + return true; } void LLFloaterOpenObject::onOpen(const LLSD& key) diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h index 745753316b..3b81601eb6 100644 --- a/indra/newview/llfloateropenobject.h +++ b/indra/newview/llfloateropenobject.h @@ -55,7 +55,7 @@ public: protected: - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void refresh(); void draw(); virtual void onOpen(const LLSD& key); diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp index 87f927ff65..2be10dc57a 100644 --- a/indra/newview/llfloaterpathfindingcharacters.cpp +++ b/indra/newview/llfloaterpathfindingcharacters.cpp @@ -117,7 +117,7 @@ LLFloaterPathfindingCharacters::~LLFloaterPathfindingCharacters() { } -BOOL LLFloaterPathfindingCharacters::postBuild() +bool LLFloaterPathfindingCharacters::postBuild() { mBeaconColor = LLUIColorTable::getInstance()->getColor("PathfindingCharacterBeaconColor"); diff --git a/indra/newview/llfloaterpathfindingcharacters.h b/indra/newview/llfloaterpathfindingcharacters.h index 4021f4f119..6c68d027d4 100644 --- a/indra/newview/llfloaterpathfindingcharacters.h +++ b/indra/newview/llfloaterpathfindingcharacters.h @@ -58,7 +58,7 @@ protected: LLFloaterPathfindingCharacters(const LLSD& pSeed); virtual ~LLFloaterPathfindingCharacters(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void requestGetObjects(); diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index ccf3e723fd..f2e4421705 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -95,7 +95,7 @@ LLHandle<LLFloaterPathfindingConsole> LLFloaterPathfindingConsole::sInstanceHand // LLFloaterPathfindingConsole //--------------------------------------------------------------------------- -BOOL LLFloaterPathfindingConsole::postBuild() +bool LLFloaterPathfindingConsole::postBuild() { mViewTestTabContainer = findChild<LLTabContainer>("view_test_tab_container"); llassert(mViewTestTabContainer != NULL); diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index e999e57741..bfd267ca10 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -55,7 +55,7 @@ class LLFloaterPathfindingConsole friend class LLFloaterReg; public: - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void onOpen(const LLSD& pKey); virtual void onClose(bool pIsAppQuitting); diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 03aede94c6..fa423a819a 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -111,7 +111,7 @@ LLFloaterPathfindingLinksets::~LLFloaterPathfindingLinksets() { } -BOOL LLFloaterPathfindingLinksets::postBuild() +bool LLFloaterPathfindingLinksets::postBuild() { mBeaconColor = LLUIColorTable::getInstance()->getColor("PathfindingLinksetBeaconColor"); diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h index a954d8a8ec..efdbc573ec 100644 --- a/indra/newview/llfloaterpathfindinglinksets.h +++ b/indra/newview/llfloaterpathfindinglinksets.h @@ -55,7 +55,7 @@ protected: LLFloaterPathfindingLinksets(const LLSD& pSeed); virtual ~LLFloaterPathfindingLinksets(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void requestGetObjects(); diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp index 5cf16f3ad6..84b10a900c 100644 --- a/indra/newview/llfloaterpathfindingobjects.cpp +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -194,7 +194,7 @@ LLFloaterPathfindingObjects::~LLFloaterPathfindingObjects() clearAllObjects(); } -BOOL LLFloaterPathfindingObjects::postBuild() +bool LLFloaterPathfindingObjects::postBuild() { mDefaultBeaconColor = LLUIColorTable::getInstance()->getColor("PathfindingDefaultBeaconColor"); mDefaultBeaconTextColor = LLUIColorTable::getInstance()->getColor("PathfindingDefaultBeaconTextColor"); @@ -204,7 +204,7 @@ BOOL LLFloaterPathfindingObjects::postBuild() mObjectsScrollList = findChild<LLScrollListCtrl>("objects_scroll_list"); llassert(mObjectsScrollList != NULL); mObjectsScrollList->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onScrollListSelectionChanged, this)); - mObjectsScrollList->sortByColumnIndex(static_cast<U32>(getNameColumnIndex()), TRUE); + mObjectsScrollList->sortByColumnIndex(static_cast<U32>(getNameColumnIndex()), true); mMessagingStatus = findChild<LLTextBase>("messaging_status"); llassert(mMessagingStatus != NULL); diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h index 752f741959..15008a5af5 100644 --- a/indra/newview/llfloaterpathfindingobjects.h +++ b/indra/newview/llfloaterpathfindingobjects.h @@ -73,7 +73,7 @@ protected: LLFloaterPathfindingObjects(const LLSD &pSeed); virtual ~LLFloaterPathfindingObjects(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void requestGetObjects(); LLPathfindingManager::request_id_t getNewRequestId(); diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index bab6631d54..14587592e0 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -83,7 +83,7 @@ class LLFloaterPay : public LLFloater public: LLFloaterPay(const LLSD& key); virtual ~LLFloaterPay(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onClose(bool app_quitting); void setCallback(money_callback callback) { mCallback = callback; } @@ -150,7 +150,7 @@ LLFloaterPay::~LLFloaterPay() gMessageSystem->setHandlerFuncFast(_PREHASH_PayPriceReply, 0, 0); } -BOOL LLFloaterPay::postBuild() +bool LLFloaterPay::postBuild() { S32 i = 0; @@ -158,7 +158,7 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 1", boost::bind(LLFloaterPay::onGive, info)); - getChildView("fastpay 1")->setVisible(FALSE); + getChildView("fastpay 1")->setVisible(false); mQuickPayButton[i] = getChild<LLButton>("fastpay 1"); mQuickPayInfo[i] = info; @@ -168,7 +168,7 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 5", boost::bind(LLFloaterPay::onGive, info)); - getChildView("fastpay 5")->setVisible(FALSE); + getChildView("fastpay 5")->setVisible(false); mQuickPayButton[i] = getChild<LLButton>("fastpay 5"); mQuickPayInfo[i] = info; @@ -178,7 +178,7 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 10", boost::bind(LLFloaterPay::onGive, info)); - getChildView("fastpay 10")->setVisible(FALSE); + getChildView("fastpay 10")->setVisible(false); mQuickPayButton[i] = getChild<LLButton>("fastpay 10"); mQuickPayInfo[i] = info; @@ -188,15 +188,15 @@ BOOL LLFloaterPay::postBuild() mCallbackData.push_back(info); childSetAction("fastpay 20", boost::bind(LLFloaterPay::onGive, info)); - getChildView("fastpay 20")->setVisible(FALSE); + getChildView("fastpay 20")->setVisible(false); mQuickPayButton[i] = getChild<LLButton>("fastpay 20"); mQuickPayInfo[i] = info; ++i; - getChildView("amount text")->setVisible(FALSE); - getChildView("amount")->setVisible(FALSE); + getChildView("amount text")->setVisible(false); + getChildView("amount")->setVisible(false); getChild<LLLineEditor>("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this); getChild<LLLineEditor>("amount")->setPrevalidate(LLTextValidate::validateNonNegativeS32); @@ -206,12 +206,12 @@ BOOL LLFloaterPay::postBuild() childSetAction("pay btn", boost::bind(LLFloaterPay::onGive, info)); setDefaultBtn("pay btn"); - getChildView("pay btn")->setVisible(FALSE); - getChildView("pay btn")->setEnabled(FALSE); + getChildView("pay btn")->setVisible(false); + getChildView("pay btn")->setEnabled(false); childSetAction("cancel btn",&LLFloaterPay::onCancel,this); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp index fe85672c54..cb1c10090b 100644 --- a/indra/newview/llfloaterperformance.cpp +++ b/indra/newview/llfloaterperformance.cpp @@ -91,7 +91,7 @@ LLFloaterPerformance::~LLFloaterPerformance() delete mUpdateTimer; } -BOOL LLFloaterPerformance::postBuild() +bool LLFloaterPerformance::postBuild() { mMainPanel = getChild<LLPanel>("panel_performance_main"); mNearbyPanel = getChild<LLPanel>("panel_performance_nearby"); @@ -154,7 +154,7 @@ BOOL LLFloaterPerformance::postBuild() gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", FALSE, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS); - return TRUE; + return true; } void LLFloaterPerformance::showSelectedPanel(LLPanel* selected_panel) diff --git a/indra/newview/llfloaterperformance.h b/indra/newview/llfloaterperformance.h index 620dbac5bb..5fecd99825 100644 --- a/indra/newview/llfloaterperformance.h +++ b/indra/newview/llfloaterperformance.h @@ -38,7 +38,7 @@ public: LLFloaterPerformance(const LLSD& key); virtual ~LLFloaterPerformance(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); void showSelectedPanel(LLPanel* selected_panel); diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 4f67bead78..2a223124a8 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -46,9 +46,9 @@ LLFloaterPerms::LLFloaterPerms(const LLSD& seed) { } -BOOL LLFloaterPerms::postBuild() +bool LLFloaterPerms::postBuild() { - return TRUE; + return true; } //static @@ -126,7 +126,7 @@ const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] = "Materials" }; -BOOL LLFloaterPermsDefault::postBuild() +bool LLFloaterPermsDefault::postBuild() { if(!gSavedSettings.getBOOL("DefaultUploadPermissionsConverted")) { @@ -171,8 +171,8 @@ void LLFloaterPermsDefault::onCommitCopy(const LLSD& user_data) xfer->setEnabled(copyable); } -const int MAX_HTTP_RETRIES = 5; -const float RETRY_TIMEOUT = 5.0; +constexpr int MAX_HTTP_RETRIES = 5; +constexpr float RETRY_TIMEOUT = 5.0; void LLFloaterPermsDefault::sendInitialPerms() { diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index 97ddec7cba..873c6a262a 100644 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -37,7 +37,7 @@ class LLFloaterPerms : public LLFloater friend class LLFloaterReg; public: - /*virtual*/ BOOL postBuild(); + bool postBuild() override; // Convenience methods to get current permission preference bitfields from saved settings: static U32 getEveryonePerms(std::string prefix=""); // prefix + "EveryoneCopy" @@ -55,7 +55,7 @@ class LLFloaterPermsDefault : public LLFloater friend class LLFloaterReg; public: - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void ok(); void cancel(); void onClickOK(); diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp index 2d61109e17..376d36f61a 100644 --- a/indra/newview/llfloaterpostprocess.cpp +++ b/indra/newview/llfloaterpostprocess.cpp @@ -49,7 +49,7 @@ LLFloaterPostProcess::~LLFloaterPostProcess() } -BOOL LLFloaterPostProcess::postBuild() +bool LLFloaterPostProcess::postBuild() { /// Color Filter Callbacks childSetCommitCallback("ColorFilterToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_color_filter"); @@ -84,7 +84,7 @@ BOOL LLFloaterPostProcess::postBuild() getChild<LLComboBox>("PPSaveEffect")->setCommitCallback(boost::bind(&LLFloaterPostProcess::onSaveEffect, this, editBox)); syncMenu(); - return TRUE; + return true; } // Bool Toggle diff --git a/indra/newview/llfloaterpostprocess.h b/indra/newview/llfloaterpostprocess.h index 424a5fc8f0..bc978efdb7 100644 --- a/indra/newview/llfloaterpostprocess.h +++ b/indra/newview/llfloaterpostprocess.h @@ -49,7 +49,7 @@ public: LLFloaterPostProcess(const LLSD& key); virtual ~LLFloaterPostProcess(); - /*virtual*/ BOOL postBuild(); + bool postBuild(); /// post process callbacks static void onBoolToggle(LLUICtrl* ctrl, void* userData); @@ -67,11 +67,6 @@ public: /// sync up sliders void syncMenu(); - -/* - void refresh(); -*/ -public: }; #endif diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 19a4081eba..d925ab5ece 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -427,7 +427,7 @@ void LLFloaterPreference::saveAvatarPropertiesCoro(const std::string cap_url, bo LL_DEBUGS("Preferences") << "Agent id: " << gAgentID << " Data: " << data << " Result: " << httpResults << LL_ENDL; } -BOOL LLFloaterPreference::postBuild() +bool LLFloaterPreference::postBuild() { gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false)); @@ -504,7 +504,7 @@ BOOL LLFloaterPreference::postBuild() getChild<LLComboBox>("language_combobox")->add("System default", LLSD("default"), ADD_TOP, true); } - return TRUE; + return true; } void LLFloaterPreference::updateDeleteTranscriptsButton() @@ -2007,7 +2007,7 @@ LLPanelPreference::LLPanelPreference() } //virtual -BOOL LLPanelPreference::postBuild() +bool LLPanelPreference::postBuild() { ////////////////////// PanelGeneral /////////////////// if (hasChild("display_names_check", TRUE)) @@ -2324,7 +2324,7 @@ private: static LLPanelInjector<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics"); static LLPanelInjector<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy"); -BOOL LLPanelPreferenceGraphics::postBuild() +bool LLPanelPreferenceGraphics::postBuild() { LLFloaterReg::showInstance("prefs_graphics_advanced"); LLFloaterReg::hideInstance("prefs_graphics_advanced"); @@ -2511,7 +2511,7 @@ LLPanelPreferenceControls::~LLPanelPreferenceControls() { } -BOOL LLPanelPreferenceControls::postBuild() +bool LLPanelPreferenceControls::postBuild() { // populate list of controls pControlsTable = getChild<LLScrollListCtrl>("controls_list"); @@ -2521,7 +2521,7 @@ BOOL LLPanelPreferenceControls::postBuild() pKeyModeBox->setCommitCallback(boost::bind(&LLPanelPreferenceControls::onModeCommit, this)); getChild<LLButton>("restore_defaults")->setCommitCallback(boost::bind(&LLPanelPreferenceControls::onRestoreDefaultsBtn, this)); - return TRUE; + return true; } void LLPanelPreferenceControls::regenerateControls() @@ -3113,12 +3113,12 @@ LLFloaterPreferenceProxy::~LLFloaterPreferenceProxy() { } -BOOL LLFloaterPreferenceProxy::postBuild() +bool LLFloaterPreferenceProxy::postBuild() { LLRadioGroup* socksAuth = getChild<LLRadioGroup>("socks5_auth_type"); if (!socksAuth) { - return FALSE; + return false; } if (socksAuth->getSelectedValue().asString() == "None") { @@ -3133,7 +3133,7 @@ BOOL LLFloaterPreferenceProxy::postBuild() getChild<LLLineEditor>("socks5_password")->setValue(socks_cred->getAuthenticator()["creds"].asString()); } - return TRUE; + return true; } void LLFloaterPreferenceProxy::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index bdade3c1b9..8a231cc10b 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -81,7 +81,7 @@ public: void apply(); void cancel(const std::vector<std::string> settings_to_skip = {}); /*virtual*/ void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void changed(); @@ -246,7 +246,7 @@ class LLPanelPreference : public LLPanel { public: LLPanelPreference(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); virtual ~LLPanelPreference(); @@ -292,7 +292,7 @@ private: class LLPanelPreferenceGraphics : public LLPanelPreference { public: - BOOL postBuild(); + bool postBuild(); void draw(); void cancel(const std::vector<std::string> settings_to_skip = {}); void saveSettings(); @@ -315,7 +315,7 @@ public: LLPanelPreferenceControls(); virtual ~LLPanelPreferenceControls(); - BOOL postBuild(); + bool postBuild(); void apply(); void cancel(const std::vector<std::string> settings_to_skip = {}); @@ -386,7 +386,7 @@ public: void cancel(); protected: - BOOL postBuild(); + bool postBuild(); void onOpen(const LLSD& key); void onClose(bool app_quitting); void saveSettings(); diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp index f83ce868a3..364ebe93c4 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp @@ -61,7 +61,7 @@ LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced() mLODFactorChangedSignal.disconnect(); } -BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild() +bool LLFloaterPreferenceGraphicsAdvanced::postBuild() { // Don't do this on Mac as their braindead GL versioning // sets this when 8x and 16x are indeed available @@ -80,7 +80,7 @@ BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild() mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateComplexityText, this)); mLODFactorChangedSignal = gSavedSettings.getControl("RenderVolumeLODFactor")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateObjectMeshDetailText, this)); - return TRUE; + return true; } void LLFloaterPreferenceGraphicsAdvanced::onOpen(const LLSD& key) diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.h b/indra/newview/llfloaterpreferencesgraphicsadvanced.h index 2c92f3dbf1..ed7c1fc926 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.h +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.h @@ -37,7 +37,7 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater public: LLFloaterPreferenceGraphicsAdvanced(const LLSD& key); ~LLFloaterPreferenceGraphicsAdvanced(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void onOpen(const LLSD& key); void onClickCloseBtn(bool app_quitting); void disableUnavailableSettings(); diff --git a/indra/newview/llfloaterpreviewtrash.cpp b/indra/newview/llfloaterpreviewtrash.cpp index cf4e3f04e6..52f87571d8 100644 --- a/indra/newview/llfloaterpreviewtrash.cpp +++ b/indra/newview/llfloaterpreviewtrash.cpp @@ -37,7 +37,7 @@ LLFloaterPreviewTrash::LLFloaterPreviewTrash(const LLSD& key) { } -BOOL LLFloaterPreviewTrash::postBuild() +bool LLFloaterPreviewTrash::postBuild() { getChild<LLUICtrl>("empty_btn")->setCommitCallback( boost::bind(&LLFloaterPreviewTrash::onClickEmpty, this)); @@ -49,7 +49,7 @@ BOOL LLFloaterPreviewTrash::postBuild() // mid-session and the saved rect is off-center. center(); - return TRUE; + return true; } LLFloaterPreviewTrash::~LLFloaterPreviewTrash() diff --git a/indra/newview/llfloaterpreviewtrash.h b/indra/newview/llfloaterpreviewtrash.h index 465c0c677f..ec071931a5 100644 --- a/indra/newview/llfloaterpreviewtrash.h +++ b/indra/newview/llfloaterpreviewtrash.h @@ -39,7 +39,7 @@ public: LLFloaterPreviewTrash(const LLSD& key); ~LLFloaterPreviewTrash(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; protected: void onClickEmpty(); diff --git a/indra/newview/llfloaterprofile.cpp b/indra/newview/llfloaterprofile.cpp index 6ccdace6c5..33d5114c98 100644 --- a/indra/newview/llfloaterprofile.cpp +++ b/indra/newview/llfloaterprofile.cpp @@ -59,11 +59,11 @@ void LLFloaterProfile::onOpen(const LLSD& key) mNameCallbackConnection = LLAvatarNameCache::get(mAvatarId, boost::bind(&LLFloaterProfile::onAvatarNameCache, this, _1, _2)); } -BOOL LLFloaterProfile::postBuild() +bool LLFloaterProfile::postBuild() { mPanelProfile = findChild<LLPanelProfile>(PANEL_PROFILE_VIEW); - return TRUE; + return true; } void LLFloaterProfile::onClickCloseBtn(bool app_quitting) diff --git a/indra/newview/llfloaterprofile.h b/indra/newview/llfloaterprofile.h index b3ed02fc2c..20c82c07b1 100644 --- a/indra/newview/llfloaterprofile.h +++ b/indra/newview/llfloaterprofile.h @@ -40,7 +40,7 @@ public: LLFloaterProfile(const LLSD& key); virtual ~LLFloaterProfile(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; void onClickCloseBtn(bool app_quitting = false) override; diff --git a/indra/newview/llfloaterprofiletexture.cpp b/indra/newview/llfloaterprofiletexture.cpp index bf1f56a6d1..425f0c1687 100644 --- a/indra/newview/llfloaterprofiletexture.cpp +++ b/indra/newview/llfloaterprofiletexture.cpp @@ -61,18 +61,18 @@ LLFloaterProfileTexture::~LLFloaterProfileTexture() } // virtual -BOOL LLFloaterProfileTexture::postBuild() +bool LLFloaterProfileTexture::postBuild() { mProfileIcon = getChild<LLIconCtrl>("profile_pic"); mCloseButton = getChild<LLButton>("close_btn"); mCloseButton->setCommitCallback([this](LLUICtrl*, void*) { closeFloater(); }, nullptr); - return TRUE; + return true; } // virtual -void LLFloaterProfileTexture::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLFloaterProfileTexture::reshape(S32 width, S32 height, bool called_from_parent) { LLFloater::reshape(width, height, called_from_parent); } diff --git a/indra/newview/llfloaterprofiletexture.h b/indra/newview/llfloaterprofiletexture.h index 66a61213dd..8d51b4fe91 100644 --- a/indra/newview/llfloaterprofiletexture.h +++ b/indra/newview/llfloaterprofiletexture.h @@ -56,9 +56,9 @@ public: BOOL final, void* userdata); - void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) override; + void reshape(S32 width, S32 height, bool called_from_parent = true) override; protected: - BOOL postBuild() override; + bool postBuild() override; private: void updateDimensions(); diff --git a/indra/newview/llfloaterregiondebugconsole.cpp b/indra/newview/llfloaterregiondebugconsole.cpp index e817589622..1e3be4ce71 100644 --- a/indra/newview/llfloaterregiondebugconsole.cpp +++ b/indra/newview/llfloaterregiondebugconsole.cpp @@ -106,7 +106,7 @@ LLFloaterRegionDebugConsole::~LLFloaterRegionDebugConsole() mReplySignalConnection.disconnect(); } -BOOL LLFloaterRegionDebugConsole::postBuild() +bool LLFloaterRegionDebugConsole::postBuild() { LLLineEditor* input = getChild<LLLineEditor>("region_debug_console_input"); input->setEnableLineHistory(true); @@ -126,12 +126,12 @@ BOOL LLFloaterRegionDebugConsole::postBuild() mOutput->appendText( CONSOLE_NOT_SUPPORTED + PROMPT, false); - return TRUE; + return true; } } mOutput->appendText("> ", false); - return TRUE; + return true; } void LLFloaterRegionDebugConsole::onInput(LLUICtrl* ctrl, const LLSD& param) diff --git a/indra/newview/llfloaterregiondebugconsole.h b/indra/newview/llfloaterregiondebugconsole.h index f55d964924..05b6f7d356 100644 --- a/indra/newview/llfloaterregiondebugconsole.h +++ b/indra/newview/llfloaterregiondebugconsole.h @@ -43,8 +43,7 @@ public: LLFloaterRegionDebugConsole(LLSD const & key); virtual ~LLFloaterRegionDebugConsole(); - // virtual - BOOL postBuild(); + bool postBuild() override; void onInput(LLUICtrl* ctrl, const LLSD& param); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index f9bb954b82..03245e6b3c 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -196,7 +196,7 @@ public: bool refreshFromRegion(LLViewerRegion* region); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override {}; virtual S32 getParcelId() override { return INVALID_PARCEL_ID; } @@ -234,7 +234,7 @@ LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed) mRegionChangedCallback() {} -BOOL LLFloaterRegionInfo::postBuild() +bool LLFloaterRegionInfo::postBuild() { mTab = getChild<LLTabContainer>("region_panels"); mTab->setCommitCallback(boost::bind(&LLFloaterRegionInfo::onTabSelected, this, _2)); @@ -279,7 +279,7 @@ BOOL LLFloaterRegionInfo::postBuild() if(gDisconnected) { - return TRUE; + return true; } if(!gAgent.getRegionCapability("RegionExperiences").empty()) @@ -297,7 +297,7 @@ BOOL LLFloaterRegionInfo::postBuild() // Request region info when agent region changes. mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionInfo::onRegionChanged, this)); - return TRUE; + return true; } LLFloaterRegionInfo::~LLFloaterRegionInfo() @@ -742,7 +742,7 @@ void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data) // virtual -BOOL LLPanelRegionInfo::postBuild() +bool LLPanelRegionInfo::postBuild() { // If the panel has an Apply button, set a callback for it. LLUICtrl* apply_btn = findChild<LLUICtrl>("apply_btn"); @@ -752,7 +752,7 @@ BOOL LLPanelRegionInfo::postBuild() } refresh(); - return TRUE; + return true; } // virtual @@ -844,7 +844,7 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) return LLPanelRegionInfo::refreshFromRegion(region); } -BOOL LLPanelRegionGeneralInfo::postBuild() +bool LLPanelRegionGeneralInfo::postBuild() { // Enable the "Apply" button if something is changed. JC initCtrl("block_terraform_check"); @@ -871,7 +871,7 @@ BOOL LLPanelRegionGeneralInfo::postBuild() } refresh(); - return TRUE; + return true; } void LLPanelRegionGeneralInfo::onBtnSet() @@ -1091,7 +1091,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() ///////////////////////////////////////////////////////////////////////////// // LLPanelRegionDebugInfo ///////////////////////////////////////////////////////////////////////////// -BOOL LLPanelRegionDebugInfo::postBuild() +bool LLPanelRegionDebugInfo::postBuild() { LLPanelRegionInfo::postBuild(); initCtrl("disable_scripts_check"); @@ -1106,7 +1106,7 @@ BOOL LLPanelRegionDebugInfo::postBuild() childSetAction("cancel_restart_btn", onClickCancelRestart, this); childSetAction("region_debug_console_btn", onClickDebugConsole, this); - return TRUE; + return true; } // virtual @@ -1372,7 +1372,7 @@ BOOL LLPanelRegionTerrainInfo::validateTextureHeights() ///////////////////////////////////////////////////////////////////////////// // Initialize statics -BOOL LLPanelRegionTerrainInfo::postBuild() +bool LLPanelRegionTerrainInfo::postBuild() { LLPanelRegionInfo::postBuild(); @@ -1859,7 +1859,7 @@ bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg) } -BOOL LLPanelEstateInfo::postBuild() +bool LLPanelEstateInfo::postBuild() { // set up the callbacks for the generic controls initCtrl("externally_visible_radio"); @@ -2125,7 +2125,7 @@ bool LLPanelEstateCovenant::estateUpdate(LLMessageSystem* msg) } // virtual -BOOL LLPanelEstateCovenant::postBuild() +bool LLPanelEstateCovenant::postBuild() { mEstateNameText = getChild<LLTextBox>("estate_name_text"); mEstateOwnerText = getChild<LLTextBox>("estate_owner_text"); @@ -2145,7 +2145,7 @@ void LLPanelEstateCovenant::updateChild(LLUICtrl* child_ctrl) } // virtual -BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -2176,7 +2176,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop break; } - return TRUE; + return true; } // static @@ -2498,7 +2498,7 @@ bool LLDispatchSetEstateExperience::operator()( return true; } -BOOL LLPanelRegionExperiences::postBuild() +bool LLPanelRegionExperiences::postBuild() { mAllowed = setupList("panel_allowed", ESTATE_EXPERIENCE_ALLOWED_ADD, ESTATE_EXPERIENCE_ALLOWED_REMOVE); mTrusted = setupList("panel_trusted", ESTATE_EXPERIENCE_TRUSTED_ADD, ESTATE_EXPERIENCE_TRUSTED_REMOVE); @@ -2762,13 +2762,13 @@ LLPanelEstateAccess::LLPanelEstateAccess() : LLPanelRegionInfo(), mPendingUpdate(false) {} -BOOL LLPanelEstateAccess::postBuild() +bool LLPanelEstateAccess::postBuild() { getChild<LLUICtrl>("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1)); LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list"); if (avatar_name_list) { - avatar_name_list->setCommitOnSelectionChange(TRUE); + avatar_name_list->setCommitOnSelectionChange(true); avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); } @@ -2781,7 +2781,7 @@ BOOL LLPanelEstateAccess::postBuild() LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list"); if (group_name_list) { - group_name_list->setCommitOnSelectionChange(TRUE); + group_name_list->setCommitOnSelectionChange(true); group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); } @@ -2794,7 +2794,7 @@ BOOL LLPanelEstateAccess::postBuild() LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list"); if (banned_name_list) { - banned_name_list->setCommitOnSelectionChange(TRUE); + banned_name_list->setCommitOnSelectionChange(true); banned_name_list->setMaxItemCount(ESTATE_MAX_BANNED_IDS); } @@ -2807,14 +2807,14 @@ BOOL LLPanelEstateAccess::postBuild() LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list"); if (manager_name_list) { - manager_name_list->setCommitOnSelectionChange(TRUE); + manager_name_list->setCommitOnSelectionChange(true); manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue } childSetAction("add_estate_manager_btn", boost::bind(&LLPanelEstateAccess::onClickAddEstateManager, this)); childSetAction("remove_estate_manager_btn", boost::bind(&LLPanelEstateAccess::onClickRemoveEstateManager, this)); - return TRUE; + return true; } void LLPanelEstateAccess::updateControls(LLViewerRegion* region) @@ -3737,12 +3737,12 @@ LLPanelRegionEnvironment::~LLPanelRegionEnvironment() mCommitConnect.disconnect(); } -BOOL LLPanelRegionEnvironment::postBuild() +bool LLPanelRegionEnvironment::postBuild() { LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); if (!LLPanelEnvironmentInfo::postBuild()) - return FALSE; + return false; getChild<LLUICtrl>(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT)); getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setVisible(TRUE); @@ -3751,7 +3751,7 @@ BOOL LLPanelRegionEnvironment::postBuild() getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); }); mCommitConnect = estate_info.setCommitCallback(boost::bind(&LLPanelRegionEnvironment::refreshFromEstate, this)); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 3eb39b250f..601f3e7455 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -77,7 +77,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); static void processEstateOwnerRequest(LLMessageSystem* msg, void**); @@ -144,7 +144,7 @@ public: virtual bool refreshFromRegion(LLViewerRegion* region); virtual bool estateUpdate(LLMessageSystem* msg) { return true; } - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); void enableButton(const std::string& btn_name, BOOL enable = TRUE); @@ -187,7 +187,7 @@ public: virtual bool refreshFromRegion(LLViewerRegion* region); // LLPanel - virtual BOOL postBuild(); + virtual bool postBuild(); void onBtnSet(); void setObjBonusFactor(F32 object_bonus_factor) {mObjBonusFactor = object_bonus_factor;} @@ -215,7 +215,7 @@ public: : LLPanelRegionInfo(), mTargetAvatar() {} ~LLPanelRegionDebugInfo() {} // LLPanel - virtual BOOL postBuild(); + virtual bool postBuild(); virtual bool refreshFromRegion(LLViewerRegion* region); @@ -247,7 +247,7 @@ public: LLPanelRegionTerrainInfo() : LLPanelRegionInfo() {} ~LLPanelRegionTerrainInfo() {} - virtual BOOL postBuild(); // LLPanel + virtual bool postBuild(); // LLPanel virtual bool refreshFromRegion(LLViewerRegion* region); // refresh local settings from region update from simulator void setEnvControls(bool available); // Whether environment settings are available for this region @@ -307,7 +307,7 @@ public: virtual bool estateUpdate(LLMessageSystem* msg); // LLPanel - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); virtual void refresh(); @@ -340,14 +340,14 @@ public: ~LLPanelEstateCovenant() {} // LLPanel - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); virtual bool refreshFromRegion(LLViewerRegion* region); virtual bool estateUpdate(LLMessageSystem* msg); // LLView overrides - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, + bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); static bool confirmChangeCovenantCallback(const LLSD& notification, const LLSD& response); @@ -401,7 +401,7 @@ class LLPanelRegionExperiences : public LLPanelRegionInfo public: LLPanelRegionExperiences(){} - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); virtual BOOL sendUpdate(); static bool experienceCoreConfirm(const LLSD& notification, const LLSD& response); @@ -435,7 +435,7 @@ class LLPanelEstateAccess : public LLPanelRegionInfo public: LLPanelEstateAccess(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); void updateControls(LLViewerRegion* region); diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp index 6817cce5f6..d370106d49 100644 --- a/indra/newview/llfloaterregionrestarting.cpp +++ b/indra/newview/llfloaterregionrestarting.cpp @@ -50,7 +50,7 @@ LLFloaterRegionRestarting::~LLFloaterRegionRestarting() mRegionChangedConnection.disconnect(); } -BOOL LLFloaterRegionRestarting::postBuild() +bool LLFloaterRegionRestarting::postBuild() { mRegionChangedConnection = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionRestarting::regionChange, this)); @@ -66,7 +66,7 @@ BOOL LLFloaterRegionRestarting::postBuild() refresh(); - return TRUE; + return true; } void LLFloaterRegionRestarting::regionChange() diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h index 5b46f72b09..b31005cc2d 100644 --- a/indra/newview/llfloaterregionrestarting.h +++ b/indra/newview/llfloaterregionrestarting.h @@ -42,7 +42,7 @@ public: private: LLFloaterRegionRestarting(const LLSD& key); virtual ~LLFloaterRegionRestarting(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual bool tick(); virtual void refresh(); virtual void draw(); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 847bba3e9d..3e9b88a499 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -162,7 +162,7 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key) } // virtual -BOOL LLFloaterReporter::postBuild() +bool LLFloaterReporter::postBuild() { LLSLURL slurl; LLAgentUI::buildSLURL(slurl); @@ -229,7 +229,7 @@ BOOL LLFloaterReporter::postBuild() center(); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index b6c70e866d..b732446dff 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -80,7 +80,7 @@ class LLFloaterReporter public: LLFloaterReporter(const LLSD& key); /*virtual*/ ~LLFloaterReporter(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); diff --git a/indra/newview/llfloatersavecamerapreset.cpp b/indra/newview/llfloatersavecamerapreset.cpp index 11809f9c82..4ed4b25fc3 100644 --- a/indra/newview/llfloatersavecamerapreset.cpp +++ b/indra/newview/llfloatersavecamerapreset.cpp @@ -47,7 +47,7 @@ LLFloaterSaveCameraPreset::LLFloaterSaveCameraPreset(const LLSD &key) } // virtual -BOOL LLFloaterSaveCameraPreset::postBuild() +bool LLFloaterSaveCameraPreset::postBuild() { mPresetCombo = getChild<LLComboBox>("preset_combo"); @@ -64,7 +64,7 @@ BOOL LLFloaterSaveCameraPreset::postBuild() LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterSaveCameraPreset::onPresetsListChange, this)); - return TRUE; + return true; } void LLFloaterSaveCameraPreset::onPresetNameEdited() diff --git a/indra/newview/llfloatersavecamerapreset.h b/indra/newview/llfloatersavecamerapreset.h index 282f213438..26d9716b35 100644 --- a/indra/newview/llfloatersavecamerapreset.h +++ b/indra/newview/llfloatersavecamerapreset.h @@ -40,8 +40,8 @@ class LLFloaterSaveCameraPreset : public LLModalDialog public: LLFloaterSaveCameraPreset(const LLSD &key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void onBtnSave(); void onBtnCancel(); diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp index dd47d02bfa..ce16056700 100644 --- a/indra/newview/llfloatersaveprefpreset.cpp +++ b/indra/newview/llfloatersaveprefpreset.cpp @@ -42,7 +42,7 @@ LLFloaterSavePrefPreset::LLFloaterSavePrefPreset(const LLSD &key) } // virtual -BOOL LLFloaterSavePrefPreset::postBuild() +bool LLFloaterSavePrefPreset::postBuild() { LLFloaterPreference* preferences = LLFloaterReg::getTypedInstance<LLFloaterPreference>("preferences"); if (preferences) @@ -61,7 +61,7 @@ BOOL LLFloaterSavePrefPreset::postBuild() mSaveButton = getChild<LLButton>("save"); mPresetCombo = getChild<LLComboBox>("preset_combo"); - return TRUE; + return true; } void LLFloaterSavePrefPreset::onPresetNameEdited() diff --git a/indra/newview/llfloatersaveprefpreset.h b/indra/newview/llfloatersaveprefpreset.h index ae58180e7f..e62e054b1d 100644 --- a/indra/newview/llfloatersaveprefpreset.h +++ b/indra/newview/llfloatersaveprefpreset.h @@ -38,8 +38,8 @@ class LLFloaterSavePrefPreset : public LLFloater public: LLFloaterSavePrefPreset(const LLSD &key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void onBtnSave(); void onBtnCancel(); diff --git a/indra/newview/llfloatersceneloadstats.cpp b/indra/newview/llfloatersceneloadstats.cpp index 8aa93eae96..8e2120c5ba 100644 --- a/indra/newview/llfloatersceneloadstats.cpp +++ b/indra/newview/llfloatersceneloadstats.cpp @@ -34,7 +34,7 @@ LLFloaterSceneLoadStats::LLFloaterSceneLoadStats( const LLSD& key ) : LLFloater(key) {} -BOOL LLFloaterSceneLoadStats::postBuild() +bool LLFloaterSceneLoadStats::postBuild() { - return TRUE; + return true; } diff --git a/indra/newview/llfloatersceneloadstats.h b/indra/newview/llfloatersceneloadstats.h index aa414bf544..530367303a 100644 --- a/indra/newview/llfloatersceneloadstats.h +++ b/indra/newview/llfloatersceneloadstats.h @@ -36,7 +36,7 @@ private: LLFloaterSceneLoadStats(const LLSD& key); public: - BOOL postBuild(); + bool postBuild() override; }; diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 1ea3a07536..6e396f795e 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -69,26 +69,26 @@ void LLFloaterScriptDebug::show(const LLUUID& object_id) addOutputWindow(object_id); } -BOOL LLFloaterScriptDebug::postBuild() +bool LLFloaterScriptDebug::postBuild() { LLMultiFloater::postBuild(); if (mTabContainer) { - return TRUE; + return true; } - return FALSE; + return false; } -void LLFloaterScriptDebug::setVisible(BOOL visible) +void LLFloaterScriptDebug::setVisible(bool visible) { if(visible) { LLFloaterScriptDebugOutput* floater_output = LLFloaterReg::findTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", LLUUID::null); if (floater_output == NULL) { - floater_output = dynamic_cast<LLFloaterScriptDebugOutput*>(LLFloaterReg::showInstance("script_debug_output", LLUUID::null, FALSE)); + floater_output = dynamic_cast<LLFloaterScriptDebugOutput*>(LLFloaterReg::showInstance("script_debug_output", LLUUID::null, false)); if (floater_output) { addFloater(floater_output, false); @@ -119,7 +119,7 @@ LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id) LLFloater::setFloaterHost(host); // prevent stealing focus, see EXT-8040 - LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id, FALSE); + LLFloater* floaterp = LLFloaterReg::showInstance("script_debug_output", object_id, false); LLFloater::setFloaterHost(NULL); return floaterp; @@ -184,14 +184,14 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLSD& object_id) mObjectID(object_id.asUUID()) { // enabled autocous blocks controling focus via LLFloaterReg::showInstance - setAutoFocus(FALSE); + setAutoFocus(false); } -BOOL LLFloaterScriptDebugOutput::postBuild() +bool LLFloaterScriptDebugOutput::postBuild() { LLFloater::postBuild(); mHistoryEditor = getChild<LLViewerTextEditor>("Chat History Editor"); - return TRUE; + return true; } LLFloaterScriptDebugOutput::~LLFloaterScriptDebugOutput() @@ -202,8 +202,8 @@ void LLFloaterScriptDebugOutput::addLine(const std::string &utf8mesg, const std: { if (mObjectID.isNull()) { - setCanTearOff(FALSE); - setCanClose(FALSE); + setCanTearOff(false); + setCanClose(false); } else { diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h index 8c08b234f3..dd5a8fbdaf 100644 --- a/indra/newview/llfloaterscriptdebug.h +++ b/indra/newview/llfloaterscriptdebug.h @@ -37,8 +37,8 @@ class LLFloaterScriptDebug : public LLMultiFloater public: LLFloaterScriptDebug(const LLSD& key); virtual ~LLFloaterScriptDebug(); - virtual BOOL postBuild(); - virtual void setVisible(BOOL visible); + virtual bool postBuild(); + virtual void setVisible(bool visible); static void show(const LLUUID& object_id); /*virtual*/ void closeFloater(bool app_quitting = false); @@ -59,7 +59,7 @@ public: void addLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color); - virtual BOOL postBuild(); + virtual bool postBuild(); protected: LLTextEditor* mHistoryEditor; diff --git a/indra/newview/llfloaterscriptedprefs.cpp b/indra/newview/llfloaterscriptedprefs.cpp index 2484a08626..742b512872 100644 --- a/indra/newview/llfloaterscriptedprefs.cpp +++ b/indra/newview/llfloaterscriptedprefs.cpp @@ -40,7 +40,7 @@ LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key) mCommitCallbackRegistrar.add("ScriptPref.getUIColor", boost::bind(&LLFloaterScriptEdPrefs::getUIColor, this ,_1, _2)); } -BOOL LLFloaterScriptEdPrefs::postBuild() +bool LLFloaterScriptEdPrefs::postBuild() { mEditor = getChild<LLScriptEditor>("Script Preview"); if (mEditor) @@ -48,7 +48,7 @@ BOOL LLFloaterScriptEdPrefs::postBuild() mEditor->initKeywords(); mEditor->loadKeywords(); } - return TRUE; + return true; } void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param) diff --git a/indra/newview/llfloaterscriptedprefs.h b/indra/newview/llfloaterscriptedprefs.h index 31df897aac..f6a9027bfa 100644 --- a/indra/newview/llfloaterscriptedprefs.h +++ b/indra/newview/llfloaterscriptedprefs.h @@ -37,7 +37,7 @@ class LLFloaterScriptEdPrefs : public LLFloater { public: LLFloaterScriptEdPrefs(const LLSD& key); - BOOL postBuild(); + bool postBuild() override; private: ~LLFloaterScriptEdPrefs() {}; diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 40fe11b309..24e30e6c33 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -88,14 +88,14 @@ LLFloaterScriptLimits::LLFloaterScriptLimits(const LLSD& seed) { } -BOOL LLFloaterScriptLimits::postBuild() +bool LLFloaterScriptLimits::postBuild() { mTab = getChild<LLTabContainer>("scriptlimits_panels"); if(!mTab) { LL_WARNS() << "Error! couldn't get scriptlimits_panels, aborting Script Information setup" << LL_ENDL; - return FALSE; + return false; } // contruct the panel @@ -104,7 +104,7 @@ BOOL LLFloaterScriptLimits::postBuild() panel_memory->buildFromFile( "panel_script_limits_region_memory.xml"); mTab->addTabPanel(panel_memory); mTab->selectTab(0); - return TRUE; + return true; } LLFloaterScriptLimits::~LLFloaterScriptLimits() @@ -132,10 +132,10 @@ LLPanelScriptLimitsInfo::LLPanelScriptLimitsInfo() // virtual -BOOL LLPanelScriptLimitsInfo::postBuild() +bool LLPanelScriptLimitsInfo::postBuild() { refresh(); - return TRUE; + return true; } // virtual @@ -640,7 +640,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionSummary(LLSD content) } } -BOOL LLPanelScriptLimitsRegionMemory::postBuild() +bool LLPanelScriptLimitsRegionMemory::postBuild() { childSetAction("refresh_list_btn", onClickRefresh, this); childSetAction("highlight_btn", onClickHighlight, this); @@ -652,7 +652,7 @@ BOOL LLPanelScriptLimitsRegionMemory::postBuild() LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list"); if(!list) { - return FALSE; + return false; } list->setCommitCallback(boost::bind(&LLPanelScriptLimitsRegionMemory::checkButtonsEnabled, this)); checkButtonsEnabled(); @@ -661,7 +661,7 @@ BOOL LLPanelScriptLimitsRegionMemory::postBuild() for(S32 column = 0; column < list->getNumColumns(); column++) { LLScrollListColumn* columnp = list->getColumn(column); - columnp->mHeader->setHasResizableElement(TRUE); + columnp->mHeader->setHasResizableElement(true); } return StartRequestChain(); diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index d2192f9d01..39a03924f6 100644 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -47,7 +47,7 @@ class LLFloaterScriptLimits : public LLFloater friend class LLFloaterReg; public: - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); // from LLPanel virtual void refresh(); @@ -71,7 +71,7 @@ class LLPanelScriptLimitsInfo : public LLPanel public: LLPanelScriptLimitsInfo(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); protected: @@ -102,7 +102,7 @@ public: ~LLPanelScriptLimitsRegionMemory(); // LLPanel - virtual BOOL postBuild(); + virtual bool postBuild(); void setRegionDetails(LLSD content); void setRegionSummary(LLSD content); diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 37ae80fa8f..ff2aef6a04 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -106,12 +106,12 @@ LLFloaterSearch::LLFloaterSearch(const Params& key) : mCollectionType.insert("people"); } -BOOL LLFloaterSearch::postBuild() +bool LLFloaterSearch::postBuild() { LLFloaterWebContent::postBuild(); mWebBrowser->addObserver(this); - return TRUE; + return true; } void LLFloaterSearch::onOpen(const LLSD& key) @@ -121,7 +121,7 @@ void LLFloaterSearch::onOpen(const LLSD& key) p.allow_address_entry = false; LLFloaterWebContent::onOpen(p); - mWebBrowser->setFocus(TRUE); + mWebBrowser->setFocus(true); search(p.search); } diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h index cc77ce696f..03cdae042e 100644 --- a/indra/newview/llfloatersearch.h +++ b/indra/newview/llfloatersearch.h @@ -83,7 +83,7 @@ public: void godLevelChanged(U8 godlevel); private: - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); std::set<std::string> mSearchType; std::set<std::string> mCollectionType; diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index b139e5daf5..01c5aacfef 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -99,7 +99,7 @@ private: void onBuyerNameCache(const LLAvatarName& av_name); public: - virtual BOOL postBuild(); + virtual bool postBuild(); bool setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel); static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); @@ -165,7 +165,7 @@ void LLFloaterSellLandUI::SelectionObserver::changed() } } -BOOL LLFloaterSellLandUI::postBuild() +bool LLFloaterSellLandUI::postBuild() { childSetCommitCallback("sell_to", onChangeValue, this); childSetCommitCallback("price", onChangeValue, this); @@ -177,7 +177,7 @@ BOOL LLFloaterSellLandUI::postBuild() childSetAction("show_objects", doShowObjects, this); center(); getChild<LLUICtrl>("profile_scroll")->setTabStop(true); - return TRUE; + return true; } bool LLFloaterSellLandUI::setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel) diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 3c7f341613..0aeeba81af 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -47,7 +47,7 @@ LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) LLFloaterSettingsDebug::~LLFloaterSettingsDebug() {} -BOOL LLFloaterSettingsDebug::postBuild() +bool LLFloaterSettingsDebug::postBuild() { enableResizeCtrls(true, false, true); @@ -56,14 +56,14 @@ BOOL LLFloaterSettingsDebug::postBuild() getChild<LLFilterEditor>("filter_input")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::setSearchFilter, this, _2)); mSettingList = getChild<LLScrollListCtrl>("setting_list"); - mSettingList->setCommitOnSelectionChange(TRUE); + mSettingList->setCommitOnSelectionChange(true); mSettingList->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this)); updateList(); gSavedSettings.getControl("DebugSettingsHideDefault")->getCommitSignal()->connect(boost::bind(&LLFloaterSettingsDebug::updateList, this, false)); - return TRUE; + return true; } void LLFloaterSettingsDebug::draw() diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h index 888eaadcbd..75e5752d29 100644 --- a/indra/newview/llfloatersettingsdebug.h +++ b/indra/newview/llfloatersettingsdebug.h @@ -39,7 +39,7 @@ class LLFloaterSettingsDebug public: - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void draw(); void updateControl(LLControlVariable* control); diff --git a/indra/newview/llfloatersimplesnapshot.cpp b/indra/newview/llfloatersimplesnapshot.cpp index 63802de6b3..b944253159 100644 --- a/indra/newview/llfloatersimplesnapshot.cpp +++ b/indra/newview/llfloatersimplesnapshot.cpp @@ -268,7 +268,7 @@ LLFloaterSimpleSnapshot::~LLFloaterSimpleSnapshot() { } -BOOL LLFloaterSimpleSnapshot::postBuild() +bool LLFloaterSimpleSnapshot::postBuild() { childSetAction("new_snapshot_btn", ImplBase::onClickNewSnapshot, this); childSetAction("save_btn", boost::bind(&LLFloaterSimpleSnapshot::onSend, this)); @@ -296,10 +296,10 @@ BOOL LLFloaterSimpleSnapshot::postBuild() previewp->setAllowRenderUI(false); previewp->setThumbnailSubsampled(TRUE); - return TRUE; + return true; } -const S32 PREVIEW_OFFSET_Y = 70; +constexpr S32 PREVIEW_OFFSET_Y = 70; void LLFloaterSimpleSnapshot::draw() { diff --git a/indra/newview/llfloatersimplesnapshot.h b/indra/newview/llfloatersimplesnapshot.h index 04a66daedb..0baed9c26b 100644 --- a/indra/newview/llfloatersimplesnapshot.h +++ b/indra/newview/llfloatersimplesnapshot.h @@ -44,7 +44,7 @@ public: LLFloaterSimpleSnapshot(const LLSD& key); ~LLFloaterSimpleSnapshot(); - BOOL postBuild(); + bool postBuild(); void onOpen(const LLSD& key); void draw(); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 0c8a93dc2a..ee5d8dae61 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -982,7 +982,7 @@ LLFloaterSnapshot::~LLFloaterSnapshot() } // virtual -BOOL LLFloaterSnapshot::postBuild() +bool LLFloaterSnapshot::postBuild() { mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn"); childSetAction("new_snapshot_btn", ImplBase::onClickNewSnapshot, this); @@ -1064,7 +1064,7 @@ BOOL LLFloaterSnapshot::postBuild() previewp->setThumbnailPlaceholderRect(getThumbnailPlaceholderRect()); - return TRUE; + return true; } // virtual @@ -1424,7 +1424,7 @@ LLSnapshotFloaterView::~LLSnapshotFloaterView() } // virtual -BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLSnapshotFloaterView::handleKey(KEY key, MASK mask, bool called_from_parent) { // use default handler when not in freeze-frame mode if(!gSavedSettings.getBOOL("FreezeTime")) @@ -1440,9 +1440,9 @@ BOOL LLSnapshotFloaterView::handleKey(KEY key, MASK mask, BOOL called_from_paren else { // bounce keystrokes back down - LLFloaterView::handleKey(key, mask, TRUE); + LLFloaterView::handleKey(key, mask, true); } - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index a4bd194fd7..31351510b6 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -150,7 +150,7 @@ public: LLFloaterSnapshot(const LLSD& key); /*virtual*/ ~LLFloaterSnapshot(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ S32 notify(const LLSD& info); @@ -232,7 +232,7 @@ protected: public: virtual ~LLSnapshotFloaterView(); - /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); + /*virtual*/ bool handleKey(KEY key, MASK mask, bool called_from_parent); /*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); diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp index 72c077d215..87ac37a003 100644 --- a/indra/newview/llfloatersounddevices.cpp +++ b/indra/newview/llfloatersounddevices.cpp @@ -51,7 +51,7 @@ LLFloaterSoundDevices::~LLFloaterSoundDevices() } // virtual -BOOL LLFloaterSoundDevices::postBuild() +bool LLFloaterSoundDevices::postBuild() { LLTransientDockableFloater::postBuild(); @@ -65,7 +65,7 @@ BOOL LLFloaterSoundDevices::postBuild() getChild<LLUICtrl>("voice_output_device")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel)); getChild<LLUICtrl>("mic_volume_slider")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel)); } - return TRUE; + return true; } //virtual @@ -75,7 +75,7 @@ void LLFloaterSoundDevices::setDocked(bool docked, bool pop_on_undock/* = true*/ } // virtual -void LLFloaterSoundDevices::setFocus( BOOL b ) +void LLFloaterSoundDevices::setFocus(bool b) { LLTransientDockableFloater::setFocus(b); diff --git a/indra/newview/llfloatersounddevices.h b/indra/newview/llfloatersounddevices.h index f09ee3b069..0073a1419b 100644 --- a/indra/newview/llfloatersounddevices.h +++ b/indra/newview/llfloatersounddevices.h @@ -39,9 +39,9 @@ public: LLFloaterSoundDevices(const LLSD& key); ~LLFloaterSoundDevices(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); - /*virtual*/ void setFocus( BOOL b ); + bool postBuild() override; + void setDocked(bool docked, bool pop_on_undock = true) override; + void setFocus(bool b) override; }; diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 32eb70cd39..e0eb5261d6 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -61,7 +61,7 @@ void LLFloaterSpellCheckerSettings::draw() getChild<LLUICtrl>("spellcheck_remove_btn")->setEnabled(enable_remove); } -BOOL LLFloaterSpellCheckerSettings::postBuild(void) +bool LLFloaterSpellCheckerSettings::postBuild(void) { gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaries, this, false)); LLSpellChecker::setSettingsChangeCallback(boost::bind(&LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange, this)); @@ -248,7 +248,7 @@ LLFloaterSpellCheckerImport::LLFloaterSpellCheckerImport(const LLSD& key) { } -BOOL LLFloaterSpellCheckerImport::postBuild(void) +bool LLFloaterSpellCheckerImport::postBuild() { getChild<LLUICtrl>("dictionary_path_browse")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnBrowse, this)); getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnOK, this)); diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h index f9bbefafb7..e15b60037f 100644 --- a/indra/newview/llfloaterspellchecksettings.h +++ b/indra/newview/llfloaterspellchecksettings.h @@ -34,10 +34,10 @@ class LLFloaterSpellCheckerSettings : public LLFloater public: LLFloaterSpellCheckerSettings(const LLSD& key); - /*virtual*/ void draw(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void onClose(bool app_quitting); + void draw() override; + bool postBuild() override; + void onOpen(const LLSD& key) override; + void onClose(bool app_quitting) override; protected: void onBtnImport(); @@ -52,7 +52,7 @@ class LLFloaterSpellCheckerImport : public LLFloater public: LLFloaterSpellCheckerImport(const LLSD& key); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; protected: void onBtnBrowse(); diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp index b845fd132d..86bf57887e 100644 --- a/indra/newview/llfloatertelehub.cpp +++ b/indra/newview/llfloatertelehub.cpp @@ -53,7 +53,7 @@ LLFloaterTelehub::LLFloaterTelehub(const LLSD& key) { } -BOOL LLFloaterTelehub::postBuild() +bool LLFloaterTelehub::postBuild() { gMessageSystem->setHandlerFunc("TelehubInfo", processTelehubInfo); @@ -66,10 +66,10 @@ BOOL LLFloaterTelehub::postBuild() if (list) { // otherwise you can't walk with arrow keys while floater is up - list->setAllowKeyboardMovement(FALSE); + list->setAllowKeyboardMovement(false); } - return TRUE; + return true; } void LLFloaterTelehub::onOpen(const LLSD& key) { @@ -100,23 +100,23 @@ void LLFloaterTelehub::draw() // Per-frame updates, because we don't have a selection manager observer. void LLFloaterTelehub::refresh() { - const BOOL children_ok = TRUE; + constexpr bool children_ok = true; LLViewerObject* object = mObjectSelection->getFirstRootObject(children_ok); - BOOL have_selection = (object != NULL); + bool have_selection = (object != NULL); BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); getChildView("connect_btn")->setEnabled(have_selection && all_volume); - BOOL have_telehub = mTelehubObjectID.notNull(); + bool have_telehub = mTelehubObjectID.notNull(); getChildView("disconnect_btn")->setEnabled(have_telehub); - BOOL space_avail = (mNumSpawn < MAX_SPAWNPOINTS_PER_TELEHUB); + bool space_avail = (mNumSpawn < MAX_SPAWNPOINTS_PER_TELEHUB); getChildView("add_spawn_point_btn")->setEnabled(have_selection && all_volume && space_avail); LLScrollListCtrl* list = getChild<LLScrollListCtrl>("spawn_points_list"); if (list) { - BOOL enable_remove = (list->getFirstSelected() != NULL); + bool enable_remove = (list->getFirstSelected() != NULL); getChildView("remove_spawn_point_btn")->setEnabled(enable_remove); } } diff --git a/indra/newview/llfloatertelehub.h b/indra/newview/llfloatertelehub.h index 9b9b11fb29..1ee2227f9b 100644 --- a/indra/newview/llfloatertelehub.h +++ b/indra/newview/llfloatertelehub.h @@ -41,10 +41,10 @@ public: LLFloaterTelehub(const LLSD& key); ~LLFloaterTelehub(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; - /*virtual*/ void draw(); + void draw() override; static BOOL renderBeacons(); static void addBeacons(); diff --git a/indra/newview/llfloatertestinspectors.cpp b/indra/newview/llfloatertestinspectors.cpp index 8a1582569b..7dd6a86f33 100644 --- a/indra/newview/llfloatertestinspectors.cpp +++ b/indra/newview/llfloatertestinspectors.cpp @@ -45,7 +45,7 @@ LLFloaterTestInspectors::LLFloaterTestInspectors(const LLSD& seed) LLFloaterTestInspectors::~LLFloaterTestInspectors() {} -BOOL LLFloaterTestInspectors::postBuild() +bool LLFloaterTestInspectors::postBuild() { // Test the dummy widget construction code getChild<LLUICtrl>("intentionally-not-found")->setEnabled(true); diff --git a/indra/newview/llfloatertestinspectors.h b/indra/newview/llfloatertestinspectors.h index 1724a2e076..621094f7fe 100644 --- a/indra/newview/llfloatertestinspectors.h +++ b/indra/newview/llfloatertestinspectors.h @@ -40,7 +40,7 @@ private: LLFloaterTestInspectors(const LLSD& seed); ~LLFloaterTestInspectors(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; // Button callback to show void showAvatarInspector(LLUICtrl*, const LLSD& avatar_id); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index ff7214def0..b165349a5a 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -217,10 +217,10 @@ LLPCode toolData[]={ LL_PCODE_LEGACY_TREE, LL_PCODE_LEGACY_GRASS}; -BOOL LLFloaterTools::postBuild() +bool LLFloaterTools::postBuild() { // Hide until tool selected - setVisible(FALSE); + setVisible(false); // Since we constantly show and hide this during drags, don't // make sounds on visibility changes. @@ -305,7 +305,7 @@ BOOL LLFloaterTools::postBuild() sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost"); - return TRUE; + return true; } // Create the popupview with a dummy center. It will be moved into place @@ -855,7 +855,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) // virtual -BOOL LLFloaterTools::canClose() +bool LLFloaterTools::canClose() { // don't close when quitting, so camera will stay put return !LLApp::isExiting(); diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 3bb6492a6e..066d6579af 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -55,7 +55,7 @@ class LLFloaterTools : public LLFloater { public: - virtual BOOL postBuild(); + virtual bool postBuild(); static void* createPanelPermissions(void* vdata); static void* createPanelObject(void* vdata); static void* createPanelVolume(void* vdata); @@ -67,7 +67,7 @@ public: virtual ~LLFloaterTools(); /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ BOOL canClose(); + /*virtual*/ bool canClose(); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void draw(); /*virtual*/ void onFocusReceived(); diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 9f277021c8..4dca7c2f4e 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -93,7 +93,7 @@ LLFloaterTopObjects::~LLFloaterTopObjects() } // virtual -BOOL LLFloaterTopObjects::postBuild() +bool LLFloaterTopObjects::postBuild() { mObjectsScrollList = getChild<LLScrollListCtrl>("objects_list"); mObjectsScrollList->setFocus(TRUE); @@ -107,7 +107,7 @@ BOOL LLFloaterTopObjects::postBuild() mFlags = 0; mFilter.clear(); - return TRUE; + return true; } // static void LLFloaterTopObjects::setMode(U32 mode) diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h index b73401e50d..d0a7a481cd 100644 --- a/indra/newview/llfloatertopobjects.h +++ b/indra/newview/llfloatertopobjects.h @@ -62,7 +62,7 @@ public: void clearList(); void updateSelectionInfo(); - virtual BOOL postBuild(); + virtual bool postBuild(); void onRefresh(); diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 1aeb727172..db5b25a8f7 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -56,7 +56,7 @@ LLFloaterTOS::LLFloaterTOS(const LLSD& data) { } -BOOL LLFloaterTOS::postBuild() +bool LLFloaterTOS::postBuild() { childSetAction("Continue", onContinue, this); childSetAction("Cancel", onCancel, this); @@ -66,11 +66,11 @@ BOOL LLFloaterTOS::postBuild() { // this displays the critical message LLUICtrl *tos_text = getChild<LLUICtrl>("tos_text"); - tos_text->setEnabled( FALSE ); - tos_text->setFocus(TRUE); + tos_text->setEnabled(false); + tos_text->setFocus(true); tos_text->setValue(LLSD(mMessage)); - return TRUE; + return true; } // disable Agree to TOS radio button until the page has fully loaded @@ -78,7 +78,7 @@ BOOL LLFloaterTOS::postBuild() // hide the SL text widget if we're displaying TOS with using a browser widget. LLUICtrl *editor = getChild<LLUICtrl>("tos_text"); - editor->setVisible( FALSE ); + editor->setVisible(false); LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html"); if ( web_browser ) @@ -111,7 +111,7 @@ BOOL LLFloaterTOS::postBuild() #endif } - return TRUE; + return true; } void LLFloaterTOS::setSiteIsAlive( bool alive ) diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h index 7c2f0705b7..d59ddbe1c4 100644 --- a/indra/newview/llfloatertos.h +++ b/indra/newview/llfloatertos.h @@ -47,9 +47,9 @@ public: LLFloaterTOS(const LLSD& data); virtual ~LLFloaterTOS(); - BOOL postBuild(); - - virtual void draw(); + bool postBuild() override; + + void draw() override; static void updateAgree( LLUICtrl *, void* userdata ); static void onContinue( void* userdata ); @@ -70,8 +70,6 @@ private: bool mSiteAlive; bool mRealNavigateBegun; std::string mReplyPumpName; - - }; #endif // LL_LLFLOATERTOS_H diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index a025a859e7..6cfc1828dc 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -57,7 +57,7 @@ bool compare_localized_command_labels(LLCommand * cmd1, LLCommand * cmd2) return (lab1 < lab2); } -BOOL LLFloaterToybox::postBuild() +bool LLFloaterToybox::postBuild() { mToolBar = getChild<LLToolBar>("toybox_toolbar"); @@ -94,7 +94,7 @@ BOOL LLFloaterToybox::postBuild() mToolBar->addCommand((*it)->id()); } - return TRUE; + return true; } void LLFloaterToybox::draw() @@ -151,7 +151,7 @@ void LLFloaterToybox::onBtnClearAll() LLNotificationsUtil::add("ConfirmClearAllToybox"); } -BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h index 10aee0e6f5..d180cc4337 100644 --- a/indra/newview/llfloatertoybox.h +++ b/indra/newview/llfloatertoybox.h @@ -41,13 +41,13 @@ public: virtual ~LLFloaterToybox(); // virtuals - BOOL postBuild(); - void draw(); - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool postBuild() override; + void draw() override; + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, - std::string& tooltip_msg); + std::string& tooltip_msg) override; protected: void onBtnClearAll(); diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp index d29ecbbf95..e9b7a4a815 100644 --- a/indra/newview/llfloatertranslationsettings.cpp +++ b/indra/newview/llfloatertranslationsettings.cpp @@ -52,7 +52,7 @@ LLFloaterTranslationSettings::LLFloaterTranslationSettings(const LLSD& key) } // virtual -BOOL LLFloaterTranslationSettings::postBuild() +bool LLFloaterTranslationSettings::postBuild() { mMachineTranslationCB = getChild<LLCheckBoxCtrl>("translate_chat_checkbox"); mLanguageCombo = getChild<LLComboBox>("translate_language_combo"); @@ -106,7 +106,7 @@ BOOL LLFloaterTranslationSettings::postBuild() }); center(); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h index eff0803fdd..64b21e078d 100644 --- a/indra/newview/llfloatertranslationsettings.h +++ b/indra/newview/llfloatertranslationsettings.h @@ -39,8 +39,8 @@ class LLFloaterTranslationSettings : public LLFloater { public: LLFloaterTranslationSettings(const LLSD& key); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; void setAzureVerified(bool ok, bool alert, S32 status); void setGoogleVerified(bool ok, bool alert, S32 status); diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 3bdfe4a7d0..845956a833 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -140,7 +140,7 @@ public: std::string getLocStr(S32 ID); // fetches the localization string based on what is selected in the drop-down menu void displayFloater(BOOL click, S32 ID); // needs to be public so live file can call it when it finds an update - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onClose(bool app_quitting); void refreshList(); // refresh list (empty it out and fill it up from scratch) @@ -423,7 +423,7 @@ LLFloaterUIPreview::~LLFloaterUIPreview() } // Perform post-build setup (defined in superclass) -BOOL LLFloaterUIPreview::postBuild() +bool LLFloaterUIPreview::postBuild() { LLPanel* main_panel_tmp = getChild<LLPanel>("main_panel"); // get a pointer to the main panel in order to... mFileList = main_panel_tmp->getChild<LLScrollListCtrl>("name_list"); // save pointer to file list @@ -481,8 +481,8 @@ BOOL LLFloaterUIPreview::postBuild() mDelim = gDirUtilp->getDirDelimiter(); // initialize delimiter to dir sep slash // refresh list of available languages (EN will still be default) - BOOL found = TRUE; - BOOL found_en_us = FALSE; + bool found = true; + bool found_en_us = false; std::string language_directory; std::string xui_dir = get_xui_dir(); // directory containing localizations -- don't forget trailing delim mLanguageSelection->removeall(); // clear out anything temporarily in list from XML @@ -502,7 +502,7 @@ BOOL LLFloaterUIPreview::postBuild() { if(!strncmp("en",language_directory.c_str(),5)) // remember if we've seen en, so we can make it default { - found_en_us = TRUE; + found_en_us = true; } else { @@ -527,7 +527,7 @@ BOOL LLFloaterUIPreview::postBuild() refreshList(); // refresh the list of available floaters - return TRUE; + return true; } // Callback for language combo box selection: refresh current floater when you change languages diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 48d6e01d32..de37c92326 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -60,7 +60,7 @@ LLFloaterURLEntry::~LLFloaterURLEntry() sInstance = NULL; } -BOOL LLFloaterURLEntry::postBuild() +bool LLFloaterURLEntry::postBuild() { mMediaURLEdit = getChild<LLComboBox>("media_entry"); @@ -80,7 +80,7 @@ BOOL LLFloaterURLEntry::postBuild() setDefaultBtn("ok_btn"); buildURLHistory(); - return TRUE; + return true; } void LLFloaterURLEntry::buildURLHistory() { diff --git a/indra/newview/llfloaterurlentry.h b/indra/newview/llfloaterurlentry.h index 04a8eca069..e991b96383 100644 --- a/indra/newview/llfloaterurlentry.h +++ b/indra/newview/llfloaterurlentry.h @@ -41,8 +41,8 @@ public: // Can only be shown by LLPanelLandMedia, and pushes data back into // that panel via the handle. static LLHandle<LLFloater> show(LLHandle<LLPanel> panel_land_media_handle, const std::string media_url); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onClose( bool app_quitting ); + bool postBuild() override; + void onClose( bool app_quitting ) override; void headerFetchComplete(S32 status, const std::string& mime_type); bool addURLToCombobox(const std::string& media_url); diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp index 227720bee3..8b824cb63e 100644 --- a/indra/newview/llfloatervoiceeffect.cpp +++ b/indra/newview/llfloatervoiceeffect.cpp @@ -56,7 +56,7 @@ LLFloaterVoiceEffect::~LLFloaterVoiceEffect() } // virtual -BOOL LLFloaterVoiceEffect::postBuild() +bool LLFloaterVoiceEffect::postBuild() { setDefaultBtn("record_btn"); getChild<LLButton>("record_btn")->setFocus(true); @@ -81,7 +81,7 @@ BOOL LLFloaterVoiceEffect::postBuild() refreshEffectList(); updateControls(); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llfloatervoiceeffect.h b/indra/newview/llfloatervoiceeffect.h index 4d432c46cc..cc6ca002a2 100644 --- a/indra/newview/llfloatervoiceeffect.h +++ b/indra/newview/llfloatervoiceeffect.h @@ -44,8 +44,8 @@ public: LLFloaterVoiceEffect(const LLSD& key); virtual ~LLFloaterVoiceEffect(); - virtual BOOL postBuild(); - virtual void onClose(bool app_quitting); + bool postBuild() override; + void onClose(bool app_quitting) override; private: enum ColumnIndex diff --git a/indra/newview/llfloatervoicevolume.cpp b/indra/newview/llfloatervoicevolume.cpp index 23f19dd5aa..0cde73f0ab 100644 --- a/indra/newview/llfloatervoicevolume.cpp +++ b/indra/newview/llfloatervoicevolume.cpp @@ -60,7 +60,7 @@ public: LLFloaterVoiceVolume(const LLSD& avatar_id); virtual ~LLFloaterVoiceVolume(); - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(void); // Because floater is single instance, need to re-parse data on each spawn // (for example, inspector about same avatar but in different position) @@ -104,7 +104,7 @@ LLFloaterVoiceVolume::~LLFloaterVoiceVolume() } /*virtual*/ -BOOL LLFloaterVoiceVolume::postBuild(void) +bool LLFloaterVoiceVolume::postBuild(void) { getChild<LLUICtrl>("mute_btn")->setCommitCallback( boost::bind(&LLFloaterVoiceVolume::onClickMuteVolume, this) ); @@ -112,7 +112,7 @@ BOOL LLFloaterVoiceVolume::postBuild(void) getChild<LLUICtrl>("volume_slider")->setCommitCallback( boost::bind(&LLFloaterVoiceVolume::onVolumeChange, this, _2)); - return TRUE; + return true; } diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index ceab472c55..b3a9e5c8e3 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -84,7 +84,7 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mCommitCallbackRegistrar.add( "WebContent.TestURL", boost::bind(&LLFloaterWebContent::onTestURL, this, _2)); } -BOOL LLFloaterWebContent::postBuild() +bool LLFloaterWebContent::postBuild() { // these are used in a bunch of places so cache them mWebBrowser = getChild< LLMediaCtrl >( "webbrowser" ); @@ -111,7 +111,7 @@ BOOL LLFloaterWebContent::postBuild() // initialize the URL history using the system URL History manager initializeURLHistory(); - return TRUE; + return true; } void LLFloaterWebContent::initializeURLHistory() diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h index 0bf93504c2..3a1d019186 100644 --- a/indra/newview/llfloaterwebcontent.h +++ b/indra/newview/llfloaterwebcontent.h @@ -77,7 +77,7 @@ public: static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height); void geometryChanged(S32 x, S32 y, S32 width, S32 height); - /* virtual */ BOOL postBuild(); + /* virtual */ bool postBuild(); /* virtual */ void onOpen(const LLSD& key); /* virtual */ bool matchesKey(const LLSD& key); /* virtual */ void onClose(bool app_quitting); diff --git a/indra/newview/llfloaterwhitelistentry.cpp b/indra/newview/llfloaterwhitelistentry.cpp index 2a499f681b..4bc6aa2953 100644 --- a/indra/newview/llfloaterwhitelistentry.cpp +++ b/indra/newview/llfloaterwhitelistentry.cpp @@ -51,7 +51,7 @@ LLFloaterWhiteListEntry::~LLFloaterWhiteListEntry() /////////////////////////////////////////////////////////////////////////////// // -BOOL LLFloaterWhiteListEntry::postBuild() +bool LLFloaterWhiteListEntry::postBuild() { mWhiteListEdit = getChild<LLLineEditor>("whitelist_entry"); @@ -60,7 +60,7 @@ BOOL LLFloaterWhiteListEntry::postBuild() setDefaultBtn("ok_btn"); - return TRUE; + return true; } /////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llfloaterwhitelistentry.h b/indra/newview/llfloaterwhitelistentry.h index deab49c523..650195b076 100644 --- a/indra/newview/llfloaterwhitelistentry.h +++ b/indra/newview/llfloaterwhitelistentry.h @@ -38,7 +38,7 @@ class LLFloaterWhiteListEntry : LLFloaterWhiteListEntry(const LLSD& key); ~LLFloaterWhiteListEntry(); - BOOL postBuild(); + bool postBuild() override; private: LLLineEditor* mWhiteListEdit; diff --git a/indra/newview/llfloaterwindowsize.cpp b/indra/newview/llfloaterwindowsize.cpp index 863b7cbb12..1d17654c53 100644 --- a/indra/newview/llfloaterwindowsize.cpp +++ b/indra/newview/llfloaterwindowsize.cpp @@ -63,7 +63,7 @@ LLFloaterWindowSize::LLFloaterWindowSize(const LLSD& key) LLFloaterWindowSize::~LLFloaterWindowSize() {} -BOOL LLFloaterWindowSize::postBuild() +bool LLFloaterWindowSize::postBuild() { center(); initWindowSizeControls(); @@ -72,7 +72,7 @@ BOOL LLFloaterWindowSize::postBuild() getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterWindowSize::onClickCancel, this)); setDefaultBtn("set_btn"); - return TRUE; + return true; } void LLFloaterWindowSize::initWindowSizeControls() diff --git a/indra/newview/llfloaterwindowsize.h b/indra/newview/llfloaterwindowsize.h index a71e5e273c..a2eab5b822 100644 --- a/indra/newview/llfloaterwindowsize.h +++ b/indra/newview/llfloaterwindowsize.h @@ -40,7 +40,7 @@ private: virtual ~LLFloaterWindowSize(); public: - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void initWindowSizeControls(); void onClickSet(); void onClickCancel(); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index b699b98154..f727db9a64 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -324,7 +324,7 @@ void* LLFloaterWorldMap::createWorldMapView(void* data) return new LLWorldMapView(); } -BOOL LLFloaterWorldMap::postBuild() +bool LLFloaterWorldMap::postBuild() { mMapView = dynamic_cast<LLWorldMapView*>(getChild<LLPanel>("objects_mapview")); @@ -356,7 +356,7 @@ BOOL LLFloaterWorldMap::postBuild() onChangeMaturity(); - return TRUE; + return true; } // virtual @@ -476,7 +476,7 @@ bool LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks) // virtual -void LLFloaterWorldMap::reshape( S32 width, S32 height, BOOL called_from_parent ) +void LLFloaterWorldMap::reshape( S32 width, S32 height, bool called_from_parent ) { LLFloater::reshape( width, height, called_from_parent ); } @@ -1718,14 +1718,14 @@ LLPanelHideBeacon* LLPanelHideBeacon::getInstance() } -BOOL LLPanelHideBeacon::postBuild() +bool LLPanelHideBeacon::postBuild() { mHideButton = getChild<LLButton>("hide_beacon_btn"); mHideButton->setCommitCallback(boost::bind(&LLPanelHideBeacon::onHideButtonClick, this)); gViewerWindow->setOnWorldViewRectUpdated(boost::bind(&LLPanelHideBeacon::updatePosition, this)); - return TRUE; + return true; } //virtual @@ -1742,7 +1742,7 @@ void LLPanelHideBeacon::draw() } //virtual -void LLPanelHideBeacon::setVisible(BOOL visible) +void LLPanelHideBeacon::setVisible(bool visible) { if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false; diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index d4913e317f..13a002577a 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -56,14 +56,14 @@ public: static LLFloaterWorldMap* getInstance(); static void *createWorldMapView(void* data); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_quitting); static void reloadIcons(void*); - /*virtual*/ void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE ); + /*virtual*/ void reshape( S32 width, S32 height, bool called_from_parent = true ); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); /*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks); /*virtual*/ void draw(); @@ -207,8 +207,8 @@ public: static LLPanelHideBeacon* getInstance(); LLPanelHideBeacon(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ bool postBuild(); + /*virtual*/ void setVisible(bool visible); /*virtual*/ void draw(); private: diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index cab3f00f03..c447f74ec1 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -424,7 +424,7 @@ LLGroupListItem::~LLGroupListItem() } //virtual -BOOL LLGroupListItem::postBuild() +bool LLGroupListItem::postBuild() { mGroupIcon = getChild<LLGroupIconCtrl>("group_icon"); mGroupNameBox = getChild<LLTextBox>("group_name"); @@ -452,7 +452,7 @@ BOOL LLGroupListItem::postBuild() // have icons of different sizes so we need to figure it per file. mIconWidth = mGroupNameBox->getRect().mLeft - mGroupIcon->getRect().mLeft; - return TRUE; + return true; } //virtual diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 110e221832..6af073e364 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -103,7 +103,7 @@ class LLGroupListItem : public LLPanel public: LLGroupListItem(bool for_agent, bool show_icons); ~LLGroupListItem(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void setValue(const LLSD& value); void onMouseEnter(S32 x, S32 y, MASK mask); void onMouseLeave(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp index 7271376a3c..090222cf47 100644 --- a/indra/newview/llhints.cpp +++ b/indra/newview/llhints.cpp @@ -110,7 +110,7 @@ public: LLHintPopup(const Params&); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void onClickClose() { @@ -180,7 +180,7 @@ LLHintPopup::LLHintPopup(const LLHintPopup::Params& p) } } -BOOL LLHintPopup::postBuild() +bool LLHintPopup::postBuild() { LLTextBox& hint_text = getChildRef<LLTextBox>("hint_text"); hint_text.setText(mNotification->getMessage()); @@ -193,7 +193,7 @@ BOOL LLHintPopup::postBuild() reshape(getRect().getWidth(), getRect().getHeight() + delta_height); hint_text.reshape(hint_text.getRect().getWidth(), hint_text.getRect().getHeight() + delta_height); // hint_text.translate(0, -delta_height); - return TRUE; + return true; } void LLHintPopup::draw() diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e3567f4595..c17418c6b6 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2351,14 +2351,14 @@ LLCallDialog::~LLCallDialog() LLUI::getInstance()->removePopup(this); } -BOOL LLCallDialog::postBuild() +bool LLCallDialog::postBuild() { if (!LLDockableFloater::postBuild() || !gToolBarView) - return FALSE; + return false; dockToToolbarButton("speak"); - return TRUE; + return true; } void LLCallDialog::dockToToolbarButton(const std::string& toolbarButtonName) @@ -2621,13 +2621,13 @@ void LLOutgoingCallDialog::onCancel(void* user_data) } -BOOL LLOutgoingCallDialog::postBuild() +bool LLOutgoingCallDialog::postBuild() { - BOOL success = LLCallDialog::postBuild(); + bool success = LLCallDialog::postBuild(); childSetAction("Cancel", onCancel, this); - setCanDrag(FALSE); + setCanDrag(false); return success; } @@ -2675,14 +2675,14 @@ void LLIncomingCallDialog::onLifetimeExpired() } } -BOOL LLIncomingCallDialog::postBuild() +bool LLIncomingCallDialog::postBuild() { LLCallDialog::postBuild(); if (!mPayload.isMap() || mPayload.size() == 0) { LL_INFOS("IMVIEW") << "IncomingCall: invalid argument" << LL_ENDL; - return TRUE; + return true; } LLUUID session_id = mPayload["session_id"].asUUID(); @@ -2692,14 +2692,14 @@ BOOL LLIncomingCallDialog::postBuild() if (session_id.isNull() && caller_id.asUUID().isNull()) { LL_INFOS("IMVIEW") << "IncomingCall: invalid ids" << LL_ENDL; - return TRUE; + return true; } std::string notify_box_type = mPayload["notify_box_type"].asString(); if (!is_voice_call_type(notify_box_type)) { LL_INFOS("IMVIEW") << "IncomingCall: notify_box_type was not provided" << LL_ENDL; - return TRUE; + return true; } // init notification's lifetime @@ -2761,8 +2761,8 @@ BOOL LLIncomingCallDialog::postBuild() bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id); getChildView("Start IM")->setVisible( is_avatar && notify_box_type != "VoiceInviteAdHoc" && notify_box_type != "VoiceInviteGroup"); - setCanDrag(FALSE); - return TRUE; + setCanDrag(false); + return true; } void LLIncomingCallDialog::setCallerName(const std::string& ui_title, diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index b9c7065872..afb9b68995 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -554,7 +554,7 @@ public: LLCallDialog(const LLSD& payload); virtual ~LLCallDialog(); - virtual BOOL postBuild(); + virtual bool postBuild(); void dockToToolbarButton(const std::string& toolbarButtonName); @@ -599,7 +599,7 @@ public: } } - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); static void onAccept(void* user_data); @@ -625,7 +625,7 @@ class LLOutgoingCallDialog : public LLCallDialog public: LLOutgoingCallDialog(const LLSD& payload); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void show(const LLSD& key); static void onCancel(void* user_data); diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index b11c440015..e883abf5c2 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -67,7 +67,7 @@ public: LLInspectAvatar(const LLSD& avatar_id); virtual ~LLInspectAvatar(); - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(void); // Because floater is single instance, need to re-parse data on each spawn // (for example, inspector about same avatar but in different position) @@ -179,7 +179,7 @@ LLInspectAvatar::~LLInspectAvatar() } /*virtual*/ -BOOL LLInspectAvatar::postBuild(void) +bool LLInspectAvatar::postBuild(void) { getChild<LLUICtrl>("mute_btn")->setCommitCallback( boost::bind(&LLInspectAvatar::onClickMuteVolume, this) ); @@ -187,7 +187,7 @@ BOOL LLInspectAvatar::postBuild(void) getChild<LLUICtrl>("volume_slider")->setCommitCallback( boost::bind(&LLInspectAvatar::onVolumeChange, this, _2)); - return TRUE; + return true; } // Multiple calls to showInstance("inspect_avatar", foo) will provide different diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 491c90c571..a6d61a72fd 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -70,7 +70,7 @@ public: LLInspectObject(const LLSD& object_id); virtual ~LLInspectObject(); - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(void); // Because floater is single instance, need to re-parse data on each spawn // (for example, inspector about same avatar but in different position) @@ -149,7 +149,7 @@ LLInspectObject::~LLInspectObject() } /*virtual*/ -BOOL LLInspectObject::postBuild(void) +bool LLInspectObject::postBuild(void) { // The XML file has sample data in it. Clear that out so we don't // flicker when data arrives off network. @@ -187,7 +187,7 @@ BOOL LLInspectObject::postBuild(void) boost::bind(&LLInspectObject::update, this)); } - return TRUE; + return true; } // Multiple calls to showInstance("inspect_avatar", foo) will provide different diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index 77320510a6..5b63eb045d 100644 --- a/indra/newview/llinspectremoteobject.cpp +++ b/indra/newview/llinspectremoteobject.cpp @@ -51,7 +51,7 @@ public: LLInspectRemoteObject(const LLSD& object_id); virtual ~LLInspectRemoteObject() {}; - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(void); /*virtual*/ void onOpen(const LLSD& avatar_id); void onClickMap(); @@ -80,7 +80,7 @@ LLInspectRemoteObject::LLInspectRemoteObject(const LLSD& sd) : } /*virtual*/ -BOOL LLInspectRemoteObject::postBuild(void) +bool LLInspectRemoteObject::postBuild(void) { // hook up the inspector's buttons getChild<LLUICtrl>("map_btn")->setCommitCallback( @@ -90,7 +90,7 @@ BOOL LLInspectRemoteObject::postBuild(void) getChild<LLUICtrl>("close_btn")->setCommitCallback( boost::bind(&LLInspectRemoteObject::onClickClose, this)); - return TRUE; + return true; } /*virtual*/ diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2f2b5a7b88..7a62d4999a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -308,15 +308,15 @@ void LLInvFVBridge::setCreationDate(time_t creation_date_utc) // Can be destroyed (or moved to trash) -BOOL LLInvFVBridge::isItemRemovable() const +bool LLInvFVBridge::isItemRemovable() const { return get_is_item_removable(getInventoryModel(), mUUID); } // Can be moved to another folder -BOOL LLInvFVBridge::isItemMovable() const +bool LLInvFVBridge::isItemMovable() const { - return TRUE; + return true; } BOOL LLInvFVBridge::isLink() const @@ -333,7 +333,7 @@ BOOL LLInvFVBridge::isLibraryItem() const /** * @brief Adds this item into clipboard storage */ -BOOL LLInvFVBridge::cutToClipboard() +bool LLInvFVBridge::cutToClipboard() { const LLInventoryObject* obj = gInventory.getObject(mUUID); if (obj && isItemMovable() && isItemRemovable()) @@ -355,7 +355,7 @@ BOOL LLInvFVBridge::cutToClipboard() return perform_cutToClipboard(); } } - return FALSE; + return false; } // virtual @@ -390,14 +390,14 @@ BOOL LLInvFVBridge::perform_cutToClipboard() return FALSE; } -BOOL LLInvFVBridge::copyToClipboard() const +bool LLInvFVBridge::copyToClipboard() const { const LLInventoryObject* obj = gInventory.getObject(mUUID); if (obj && isItemCopyable()) { return LLClipboard::instance().addToClipboard(mUUID); } - return FALSE; + return false; } void LLInvFVBridge::showProperties() @@ -619,23 +619,23 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector<LLFolderViewModelItem*>& ba model->notifyObservers(); } -BOOL LLInvFVBridge::isClipboardPasteable() const +bool LLInvFVBridge::isClipboardPasteable() const { // Return FALSE on degenerated cases: empty clipboard, no inventory, no agent if (!LLClipboard::instance().hasContents() || !isAgentInventory()) { - return FALSE; + return false; } LLInventoryModel* model = getInventoryModel(); if (!model) { - return FALSE; + return false; } // In cut mode, whatever is on the clipboard is always pastable if (LLClipboard::instance().isCutMode()) { - return TRUE; + return true; } // In normal mode, we need to check each element of the clipboard to know if we can paste or not @@ -652,7 +652,7 @@ BOOL LLInvFVBridge::isClipboardPasteable() const { LLFolderBridge cat_br(mInventoryPanel.get(), mRoot, item_id); if (!cat_br.isItemCopyable(false)) - return FALSE; + return false; // Skip to the next item in the clipboard continue; } @@ -661,10 +661,10 @@ BOOL LLInvFVBridge::isClipboardPasteable() const LLItemBridge item_br(mInventoryPanel.get(), mRoot, item_id); if (!item_br.isItemCopyable(false)) { - return FALSE; + return false; } } - return TRUE; + return true; } BOOL LLInvFVBridge::isClipboardPasteableAsLink() const @@ -2087,7 +2087,7 @@ time_t LLItemBridge::getCreationDate() const } -BOOL LLItemBridge::isItemRenameable() const +bool LLItemBridge::isItemRenameable() const { LLViewerInventoryItem* item = getItem(); if(item) @@ -2096,22 +2096,22 @@ BOOL LLItemBridge::isItemRenameable() const // what the calling card points to. if (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD) { - return FALSE; + return false; } if (!item->isFinished()) // EXT-8662 { - return FALSE; + return false; } if (isInboxFolder()) { - return FALSE; + return false; } return (item->getPermissions().allowModifyBy(gAgent.getID())); } - return FALSE; + return false; } bool LLItemBridge::renameItem(const std::string& new_name) @@ -2134,25 +2134,25 @@ bool LLItemBridge::renameItem(const std::string& new_name) return false; } -BOOL LLItemBridge::removeItem() +bool LLItemBridge::removeItem() { if(!isItemRemovable()) { - return FALSE; + return false; } // move it to the trash LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); LLViewerInventoryItem* item = getItem(); - if (!item) return FALSE; + if (!item) return false; if (item->getType() != LLAssetType::AT_LSL_TEXT) { LLPreview::hide(mUUID, TRUE); } // Already in trash - if (model->isObjectDescendentOf(mUUID, trash_id)) return FALSE; + if (model->isObjectDescendentOf(mUUID, trash_id)) return false; LLNotification::Params params("ConfirmItemDeleteHasLinks"); params.functor.function(boost::bind(&LLItemBridge::confirmRemoveItem, this, _1, _2)); @@ -2172,14 +2172,14 @@ BOOL LLItemBridge::removeItem() { // Warn if the user is will break any links when deleting this item. LLNotifications::instance().add(params); - return FALSE; + return false; } } } LLNotifications::instance().forceResponse(params, 0); model->checkTrashOverflow(); - return TRUE; + return true; } BOOL LLItemBridge::confirmRemoveItem(const LLSD& notification, const LLSD& response) @@ -2269,17 +2269,17 @@ BOOL LLItemBridge::isItemPermissive() const LLHandle<LLFolderBridge> LLFolderBridge::sSelf; // Can be moved to another folder -BOOL LLFolderBridge::isItemMovable() const +bool LLFolderBridge::isItemMovable() const { LLInventoryObject* obj = getInventoryObject(); if(obj) { // If it's a protected type folder, we can't move it if (LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)obj)->getPreferredType())) - return FALSE; - return TRUE; + return false; + return true; } - return FALSE; + return false; } void LLFolderBridge::selectItem() @@ -2418,7 +2418,7 @@ void LLFolderBridge::update() class LLIsItemRemovable : public LLFolderViewFunctor { public: - LLIsItemRemovable() : mPassed(TRUE) {} + LLIsItemRemovable() : mPassed(true) {} virtual void doFolder(LLFolderViewFolder* folder) { mPassed &= folder->getViewModelItem()->isItemRemovable(); @@ -2427,15 +2427,15 @@ public: { mPassed &= item->getViewModelItem()->isItemRemovable(); } - BOOL mPassed; + bool mPassed; }; // Can be destroyed (or moved to trash) -BOOL LLFolderBridge::isItemRemovable() const +bool LLFolderBridge::isItemRemovable() const { if (!get_is_category_removable(getInventoryModel(), mUUID)) { - return FALSE; + return false; } LLInventoryPanel* panel = mInventoryPanel.get(); @@ -2446,16 +2446,16 @@ BOOL LLFolderBridge::isItemRemovable() const folderp->applyFunctorToChildren(folder_test); if (!folder_test.mPassed) { - return FALSE; + return false; } } if (isMarketplaceListingsFolder() && (!LLMarketplaceData::instance().isSLMDataFetched() || LLMarketplaceData::instance().getActivationState(mUUID))) { - return FALSE; + return false; } - return TRUE; + return true; } BOOL LLFolderBridge::isUpToDate() const @@ -2513,10 +2513,10 @@ bool LLFolderBridge::isItemCopyable(bool can_copy_as_link) const return true; } -BOOL LLFolderBridge::isClipboardPasteable() const +bool LLFolderBridge::isClipboardPasteable() const { if ( ! LLInvFVBridge::isClipboardPasteable() ) - return FALSE; + return false; // Don't allow pasting duplicates to the Calling Card/Friends subfolders, see bug EXT-1599 if ( LLFriendCardsManager::instance().isCategoryInFriendFolder( getCategory() ) ) @@ -2524,7 +2524,7 @@ BOOL LLFolderBridge::isClipboardPasteable() const LLInventoryModel* model = getInventoryModel(); if ( !model ) { - return FALSE; + return false; } std::vector<LLUUID> objects; @@ -2538,12 +2538,12 @@ BOOL LLFolderBridge::isClipboardPasteable() const const LLUUID &obj_id = objects.at(i); if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) ) { - return FALSE; + return false; } } } - return TRUE; + return true; } BOOL LLFolderBridge::isClipboardPasteableAsLink() const @@ -3705,7 +3705,7 @@ void LLFolderBridge::determineFolderType() } } -BOOL LLFolderBridge::isItemRenameable() const +bool LLFolderBridge::isItemRenameable() const { return get_is_category_renameable(getInventoryModel(), mUUID); } @@ -3780,11 +3780,11 @@ bool LLFolderBridge::renameItem(const std::string& new_name) return false; } -BOOL LLFolderBridge::removeItem() +bool LLFolderBridge::removeItem() { if(!isItemRemovable()) { - return FALSE; + return false; } const LLViewerInventoryCategory *cat = getCategory(); @@ -3795,7 +3795,7 @@ BOOL LLFolderBridge::removeItem() LLNotification::Params params("ConfirmDeleteProtectedCategory"); params.payload(payload).substitutions(args).functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2)); LLNotifications::instance().forceResponse(params, 0); - return TRUE; + return true; } @@ -4661,7 +4661,7 @@ bool LLFolderBridge::hasChildren() const return has_children != LLInventoryModel::CHILDREN_NO; } -BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLFolderBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) @@ -4681,7 +4681,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, //LL_INFOS() << "LLFolderBridge::dragOrDrop()" << LL_ENDL; - BOOL accept = FALSE; + bool accept = false; switch(cargo_type) { case DAD_TEXTURE: @@ -4720,7 +4720,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_CATEGORY: if (LLFriendCardsManager::instance().isAnyFriendCategory(mUUID)) { - accept = FALSE; + accept = false; } else { @@ -6238,13 +6238,13 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } -BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLCallingCardBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { LLViewerInventoryItem* item = getItem(); - BOOL rv = FALSE; + bool rv = false; if(item) { // check the type @@ -6269,7 +6269,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, if(gInventory.getItem(inv_item->getUUID()) && perm.allowOperationBy(PERM_TRANSFER, gAgent.getID())) { - rv = TRUE; + rv = true; if(drop) { LLGiveInventory::doGiveInventoryItem(item->getCreatorUUID(), @@ -6281,7 +6281,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, // It's not in the user's inventory (it's probably in // an object's contents), so disallow dragging it here. // You can't give something you don't yet have. - rv = FALSE; + rv = false; } break; } @@ -6290,7 +6290,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, LLInventoryCategory* inv_cat = (LLInventoryCategory*)cargo_data; if( gInventory.getCategory( inv_cat->getUUID() ) ) { - rv = TRUE; + rv = true; if(drop) { LLGiveInventory::doGiveInventoryCategory( @@ -6303,7 +6303,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, // It's not in the user's inventory (it's probably in // an object's contents), so disallow dragging it here. // You can't give something you don't yet have. - rv = FALSE; + rv = false; } break; } @@ -6444,14 +6444,14 @@ void LLGestureBridge::openItem() */ } -BOOL LLGestureBridge::removeItem() +bool LLGestureBridge::removeItem() { // Grab class information locally since *this may be deleted // within this function. Not a great pattern... const LLInventoryModel* model = getInventoryModel(); if(!model) { - return FALSE; + return false; } const LLUUID item_id = mUUID; @@ -6462,7 +6462,7 @@ BOOL LLGestureBridge::removeItem() // If deactivateGesture deleted *this, then return out immediately. if (!model->getObject(item_id)) { - return TRUE; + return true; } return LLItemBridge::removeItem(); @@ -7433,14 +7433,14 @@ bool LLSettingsBridge::renameItem(const std::string& new_name) return LLItemBridge::renameItem(new_name); } -BOOL LLSettingsBridge::isItemRenameable() const +bool LLSettingsBridge::isItemRenameable() const { LLViewerInventoryItem* item = getItem(); if (item) { return (item->getPermissions().allowModifyBy(gAgent.getID())); } - return FALSE; + return false; } bool LLSettingsBridge::canUpdateParcel() const diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 854113df5c..686fc9ff43 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -111,11 +111,11 @@ public: virtual void closeItem() {} virtual void navigateToFolder(bool new_window = false, bool change_mode = false); virtual void showProperties(); - virtual BOOL isItemRenameable() const { return TRUE; } + virtual bool isItemRenameable() const { return true; } virtual BOOL isMultiPreviewAllowed() { return TRUE; } //virtual bool renameItem(const std::string& new_name) {} - virtual BOOL isItemRemovable() const; - virtual BOOL isItemMovable() const; + virtual bool isItemRemovable() const; + virtual bool isItemMovable() const; virtual BOOL isItemInTrash() const; virtual bool isItemInOutfits() const; virtual BOOL isLink() const; @@ -124,10 +124,10 @@ public: virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch); virtual void move(LLFolderViewModelItem* new_parent_bridge) {} virtual bool isItemCopyable(bool can_copy_as_link = true) const { return false; } - virtual BOOL copyToClipboard() const; - virtual BOOL cutToClipboard(); + virtual bool copyToClipboard() const; + virtual bool cutToClipboard(); virtual bool isCutToClipboard(); - virtual BOOL isClipboardPasteable() const; + virtual bool isClipboardPasteable() const; virtual BOOL isClipboardPasteableAsLink() const; virtual void pasteFromClipboard() {} virtual void pasteLinkFromClipboard() {} @@ -136,7 +136,7 @@ public: virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual LLToolDragAndDrop::ESource getDragSource() const; virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { return FALSE; } @@ -246,9 +246,9 @@ public: virtual LLFontGL::StyleFlags getLabelStyle() const; virtual PermissionMask getPermissionMask() const; virtual time_t getCreationDate() const; - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual bool renameItem(const std::string& new_name); - virtual BOOL removeItem(); + virtual bool removeItem(); virtual bool isItemCopyable(bool can_copy_as_link = true) const; virtual bool hasChildren() const { return FALSE; } virtual BOOL isUpToDate() const { return TRUE; } @@ -290,7 +290,7 @@ public: virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void closeItem(); - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual void selectItem(); virtual void restoreItem(); @@ -307,7 +307,7 @@ public: virtual bool renameItem(const std::string& new_name); - virtual BOOL removeItem(); + virtual bool removeItem(); BOOL removeSystemFolder(); bool removeItemResponse(const LLSD& notification, const LLSD& response); void updateHierarchyCreationDate(time_t date); @@ -316,16 +316,16 @@ public: virtual void pasteLinkFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool hasChildren() const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); - virtual BOOL isItemRemovable() const; - virtual BOOL isItemMovable() const ; + virtual bool isItemRemovable() const; + virtual bool isItemMovable() const ; virtual BOOL isUpToDate() const; virtual bool isItemCopyable(bool can_copy_as_link = true) const; - virtual BOOL isClipboardPasteable() const; + virtual bool isClipboardPasteable() const; virtual BOOL isClipboardPasteableAsLink() const; EInventorySortGroup getSortGroup() const; @@ -456,7 +456,7 @@ public: virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); @@ -491,7 +491,7 @@ public: virtual std::string getLabelSuffix() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); static void playGesture(const LLUUID& item_id); }; @@ -519,7 +519,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); - virtual BOOL isItemWearable() const { return TRUE; } + virtual bool isItemWearable() const { return true; } virtual std::string getLabelSuffix() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool renameItem(const std::string& new_name); @@ -552,7 +552,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); - virtual BOOL isItemWearable() const { return TRUE; } + virtual bool isItemWearable() const { return true; } virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual std::string getLabelSuffix() const; virtual bool renameItem(const std::string& new_name); @@ -571,7 +571,6 @@ public: void editOnAvatar(); static BOOL canRemoveFromAvatar( void* userdata ); - static void removeAllClothesFromAvatar(); void removeFromAvatar(); protected: LLAssetType::EType mAssetType; @@ -633,7 +632,7 @@ public: virtual BOOL isMultiPreviewAllowed() { return FALSE; } virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool renameItem(const std::string& new_name); - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual LLSettingsType::type_e getSettingsType() const { return mSettingsType; } protected: diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 0d393952c7..712f8dbb78 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2788,7 +2788,7 @@ bool LLLinkedItemIDMatches::operator()(LLInventoryCategory* cat, LLInventoryItem (item->getLinkedUUID() == mBaseItemID)); // A linked item's assetID will be the compared-to item's itemID. } -void LLSaveFolderState::setApply(BOOL apply) +void LLSaveFolderState::setApply(bool apply) { mApply = apply; // before generating new list of open folders, clear the old one diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index b7b29e2d19..77303645c0 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -69,10 +69,10 @@ class LLGalleryPanel: public LLPanel { public: - BOOL canFocusChildren() const override + bool canFocusChildren() const override { // Tell Tab to not focus children - return FALSE; + return false; } protected: @@ -144,7 +144,7 @@ const LLInventoryGallery::Params& LLInventoryGallery::getDefaultParams() return LLUICtrlFactory::getDefaultParams<LLInventoryGallery>(); } -BOOL LLInventoryGallery::postBuild() +bool LLInventoryGallery::postBuild() { mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel"); LLPanel::Params params = LLPanel::getDefaultParams(); @@ -153,7 +153,7 @@ BOOL LLInventoryGallery::postBuild() mInventoryGalleryMenu = new LLInventoryGalleryContextMenu(this); mRootGalleryMenu = new LLInventoryGalleryContextMenu(this); mRootGalleryMenu->setRootFolder(true); - return TRUE; + return true; } LLInventoryGallery::~LLInventoryGallery() @@ -367,7 +367,7 @@ void LLInventoryGallery::draw() } } -void LLInventoryGallery::onVisibilityChange(BOOL new_visibility) +void LLInventoryGallery::onVisibilityChange(bool new_visibility) { if (new_visibility) { @@ -1046,9 +1046,9 @@ bool LLInventoryGallery::handleRightMouseDown(S32 x, S32 y, MASK mask) } -BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) +bool LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_RETURN: @@ -1060,7 +1060,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) if (category) { setRootFolder(*iter); - handled = TRUE; + handled = true; } else { @@ -1071,7 +1071,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) } } } - handled = TRUE; + handled = true; break; case KEY_DELETE: #if LL_DARWIN @@ -1083,7 +1083,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { deleteSelection(); } - handled = TRUE; + handled = true; break; case KEY_F2: @@ -1092,7 +1092,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { mInventoryGalleryMenu->rename(mSelectedItemIDs.front()); } - handled = TRUE; + handled = true; break; case KEY_PAGE_UP: @@ -1101,7 +1101,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->pageUp(30); } - handled = TRUE; + handled = true; break; case KEY_PAGE_DOWN: @@ -1110,7 +1110,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->pageDown(30); } - handled = TRUE; + handled = true; break; case KEY_HOME: @@ -1119,7 +1119,7 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->goToTop(); } - handled = TRUE; + handled = true; break; case KEY_END: @@ -1128,27 +1128,27 @@ BOOL LLInventoryGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->goToBottom(); } - handled = TRUE; + handled = true; break; case KEY_LEFT: moveLeft(mask); - handled = TRUE; + handled = true; break; case KEY_RIGHT: moveRight(mask); - handled = TRUE; + handled = true; break; case KEY_UP: moveUp(mask); - handled = TRUE; + handled = true; break; case KEY_DOWN: moveDown(mask); - handled = TRUE; + handled = true; break; default: @@ -1631,22 +1631,22 @@ void LLInventoryGallery::copy() mFilterSubString.clear(); } -BOOL LLInventoryGallery::canCopy() const +bool LLInventoryGallery::canCopy() const { if (!getVisible() || !getEnabled() || mSelectedItemIDs.empty()) { - return FALSE; + return false; } for (const LLUUID& id : mSelectedItemIDs) { if (!isItemCopyable(id)) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLInventoryGallery::cut() @@ -1668,11 +1668,11 @@ void LLInventoryGallery::cut() mFilterSubString.clear(); } -BOOL LLInventoryGallery::canCut() const +bool LLInventoryGallery::canCut() const { if (!getVisible() || !getEnabled() || mSelectedItemIDs.empty()) { - return FALSE; + return false; } for (const LLUUID& id : mSelectedItemIDs) @@ -1682,16 +1682,16 @@ BOOL LLInventoryGallery::canCut() const { if (!get_is_category_removable(&gInventory, id)) { - return FALSE; + return false; } } else if (!get_is_item_removable(&gInventory, id)) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLInventoryGallery::paste() @@ -1828,18 +1828,18 @@ void LLInventoryGallery::paste(const LLUUID& dest, LLClipboard::instance().setCutMode(false); } -BOOL LLInventoryGallery::canPaste() const +bool LLInventoryGallery::canPaste() const { // Return FALSE on degenerated cases: empty clipboard, no inventory, no agent if (!LLClipboard::instance().hasContents()) { - return FALSE; + return false; } // In cut mode, whatever is on the clipboard is always pastable if (LLClipboard::instance().isCutMode()) { - return TRUE; + return true; } // In normal mode, we need to check each element of the clipboard to know if we can paste or not @@ -1853,10 +1853,10 @@ BOOL LLInventoryGallery::canPaste() const // Each item must be copyable to be pastable if (!isItemCopyable(item_id)) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLInventoryGallery::onDelete(const LLSD& notification, const LLSD& response, const selection_deque selected_ids) @@ -2414,12 +2414,12 @@ bool LLInventoryGallery::isForwardAvailable() return (!mForwardFolders.empty() && (mFolderID != mForwardFolders.back())); } -BOOL LLInventoryGallery::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLInventoryGallery::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { // have children handle it first - BOOL handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, + bool handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); // when drop is not handled by child, it should be handled by the root folder . @@ -2598,13 +2598,13 @@ LLInventoryGalleryItem::~LLInventoryGalleryItem() { } -BOOL LLInventoryGalleryItem::postBuild() +bool LLInventoryGalleryItem::postBuild() { mNameText = getChild<LLTextBox>("item_name"); mTextBgPanel = getChild<LLPanel>("text_bg_panel"); mThumbnailCtrl = getChild<LLThumbnailCtrl>("preview_thumbnail"); - return TRUE; + return true; } void LLInventoryGalleryItem::setType(LLAssetType::EType type, LLInventoryType::EType inventory_type, U32 flags, bool is_link) @@ -2832,7 +2832,7 @@ bool LLInventoryGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask) return true; } -BOOL LLInventoryGalleryItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLInventoryGalleryItem::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -2840,19 +2840,19 @@ BOOL LLInventoryGalleryItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL dro { if (!mIsFolder) { - return FALSE; + return false; } return mGallery->baseHandleDragAndDrop(mUUID, drop, cargo_type, cargo_data, accept, tooltip_msg); } -BOOL LLInventoryGalleryItem::handleKeyHere(KEY key, MASK mask) +bool LLInventoryGalleryItem::handleKeyHere(KEY key, MASK mask) { if (!mGallery) { - return FALSE; + return false; } - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_LEFT: diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index e14aa56d3c..72aaaa2ade 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -75,15 +75,15 @@ public: LLInventoryGallery(const LLInventoryGallery::Params& params = getDefaultParams()); ~LLInventoryGallery(); - BOOL postBuild() override; + bool postBuild() override; void initGallery(); void draw() override; - void onVisibilityChange(BOOL new_visibility) override; - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, + void onVisibilityChange(bool new_visibility) override; + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; void startDrag(); bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; - BOOL handleKeyHere(KEY key, MASK mask) override; + bool handleKeyHere(KEY key, MASK mask) override; void moveUp(MASK mask); void moveDown(MASK mask); void moveLeft(MASK mask); @@ -153,13 +153,13 @@ public: // Copy & paste (LLEditMenuHandler) void copy() override; - BOOL canCopy() const override; + bool canCopy() const override; void cut() override; - BOOL canCut() const override; + bool canCut() const override; void paste() override; - BOOL canPaste() const override; + bool canPaste() const override; // Copy & paste & delete static void onDelete(const LLSD& notification, const LLSD& response, const selection_deque selected_ids); @@ -299,19 +299,19 @@ public: LLInventoryGalleryItem(const Params& p); virtual ~LLInventoryGalleryItem(); - BOOL postBuild(); + bool postBuild(); void draw(); bool handleMouseDown(S32 x, S32 y, MASK mask); bool handleRightMouseDown(S32 x, S32 y, MASK mask); bool handleDoubleClick(S32 x, S32 y, MASK mask); bool handleMouseUp(S32 x, S32 y, MASK mask); bool handleHover(S32 x, S32 y, MASK mask); - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); - BOOL handleKeyHere(KEY key, MASK mask); + bool handleKeyHere(KEY key, MASK mask); void onFocusLost(); void onFocusReceived(); diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index 10a69432c9..b8099a762b 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -158,7 +158,7 @@ void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show) ctrl->setEnabled(show); } -BOOL LLPanelInventoryListItemBase::postBuild() +bool LLPanelInventoryListItemBase::postBuild() { LLViewerInventoryItem* inv_item = getItem(); if (inv_item) @@ -172,7 +172,7 @@ BOOL LLPanelInventoryListItemBase::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } void LLPanelInventoryListItemBase::setValue(const LLSD& value) diff --git a/indra/newview/llinventorylistitem.h b/indra/newview/llinventorylistitem.h index fb848e9f5a..964659a85a 100644 --- a/indra/newview/llinventorylistitem.h +++ b/indra/newview/llinventorylistitem.h @@ -117,7 +117,7 @@ public: /** * Inheritors need to call base implementation of postBuild() */ - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** * Handles item selection diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 8214f4ed6d..05a7e35829 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -377,7 +377,7 @@ void LLInventoryPanel::initializeViewBuilding() } /*virtual*/ -void LLInventoryPanel::onVisibilityChange(BOOL new_visibility) +void LLInventoryPanel::onVisibilityChange(bool new_visibility) { if (new_visibility && mViewsInitialized == VIEWS_UNINITIALIZED) { @@ -1404,13 +1404,13 @@ bool LLInventoryPanel::handleToolTip(S32 x, S32 y, MASK mask) return LLPanel::handleToolTip(x, y, mask); } -BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { - BOOL handled = FALSE; + bool handled = false; if (mAcceptsDragAndDrop) { @@ -2091,9 +2091,9 @@ void LLInventoryPanel::doToSelected(const LLSD& userdata) return; } -BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) +bool LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_RETURN: @@ -2113,7 +2113,7 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) } } LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "open"); - handled = TRUE; + handled = true; } break; case KEY_DELETE: @@ -2125,7 +2125,7 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) if (isSelectionRemovable() && (mask == MASK_NONE)) { LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "delete"); - handled = TRUE; + handled = true; } break; } @@ -2483,13 +2483,13 @@ void LLAssetFilteredInventoryPanel::initFromParams(const Params& p) getFilter().setFilterNoMarketplaceFolder(); } -BOOL LLAssetFilteredInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLAssetFilteredInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { - BOOL result = FALSE; + bool result = false; if (mAcceptsDragAndDrop) { diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 8b85326468..deaa46fecb 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -161,11 +161,11 @@ public: LLFolderViewModelInventory& getRootViewModel() { return mInventoryViewModel; } // LLView methods - /*virtual*/ void onVisibilityChange(BOOL new_visibility) override; + /*virtual*/ void onVisibilityChange(bool new_visibility) override; void draw() override; - /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask ) override; + /*virtual*/ bool handleKeyHere( KEY key, MASK mask ) override; bool handleHover(S32 x, S32 y, MASK mask) override; - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -471,7 +471,7 @@ protected: public: ~LLAssetFilteredInventoryPanel() {} - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 99412c0b16..c455a5e75b 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -455,7 +455,7 @@ LLLocationInputCtrl::~LLLocationInputCtrl() mLocationHistoryConnection.disconnect(); } -void LLLocationInputCtrl::setEnabled(BOOL enabled) +void LLLocationInputCtrl::setEnabled(bool enabled) { LLComboBox::setEnabled(enabled); mAddLandmarkBtn->setEnabled(enabled); @@ -502,9 +502,9 @@ bool LLLocationInputCtrl::handleToolTip(S32 x, S32 y, MASK mask) return false; } -BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask) +bool LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask) { - BOOL result = LLComboBox::handleKeyHere(key, mask); + bool result = LLComboBox::handleKeyHere(key, mask); if (key == KEY_DOWN && hasFocus() && mList->getItemCount() != 0 && !mList->getVisible()) { @@ -560,13 +560,13 @@ void LLLocationInputCtrl::setText(const LLStringExplicit& text) mHasAutocompletedText = FALSE; } -void LLLocationInputCtrl::setFocus(BOOL b) +void LLLocationInputCtrl::setFocus(bool b) { LLComboBox::setFocus(b); if (mTextEntry && b && !mList->getVisible()) { - mTextEntry->setFocus(TRUE); + mTextEntry->setFocus(true); } } @@ -613,7 +613,7 @@ void LLLocationInputCtrl::draw() LLComboBox::draw(); } -void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLLocationInputCtrl::reshape(S32 width, S32 height, bool called_from_parent) { LLComboBox::reshape(width, height, called_from_parent); diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index 2cfd456bdb..193b5b8258 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -88,17 +88,17 @@ public: }; // LLView interface - /*virtual*/ void setEnabled(BOOL enabled); + /*virtual*/ void setEnabled(bool enabled); /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); /*virtual*/ void onFocusReceived(); /*virtual*/ void onFocusLost(); /*virtual*/ void draw(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); //======================================================================== // LLUICtrl interface - /*virtual*/ void setFocus(BOOL b); + /*virtual*/ void setFocus(bool b); //======================================================================== // LLComboBox interface diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index c066a7b5c3..cba8195763 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -103,17 +103,17 @@ LLFloaterComboOptions::~LLFloaterComboOptions() } -BOOL LLFloaterComboOptions::postBuild() +bool LLFloaterComboOptions::postBuild() { - mConfirmButton = getChild<LLButton>("combo_ok", TRUE); - mCancelButton = getChild<LLButton>("combo_cancel", TRUE); - mComboOptions = getChild<LLComboBox>("combo_options", TRUE); - mComboText = getChild<LLTextBox>("combo_text", TRUE); + mConfirmButton = getChild<LLButton>("combo_ok", true); + mCancelButton = getChild<LLButton>("combo_cancel", true); + mComboOptions = getChild<LLComboBox>("combo_options", true); + mComboText = getChild<LLTextBox>("combo_text", true); mConfirmButton->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) {onConfirm(); }); mCancelButton->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& param) {onCancel(); }); - return TRUE; + return true; } LLFloaterComboOptions* LLFloaterComboOptions::showUI( @@ -420,7 +420,7 @@ void LLMaterialEditor::setAuxItem(const LLInventoryItem* item) } } -BOOL LLMaterialEditor::postBuild() +bool LLMaterialEditor::postBuild() { // if this is a 'live editor' instance, it is also // single instance and uses live overrides diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h index 4e0350b4cc..782b47bcc0 100644 --- a/indra/newview/llmaterialeditor.h +++ b/indra/newview/llmaterialeditor.h @@ -55,7 +55,7 @@ public: LLFloaterComboOptions(); virtual ~LLFloaterComboOptions(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); static LLFloaterComboOptions* showUI( combo_callback callback, @@ -164,7 +164,7 @@ class LLMaterialEditor : public LLPreview, public LLVOInventoryListener void setAuxItem(const LLInventoryItem* item) override; // llpanel - BOOL postBuild() override; + bool postBuild() override; void onClickCloseBtn(bool app_quitting = false) override; void onClose(bool app_quitting) override; diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index e8450f8d6b..0361b33875 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -431,11 +431,11 @@ void LLMediaCtrl::onFocusLost() //////////////////////////////////////////////////////////////////////////////// // -BOOL LLMediaCtrl::postBuild () +bool LLMediaCtrl::postBuild () { setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChanged, this, _2)); - return TRUE; + return true; } void LLMediaCtrl::onOpenWebInspector() @@ -446,9 +446,9 @@ void LLMediaCtrl::onOpenWebInspector() //////////////////////////////////////////////////////////////////////////////// // -BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) +bool LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) { - BOOL result = FALSE; + bool result = false; if (mMediaSource) { @@ -463,9 +463,9 @@ BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) //////////////////////////////////////////////////////////////////////////////// // -BOOL LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask) +bool LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask) { - BOOL result = FALSE; + bool result = false; if (mMediaSource) { @@ -480,7 +480,7 @@ BOOL LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask) //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility ) +void LLMediaCtrl::onVisibilityChange ( bool new_visibility ) { LL_INFOS() << "visibility changed to " << (new_visibility?"true":"false") << LL_ENDL; if(mMediaSource) @@ -523,7 +523,7 @@ void LLMediaCtrl::onVisibilityChanged ( const LLSD& new_visibility ) //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent ) +void LLMediaCtrl::reshape( S32 width, S32 height, bool called_from_parent ) { if(!getDecoupleTextureSize()) { diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 251d6ae5f6..4d4600cb72 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -154,13 +154,13 @@ public: void setAllowFileDownload(bool allow) { mAllowFileDownload = allow; } // over-rides - virtual BOOL handleKeyHere( KEY key, MASK mask); - virtual BOOL handleKeyUpHere(KEY key, MASK mask); - virtual void onVisibilityChange ( BOOL new_visibility ); + virtual bool handleKeyHere( KEY key, MASK mask); + virtual bool handleKeyUpHere(KEY key, MASK mask); + virtual void onVisibilityChange ( bool new_visibility ); virtual bool handleUnicodeCharHere(llwchar uni_char); - virtual void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape( S32 width, S32 height, bool called_from_parent = true); virtual void draw(); - virtual BOOL postBuild(); + virtual bool postBuild(); // focus overrides void onFocusLost(); @@ -178,7 +178,7 @@ public: virtual bool wantsKeyUpKeyDown() const; virtual bool wantsReturnKey() const; - virtual BOOL acceptsTextInput() const {return TRUE;} + virtual bool acceptsTextInput() const { return true; } protected: void convertInputCoords(S32& x, S32& y); diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp index ff86400a56..532876a4ea 100644 --- a/indra/newview/llmorphview.cpp +++ b/indra/newview/llmorphview.cpp @@ -47,7 +47,7 @@ LLMorphView *gMorphView = NULL; -const F32 MORPH_NEAR_CLIP = 0.1f; +constexpr F32 MORPH_NEAR_CLIP = 0.1f; //----------------------------------------------------------------------------- // LLMorphView() @@ -103,7 +103,7 @@ void LLMorphView::shutdown() //----------------------------------------------------------------------------- // setVisible() //----------------------------------------------------------------------------- -void LLMorphView::setVisible(BOOL visible) +void LLMorphView::setVisible(bool visible) { if( visible != getVisible() ) { diff --git a/indra/newview/llmorphview.h b/indra/newview/llmorphview.h index 318d49bba5..6c06947fc3 100644 --- a/indra/newview/llmorphview.h +++ b/indra/newview/llmorphview.h @@ -49,7 +49,7 @@ public: void shutdown(); // inherited methods - /*virtual*/ void setVisible(BOOL visible); + void setVisible(bool visible) override; void setCameraTargetJoint(LLJoint *joint) {mCameraTargetJoint = joint;} LLJoint* getCameraTargetJoint() {return mCameraTargetJoint;} diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 733d5b1f11..9dd8b489e4 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -88,7 +88,7 @@ LLFloaterMove::~LLFloaterMove() } // virtual -BOOL LLFloaterMove::postBuild() +bool LLFloaterMove::postBuild() { updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) @@ -142,12 +142,12 @@ BOOL LLFloaterMove::postBuild() gAgent.addParcelChangedCallback(LLFloaterMove::sUpdateFlyingStatus); - return TRUE; + return true; } // *NOTE: we assume that setVisible() is called on floater close. // virtual -void LLFloaterMove::setVisible(BOOL visible) +void LLFloaterMove::setVisible(bool visible) { // Do nothing with Stand/Stop Flying panel in excessive calls of this method. if (getVisible() == visible) @@ -451,7 +451,7 @@ void LLFloaterMove::sUpdateFlyingStatus() } -void LLFloaterMove::showModeButtons(BOOL bShow) +void LLFloaterMove::showModeButtons(bool bShow) { if (mModeActionsPanel->getVisible() == bShow) return; @@ -562,26 +562,26 @@ void LLPanelStandStopFlying::clearStandStopFlyingMode(EStandStopFlyingMode mode) } -BOOL LLPanelStandStopFlying::postBuild() +bool LLPanelStandStopFlying::postBuild() { mStandButton = getChild<LLButton>("stand_btn"); mStandButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStandButtonClick, this)); mStandButton->setCommitCallback(boost::bind(&LLFloaterMove::enableInstance)); - mStandButton->setVisible(FALSE); + mStandButton->setVisible(false); LLHints::getInstance()->registerHintTarget("stand_btn", mStandButton->getHandle()); mStopFlyingButton = getChild<LLButton>("stop_fly_btn"); //mStopFlyingButton->setCommitCallback(boost::bind(&LLFloaterMove::setFlyingMode, FALSE)); mStopFlyingButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStopFlyingButtonClick, this)); - mStopFlyingButton->setVisible(FALSE); + mStopFlyingButton->setVisible(false); gViewerWindow->setOnWorldViewRectUpdated(boost::bind(&LLPanelStandStopFlying::updatePosition, this)); - return TRUE; + return true; } //virtual -void LLPanelStandStopFlying::setVisible(BOOL visible) +void LLPanelStandStopFlying::setVisible(bool visible) { //we dont need to show the panel if these buttons are not activated if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false; diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index c4d56fc2bd..3862b2fdca 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -48,8 +48,8 @@ private: ~LLFloaterMove(); public: - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ bool postBuild(); + /*virtual*/ void setVisible(bool visible); static F32 getYawRate(F32 time); static void setFlyingMode(BOOL fly); void setFlyingModeImpl(BOOL fly); @@ -86,7 +86,7 @@ private: void initModeButtonMap(); void setModeButtonToggleState(const EMovementMode mode); void updateButtonsWithMovementMode(const EMovementMode newMode); - void showModeButtons(BOOL bShow); + void showModeButtons(bool bShow); public: @@ -141,8 +141,8 @@ public: static LLPanelStandStopFlying* getInstance(); static void setStandStopFlyingMode(EStandStopFlyingMode mode); static void clearStandStopFlyingMode(EStandStopFlyingMode mode); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ bool postBuild(); + /*virtual*/ void setVisible(bool visible); // *HACK: due to hard enough to have this control aligned with "Move" button while resizing // let update its position in each frame diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 034ba38f8d..e0e9d50d49 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -45,7 +45,7 @@ static LLDefaultChildRegistry::Register<LLNameListCtrl> r("name_list"); -static const S32 info_icon_size = 16; +static constexpr S32 info_icon_size = 16; void LLNameListCtrl::NameTypeNames::declareValues() { @@ -87,19 +87,19 @@ LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPositi } // virtual, public -BOOL LLNameListCtrl::handleDragAndDrop( +bool LLNameListCtrl::handleDragAndDrop( S32 x, S32 y, MASK mask, - BOOL drop, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { if (!mAllowCallingCardDrop) { - return FALSE; + return false; } - BOOL handled = FALSE; + bool handled = false; if (cargo_type == DAD_CALLINGCARD) { @@ -128,7 +128,7 @@ BOOL LLNameListCtrl::handleDragAndDrop( } } - handled = TRUE; + handled = true; LL_DEBUGS("UserInput") << "dragAndDrop handled by LLNameListCtrl " << getName() << LL_ENDL; return handled; diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index d2c374ca33..83e6cacdb1 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -166,8 +166,8 @@ public: LLUUID getSelectedSpecialId(); // LLView interface - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, void *cargo_data, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e98c06d518..4057050946 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -286,7 +286,7 @@ LLNavigationBar::~LLNavigationBar() mTeleportFailedConnection.disconnect(); } -BOOL LLNavigationBar::postBuild() +bool LLNavigationBar::postBuild() { mBtnBack = getChild<LLPullButton>("back_btn"); mBtnForward = getChild<LLPullButton>("forward_btn"); @@ -331,10 +331,10 @@ BOOL LLNavigationBar::postBuild() mNavigationPanel->getResizeBar()->setResizeListener(boost::bind(&LLNavigationBar::onNavbarResized, this)); mFavoritePanel->getResizeBar()->setResizeListener(boost::bind(&LLNavigationBar::onNavbarResized, this)); - return TRUE; + return true; } -void LLNavigationBar::setVisible(BOOL visible) +void LLNavigationBar::setVisible(bool visible) { // change visibility of grandparent layout_panel to animate in and out if (getParent()) diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 5b39c00e46..4df26ff1a9 100755 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -94,8 +94,8 @@ public: /*virtual*/ void draw(); /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ bool postBuild(); + /*virtual*/ void setVisible(bool visible); void handleLoginComplete(); void clearHistoryCache(); diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 1299739857..5cf2d80ee2 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -69,20 +69,20 @@ static LLDefaultChildRegistry::Register<LLNetMap> r1("net_map"); -const F32 LLNetMap::MAP_SCALE_MIN = 32; -const F32 LLNetMap::MAP_SCALE_FAR = 32; -const F32 LLNetMap::MAP_SCALE_MEDIUM = 128; -const F32 LLNetMap::MAP_SCALE_CLOSE = 256; -const F32 LLNetMap::MAP_SCALE_VERY_CLOSE = 1024; -const F32 LLNetMap::MAP_SCALE_MAX = 4096; +constexpr F32 LLNetMap::MAP_SCALE_MIN = 32; +constexpr F32 LLNetMap::MAP_SCALE_FAR = 32; +constexpr F32 LLNetMap::MAP_SCALE_MEDIUM = 128; +constexpr F32 LLNetMap::MAP_SCALE_CLOSE = 256; +constexpr F32 LLNetMap::MAP_SCALE_VERY_CLOSE = 1024; +constexpr F32 LLNetMap::MAP_SCALE_MAX = 4096; -const F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%) -const F32 MIN_DOT_RADIUS = 3.5f; -const F32 DOT_SCALE = 0.75f; -const F32 MIN_PICK_SCALE = 2.f; -const S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag +constexpr F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%) +constexpr F32 MIN_DOT_RADIUS = 3.5f; +constexpr F32 DOT_SCALE = 0.75f; +constexpr F32 MIN_PICK_SCALE = 2.f; +constexpr S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag -const F64 COARSEUPDATE_MAX_Z = 1020.0f; +constexpr F64 COARSEUPDATE_MAX_Z = 1020.0f; LLNetMap::LLNetMap (const Params & p) : LLUICtrl (p), @@ -126,7 +126,7 @@ LLNetMap::~LLNetMap() } } -BOOL LLNetMap::postBuild() +bool LLNetMap::postBuild() { LLUICtrl::CommitCallbackRegistry::ScopedRegistrar commitRegistrar; LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enableRegistrar; @@ -142,7 +142,7 @@ BOOL LLNetMap::postBuild() LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_mini_map.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mPopupMenuHandle = menu->getHandle(); menu->setItemEnabled("Re-center map", false); - return TRUE; + return true; } void LLNetMap::setScale( F32 scale ) @@ -544,7 +544,7 @@ void LLNetMap::draw() LLUICtrl::draw(); } -void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLNetMap::reshape(S32 width, S32 height, bool called_from_parent) { LLUICtrl::reshape(width, height, called_from_parent); createObjectImage(); @@ -1067,14 +1067,14 @@ bool LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask) return true; } -BOOL LLNetMap::handleClick(S32 x, S32 y, MASK mask) +bool LLNetMap::handleClick(S32 x, S32 y, MASK mask) { // TODO: allow clicking an avatar on minimap to select avatar in the nearby avatar list // if(mClosestAgentToCursor.notNull()) // mNearbyList->selectUser(mClosestAgentToCursor); // Needs a registered observer i guess to accomplish this without using // globals to tell the mNearbyList in llpeoplepanel to select the user - return TRUE; + return true; } bool LLNetMap::handleDoubleClick(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index c574a32dab..0b35f2d6bf 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -75,11 +75,11 @@ public: /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ bool handleHover( S32 x, S32 y, MASK mask ); /*virtual*/ bool handleToolTip( S32 x, S32 y, MASK mask); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ bool handleRightMouseDown( S32 x, S32 y, MASK mask ); - /*virtual*/ BOOL handleClick(S32 x, S32 y, MASK mask); + /*virtual*/ bool handleClick(S32 x, S32 y, MASK mask); /*virtual*/ bool handleDoubleClick( S32 x, S32 y, MASK mask ); void setScale(F32 scale); diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index bc5cf173a4..d73f338878 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -56,9 +56,9 @@ LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mNotificationName = p.notification_name; } -BOOL LLNotificationListItem::postBuild() +bool LLNotificationListItem::postBuild() { - BOOL rv = LLPanel::postBuild(); + bool rv = LLPanel::postBuild(); mTitleBox = getChild<LLTextBox>("notification_title"); mTitleBoxExp = getChild<LLTextBox>("notification_title_exp"); mNoticeTextExp = getChild<LLChatEntry>("notification_text_exp"); @@ -278,12 +278,12 @@ LLGroupInviteNotificationListItem::LLGroupInviteNotificationListItem(const Param buildFromFile("panel_notification_list_item.xml"); } -BOOL LLGroupInviteNotificationListItem::postBuild() +bool LLGroupInviteNotificationListItem::postBuild() { - BOOL rv = LLGroupNotificationListItem::postBuild(); + bool rv = LLGroupNotificationListItem::postBuild(); setFee(mParams.fee); mInviteButtonPanel = getChild<LLPanel>("button_panel"); - mInviteButtonPanel->setVisible(TRUE); + mInviteButtonPanel->setVisible(true); mJoinBtn = getChild<LLButton>("join_btn"); mDeclineBtn = getChild<LLButton>("decline_btn"); mInfoBtn = getChild<LLButton>("info_btn"); @@ -363,9 +363,9 @@ LLGroupNotificationListItem::~LLGroupNotificationListItem() LLGroupMgr::getInstance()->removeObserver(this); } -BOOL LLGroupNoticeNotificationListItem::postBuild() +bool LLGroupNoticeNotificationListItem::postBuild() { - BOOL rv = LLGroupNotificationListItem::postBuild(); + bool rv = LLGroupNotificationListItem::postBuild(); mAttachmentTextBox = getChild<LLTextBox>("attachment_text"); mAttachmentIcon = getChild<LLIconCtrl>("attachment_icon"); @@ -410,9 +410,9 @@ BOOL LLGroupNoticeNotificationListItem::postBuild() return rv; } -BOOL LLGroupNotificationListItem::postBuild() +bool LLGroupNotificationListItem::postBuild() { - BOOL rv = LLNotificationListItem::postBuild(); + bool rv = LLNotificationListItem::postBuild(); mGroupIcon = getChild<LLGroupIconCtrl>("group_icon"); mGroupIconExp = getChild<LLGroupIconCtrl>("group_icon_exp"); @@ -559,9 +559,9 @@ LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Param buildFromFile("panel_notification_list_item.xml"); } -BOOL LLTransactionNotificationListItem::postBuild() +bool LLTransactionNotificationListItem::postBuild() { - BOOL rv = LLNotificationListItem::postBuild(); + bool rv = LLNotificationListItem::postBuild(); mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); mAvatarIconExp = getChild<LLAvatarIconCtrl>("avatar_icon_exp"); mAvatarIcon->setValue("System_Notification"); @@ -606,9 +606,9 @@ LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p) } } -BOOL LLSystemNotificationListItem::postBuild() +bool LLSystemNotificationListItem::postBuild() { - BOOL rv = LLNotificationListItem::postBuild(); + bool rv = LLNotificationListItem::postBuild(); mSystemNotificationIcon = getChild<LLIconCtrl>("system_notification_icon"); mSystemNotificationIconExp = getChild<LLIconCtrl>("system_notification_icon_exp"); if (mSystemNotificationIcon) diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 8aa0a62dca..ee8d243a71 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -93,7 +93,7 @@ public: virtual bool showPopup() { return true; } void setExpanded(BOOL value); - virtual BOOL postBuild(); + virtual bool postBuild(); void reshapeNotification(); typedef enum e_time_type @@ -138,7 +138,7 @@ class LLGroupNotificationListItem { public: virtual ~LLGroupNotificationListItem(); - virtual BOOL postBuild(); + virtual bool postBuild(); void setGroupId(const LLUUID& value); // LLGroupMgrObserver observer trigger @@ -168,7 +168,7 @@ class LLGroupInviteNotificationListItem { public: static std::set<std::string> getTypes(); - virtual BOOL postBuild(); + virtual bool postBuild(); /*virtual*/ bool showPopup() { return false; } @@ -195,7 +195,7 @@ class LLGroupNoticeNotificationListItem { public: static std::set<std::string> getTypes(); - virtual BOOL postBuild(); + virtual bool postBuild(); /*virtual*/ bool showPopup() { return false; } @@ -222,7 +222,7 @@ class LLTransactionNotificationListItem : public LLNotificationListItem { public: static std::set<std::string> getTypes(); - virtual BOOL postBuild(); + virtual bool postBuild(); private: friend class LLNotificationListItem; LLTransactionNotificationListItem(const Params& p); @@ -235,7 +235,7 @@ private: class LLSystemNotificationListItem : public LLNotificationListItem { public: - virtual BOOL postBuild(); + virtual bool postBuild(); private: friend class LLNotificationListItem; LLSystemNotificationListItem(const Params& p); diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 56ec03fcd6..9b8e781441 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -107,9 +107,9 @@ const LLOutfitGallery::Params& LLOutfitGallery::getDefaultParams() return LLUICtrlFactory::getDefaultParams<LLOutfitGallery>(); } -BOOL LLOutfitGallery::postBuild() +bool LLOutfitGallery::postBuild() { - BOOL rv = LLOutfitListBase::postBuild(); + bool rv = LLOutfitListBase::postBuild(); mScrollPanel = getChild<LLScrollContainer>("gallery_scroll_panel"); LLPanel::Params params = LLPanel::getDefaultParams(); // Don't parse XML when creating dummy LLPanel mGalleryPanel = LLUICtrlFactory::create<LLPanel>(params); @@ -146,9 +146,9 @@ void LLOutfitGallery::draw() } } -BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) +bool LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_RETURN: @@ -158,7 +158,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) // Or should it wearSelectedOutfit? getSelectedItem()->openOutfitsContent(); } - handled = TRUE; + handled = true; break; case KEY_DELETE: #if LL_DARWIN @@ -170,12 +170,12 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { onRemoveOutfit(mSelectedOutfitUUID); } - handled = TRUE; + handled = true; break; case KEY_F2: LLAppearanceMgr::instance().renameOutfit(mSelectedOutfitUUID); - handled = TRUE; + handled = true; break; case KEY_PAGE_UP: @@ -183,7 +183,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->pageUp(30); } - handled = TRUE; + handled = true; break; case KEY_PAGE_DOWN: @@ -191,7 +191,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->pageDown(30); } - handled = TRUE; + handled = true; break; case KEY_HOME: @@ -199,7 +199,7 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->goToTop(); } - handled = TRUE; + handled = true; break; case KEY_END: @@ -207,27 +207,27 @@ BOOL LLOutfitGallery::handleKeyHere(KEY key, MASK mask) { mScrollPanel->goToBottom(); } - handled = TRUE; + handled = true; break; case KEY_LEFT: moveLeft(); - handled = TRUE; + handled = true; break; case KEY_RIGHT: moveRight(); - handled = TRUE; + handled = true; break; case KEY_UP: moveUp(); - handled = TRUE; + handled = true; break; case KEY_DOWN: moveDown(); - handled = TRUE; + handled = true; break; default: @@ -943,7 +943,7 @@ LLOutfitGalleryItem::~LLOutfitGalleryItem() } -BOOL LLOutfitGalleryItem::postBuild() +bool LLOutfitGalleryItem::postBuild() { setDefaultImage(); @@ -952,7 +952,7 @@ BOOL LLOutfitGalleryItem::postBuild() mTextBgPanel = getChild<LLPanel>("text_bg_panel"); setOutfitWorn(false); mHidden = false; - return TRUE; + return true; } void LLOutfitGalleryItem::draw() @@ -1036,14 +1036,14 @@ bool LLOutfitGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask) return openOutfitsContent() || LLPanel::handleDoubleClick(x, y, mask); } -BOOL LLOutfitGalleryItem::handleKeyHere(KEY key, MASK mask) +bool LLOutfitGalleryItem::handleKeyHere(KEY key, MASK mask) { if (!mGallery) { - return FALSE; + return false; } - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_LEFT: diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 4d026ad3f4..577ec5cc47 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -71,10 +71,10 @@ public: LLOutfitGallery(const LLOutfitGallery::Params& params = getDefaultParams()); virtual ~LLOutfitGallery(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& info); /*virtual*/ void draw(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); void moveUp(); void moveDown(); void moveLeft(); @@ -232,12 +232,12 @@ public: LLOutfitGalleryItem(const Params& p); virtual ~LLOutfitGalleryItem(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ bool handleDoubleClick(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 5c7792b0df..b445f0c04e 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -109,7 +109,7 @@ LLOutfitsList::~LLOutfitsList() { } -BOOL LLOutfitsList::postBuild() +bool LLOutfitsList::postBuild() { mAccordion = getChild<LLAccordionCtrl>("outfits_accordion"); mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR); @@ -982,7 +982,7 @@ void LLOutfitListBase::ChangeOutfitSelection(LLWearableItemsList* list, const LL signalSelectionOutfitUUID(category_id); } -BOOL LLOutfitListBase::postBuild() +bool LLOutfitListBase::postBuild() { mGearMenu = createGearMenu(); @@ -990,7 +990,7 @@ BOOL LLOutfitListBase::postBuild() menu_gear_btn->setMouseDownCallback(boost::bind(&LLOutfitListGearMenuBase::updateItemsVisibility, mGearMenu)); menu_gear_btn->setMenu(mGearMenu->getMenu()); - return TRUE; + return true; } void LLOutfitListBase::collapseAllFolders() diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index 66b3165169..6cd4af8e64 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -69,7 +69,7 @@ public: LLOutfitListBase(); virtual ~LLOutfitListBase(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& info); void refreshList(const LLUUID& category_id); @@ -209,7 +209,7 @@ public: LLOutfitsList(); virtual ~LLOutfitsList(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& info); diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index e3d887d943..c50b5b8c10 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -39,7 +39,7 @@ LLProfileDropTarget::LLProfileDropTarget(const LLProfileDropTarget::Params& p) mAgentID(p.agent_id) {} -BOOL LLProfileDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLProfileDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -50,10 +50,10 @@ BOOL LLProfileDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, LLToolDragAndDrop::handleGiveDragAndDrop(mAgentID, LLUUID::null, drop, cargo_type, cargo_data, accept); - return TRUE; + return true; } - return FALSE; + return false; } static LLDefaultChildRegistry::Register<LLProfileDropTarget> r("profile_drop_target"); diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index bfde921df0..c8f49ccf1f 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -61,7 +61,7 @@ public: // // LLView functionality - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llpanelavatartag.cpp b/indra/newview/llpanelavatartag.cpp index fb48bf3b47..10f9a3be34 100644 --- a/indra/newview/llpanelavatartag.cpp +++ b/indra/newview/llpanelavatartag.cpp @@ -48,12 +48,12 @@ LLPanelAvatarTag::~LLPanelAvatarTag() // Name callbacks will be automatically disconnected since LLPanel is trackable } -BOOL LLPanelAvatarTag::postBuild() +bool LLPanelAvatarTag::postBuild() { mIcon = getChild<LLAvatarIconCtrl>("avatar_tag_icon"); mName = getChild<LLTextBox>("sender_tag_name"); mTime = getChild<LLTextBox>("tag_time"); - return TRUE; + return true; } void LLPanelAvatarTag::draw() diff --git a/indra/newview/llpanelavatartag.h b/indra/newview/llpanelavatartag.h index 4edec5f452..5d775a09ff 100644 --- a/indra/newview/llpanelavatartag.h +++ b/indra/newview/llpanelavatartag.h @@ -57,7 +57,7 @@ public: const LLUUID& getAvatarId() const { return mAvatarId; } - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); virtual boost::signals2::connection setLeftButtonClickCallback( diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index 3a4fc613b7..3c710c7ba0 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -74,7 +74,7 @@ void LLPanelBlockedList::removePicker() } } -BOOL LLPanelBlockedList::postBuild() +bool LLPanelBlockedList::postBuild() { mBlockedList = getChild<LLBlockList>("blocked"); mBlockedList->setCommitOnSelectionChange(TRUE); @@ -267,7 +267,7 @@ LLFloaterGetBlockedObjectName::~LLFloaterGetBlockedObjectName() gFocusMgr.releaseFocusIfNeeded( this ); } -BOOL LLFloaterGetBlockedObjectName::postBuild() +bool LLFloaterGetBlockedObjectName::postBuild() { getChild<LLButton>("OK")-> setCommitCallback(boost::bind(&LLFloaterGetBlockedObjectName::applyBlocking, this)); getChild<LLButton>("Cancel")-> setCommitCallback(boost::bind(&LLFloaterGetBlockedObjectName::cancelBlocking, this)); @@ -276,17 +276,17 @@ BOOL LLFloaterGetBlockedObjectName::postBuild() return LLFloater::postBuild(); } -BOOL LLFloaterGetBlockedObjectName::handleKeyHere(KEY key, MASK mask) +bool LLFloaterGetBlockedObjectName::handleKeyHere(KEY key, MASK mask) { if (key == KEY_RETURN && mask == MASK_NONE) { applyBlocking(); - return TRUE; + return true; } else if (key == KEY_ESCAPE && mask == MASK_NONE) { cancelBlocking(); - return TRUE; + return true; } return LLFloater::handleKeyHere(key, mask); diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h index 07f0437656..e2c7ef819d 100644 --- a/indra/newview/llpanelblockedlist.h +++ b/indra/newview/llpanelblockedlist.h @@ -40,9 +40,9 @@ public: LLPanelBlockedList(); ~LLPanelBlockedList(){}; - virtual BOOL postBuild(); - virtual void draw(); - virtual void onOpen(const LLSD& key); + bool postBuild() override; + void draw() override; + void onOpen(const LLSD& key) override; void selectBlocked(const LLUUID& id); @@ -92,9 +92,9 @@ class LLFloaterGetBlockedObjectName : public LLFloater public: typedef boost::function<void (const std::string&)> get_object_name_callback_t; - virtual BOOL postBuild(); + bool postBuild() override; - virtual BOOL handleKeyHere(KEY key, MASK mask); + bool handleKeyHere(KEY key, MASK mask) override; static LLFloaterGetBlockedObjectName* show(get_object_name_callback_t callback); diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 183000ceac..b97e9ddcc8 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -106,7 +106,7 @@ LLPanelClassifiedInfo::~LLPanelClassifiedInfo() sAllPanels.remove(this); } -BOOL LLPanelClassifiedInfo::postBuild() +bool LLPanelClassifiedInfo::postBuild() { childSetAction("show_on_map_btn", boost::bind(&LLPanelClassifiedInfo::onMapClick, this)); childSetAction("teleport_btn", boost::bind(&LLPanelClassifiedInfo::onTeleportClick, this)); @@ -120,10 +120,10 @@ BOOL LLPanelClassifiedInfo::postBuild() mSnapshotCtrl = getChild<LLTextureCtrl>("classified_snapshot"); mSnapshotRect = getDefaultSnapshotRect(); - return TRUE; + return true; } -void LLPanelClassifiedInfo::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) +void LLPanelClassifiedInfo::reshape(S32 width, S32 height, bool called_from_parent /* = true */) { LLPanel::reshape(width, height, called_from_parent); diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index 471becd0f7..1ddd53612f 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -49,7 +49,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void processProperties(void* data, EAvatarProcessorType type); @@ -112,7 +112,7 @@ public: const LLVector3d& global_pos, const std::string& sim_name); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); /*virtual*/ void draw(); diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 3bae0cebfb..ca4ebf621d 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -76,7 +76,7 @@ const char* LLPanelContents::PERMS_GROUP_CONTROL_KEY = "perms_group_control"; const char* LLPanelContents::PERMS_ANYONE_INTERACT_KEY = "perms_anyone_interact"; const char* LLPanelContents::PERMS_ANYONE_CONTROL_KEY = "perms_anyone_control"; -BOOL LLPanelContents::postBuild() +bool LLPanelContents::postBuild() { setMouseOpaque(FALSE); @@ -85,7 +85,7 @@ BOOL LLPanelContents::postBuild() mPanelInventoryObject = getChild<LLPanelObjectInventory>("contents_inventory"); - return TRUE; + return true; } LLPanelContents::LLPanelContents() diff --git a/indra/newview/llpanelcontents.h b/indra/newview/llpanelcontents.h index 6ecc78afa0..da02353613 100644 --- a/indra/newview/llpanelcontents.h +++ b/indra/newview/llpanelcontents.h @@ -43,7 +43,7 @@ class LLSpinCtrl; class LLPanelContents : public LLPanel { public: - virtual BOOL postBuild(); + virtual bool postBuild(); LLPanelContents(); virtual ~LLPanelContents(); diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index 839f25761a..5f5dda12c7 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -139,7 +139,7 @@ LLPanelSettingsSkyAtmosTab::LLPanelSettingsSkyAtmosTab() : } -BOOL LLPanelSettingsSkyAtmosTab::postBuild() +bool LLPanelSettingsSkyAtmosTab::postBuild() { getChild<LLUICtrl>(FIELD_SKY_AMBIENT_LIGHT)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAmbientLightChanged(); }); getChild<LLUICtrl>(FIELD_SKY_BLUE_HORIZON)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onBlueHorizonChanged(); }); @@ -156,11 +156,11 @@ BOOL LLPanelSettingsSkyAtmosTab::postBuild() getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); }); refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsSkyAtmosTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkyAtmosTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -184,8 +184,8 @@ void LLPanelSettingsSkyAtmosTab::refresh() { if (!mSkySettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } @@ -357,7 +357,7 @@ LLPanelSettingsSkyCloudTab::LLPanelSettingsSkyCloudTab() : { } -BOOL LLPanelSettingsSkyCloudTab::postBuild() +bool LLPanelSettingsSkyCloudTab::postBuild() { getChild<LLUICtrl>(FIELD_SKY_CLOUD_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudColorChanged(); }); getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudCoverageChanged(); }); @@ -378,11 +378,11 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild() refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsSkyCloudTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkyCloudTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -405,8 +405,8 @@ void LLPanelSettingsSkyCloudTab::refresh() { if (!mSkySettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } @@ -510,7 +510,7 @@ LLPanelSettingsSkySunMoonTab::LLPanelSettingsSkySunMoonTab() : } -BOOL LLPanelSettingsSkySunMoonTab::postBuild() +bool LLPanelSettingsSkySunMoonTab::postBuild() { getChild<LLUICtrl>(FIELD_SKY_SUN_MOON_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunMoonColorChanged(); }); getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onGlowChanged(); }); @@ -536,11 +536,11 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild() refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkySunMoonTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -553,8 +553,8 @@ void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled) getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setEnabled(enabled); getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setEnabled(enabled); getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setEnabled(enabled); - getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(TRUE); - getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(TRUE); + getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(true); + getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(true); } } @@ -562,18 +562,18 @@ void LLPanelSettingsSkySunMoonTab::refresh() { if (!mSkySettings || !getCanChangeSettings()) { - getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(FALSE); - getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(FALSE); - getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(TRUE); - getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(TRUE); + getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(false); + getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(false); + getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(true); + getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(true); if (!mSkySettings) return; } else { - setEnabled(TRUE); - setAllChildrenEnabled(TRUE); + setEnabled(true); + setAllChildrenEnabled(true); } getChild<LLColorSwatchCtrl>(FIELD_SKY_SUN_MOON_COLOR)->set(mSkySettings->getSunlightColor() / SLIDER_SCALE_SUN_AMBIENT); @@ -780,7 +780,7 @@ LLPanelSettingsSkyDensityTab::LLPanelSettingsSkyDensityTab() { } -BOOL LLPanelSettingsSkyDensityTab::postBuild() +bool LLPanelSettingsSkyDensityTab::postBuild() { getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onRayleighExponentialChanged(); }); getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onRayleighExponentialScaleChanged(); }); @@ -803,10 +803,10 @@ BOOL LLPanelSettingsSkyDensityTab::postBuild() getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_MAX_ALTITUDE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onAbsorptionMaxAltitudeChanged(); }); refresh(); - return TRUE; + return true; } -void LLPanelSettingsSkyDensityTab::setEnabled(BOOL enabled) +void LLPanelSettingsSkyDensityTab::setEnabled(bool enabled) { LLPanelSettingsSky::setEnabled(enabled); @@ -838,8 +838,8 @@ void LLPanelSettingsSkyDensityTab::refresh() { if (!mSkySettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } diff --git a/indra/newview/llpaneleditsky.h b/indra/newview/llpaneleditsky.h index 523cc134a8..b0d8bc3ff5 100644 --- a/indra/newview/llpaneleditsky.h +++ b/indra/newview/llpaneleditsky.h @@ -60,8 +60,8 @@ class LLPanelSettingsSkyAtmosTab : public LLPanelSettingsSky public: LLPanelSettingsSkyAtmosTab(); - virtual BOOL postBuild() override; - virtual void setEnabled(BOOL enabled) override; + virtual bool postBuild() override; + virtual void setEnabled(bool enabled) override; protected: virtual void refresh() override; @@ -91,8 +91,8 @@ class LLPanelSettingsSkyCloudTab : public LLPanelSettingsSky public: LLPanelSettingsSkyCloudTab(); - virtual BOOL postBuild() override; - void setEnabled(BOOL enabled) override; + virtual bool postBuild() override; + void setEnabled(bool enabled) override; protected: virtual void refresh() override; @@ -115,8 +115,8 @@ class LLPanelSettingsSkySunMoonTab : public LLPanelSettingsSky public: LLPanelSettingsSkySunMoonTab(); - virtual BOOL postBuild() override; - virtual void setEnabled(BOOL enabled) override; + virtual bool postBuild() override; + virtual void setEnabled(bool enabled) override; protected: virtual void refresh() override; @@ -144,8 +144,8 @@ class LLPanelSettingsSkyDensityTab : public LLPanelSettingsSky public: LLPanelSettingsSkyDensityTab(); - virtual BOOL postBuild() override; - virtual void setEnabled(BOOL enabled) override; + virtual bool postBuild() override; + virtual void setEnabled(bool enabled) override; protected: virtual void refresh() override; diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp index a09964e17d..50b9908404 100644 --- a/indra/newview/llpaneleditwater.cpp +++ b/indra/newview/llpaneleditwater.cpp @@ -76,7 +76,7 @@ LLPanelSettingsWaterMainTab::LLPanelSettingsWaterMainTab(): } -BOOL LLPanelSettingsWaterMainTab::postBuild() +bool LLPanelSettingsWaterMainTab::postBuild() { mClrFogColor = getChild<LLColorSwatchCtrl>(FIELD_WATER_FOG_COLOR); mTxtNormalMap = getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP); @@ -106,11 +106,11 @@ BOOL LLPanelSettingsWaterMainTab::postBuild() refresh(); - return TRUE; + return true; } //virtual -void LLPanelSettingsWaterMainTab::setEnabled(BOOL enabled) +void LLPanelSettingsWaterMainTab::setEnabled(bool enabled) { LLPanelSettingsWater::setEnabled(enabled); getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->setEnabled(enabled); @@ -132,8 +132,8 @@ void LLPanelSettingsWaterMainTab::refresh() { if (!mWaterSettings) { - setAllChildrenEnabled(FALSE); - setEnabled(FALSE); + setAllChildrenEnabled(false); + setEnabled(false); return; } diff --git a/indra/newview/llpaneleditwater.h b/indra/newview/llpaneleditwater.h index 4b7ec903c9..c617316463 100644 --- a/indra/newview/llpaneleditwater.h +++ b/indra/newview/llpaneleditwater.h @@ -65,8 +65,8 @@ class LLPanelSettingsWaterMainTab : public LLPanelSettingsWater public: LLPanelSettingsWaterMainTab(); - virtual BOOL postBuild() override; - virtual void setEnabled(BOOL enabled) override; + virtual bool postBuild() override; + virtual void setEnabled(bool enabled) override; protected: virtual void refresh() override; diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index cb69f72288..5ce2b9db8f 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -707,7 +707,7 @@ void LLPanelEditWearable::setWearablePanelVisibilityChangeCallback(LLPanel* body } // virtual -BOOL LLPanelEditWearable::postBuild() +bool LLPanelEditWearable::postBuild() { // buttons mBtnRevert = getChild<LLButton>("revert_button"); @@ -824,20 +824,20 @@ BOOL LLPanelEditWearable::postBuild() gSavedSettings.getControl("HeightUnits")->getSignal()->connect(boost::bind(&LLPanelEditWearable::changeHeightUnits, this, _2)); updateMetricLayout(gSavedSettings.getBOOL("HeightUnits")); - return TRUE; + return true; } // virtual // LLUICtrl -BOOL LLPanelEditWearable::isDirty() const +bool LLPanelEditWearable::isDirty() const { - BOOL isDirty = FALSE; + bool isDirty = false; if (mWearablePtr) { if (mWearablePtr->isDirty() || ( mWearableItem && mNameEditor && mWearableItem->getName().compare(mNameEditor->getText()) != 0 )) { - isDirty = TRUE; + isDirty = true; } } return isDirty; @@ -861,7 +861,7 @@ void LLPanelEditWearable::onClose() revertChanges(); } -void LLPanelEditWearable::setVisible(BOOL visible) +void LLPanelEditWearable::setVisible(bool visible) { if (!visible) { @@ -1539,7 +1539,7 @@ void LLPanelEditWearable::updateVerbs() can_copy = mWearableItem->getPermissions().allowCopyBy(gAgentID); } - BOOL is_dirty = isDirty(); + bool is_dirty = isDirty(); mBtnRevert->setEnabled(is_dirty); getChildView("save_as_button")->setEnabled(is_dirty && can_copy); @@ -1552,7 +1552,7 @@ void LLPanelEditWearable::updateVerbs() } // update back button and title according to dirty state. - static BOOL was_dirty = FALSE; + static bool was_dirty = false; if (was_dirty != is_dirty) // to avoid redundant changes because this method is called from draw { static S32 label_width = mBtnBack->getFont()->getWidth(mBackBtnLabel); diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 43d6a3595f..f40af6d5cb 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -51,8 +51,8 @@ public: LLPanelEditWearable( ); virtual ~LLPanelEditWearable(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ BOOL isDirty() const; // LLUICtrl + /*virtual*/ bool postBuild(); + /*virtual*/ bool isDirty() const; // LLUICtrl /*virtual*/ void draw(); void onClose(); @@ -76,7 +76,7 @@ public: void onSaveAsButtonClicked(); void saveAsCallback(const LLSD& notification, const LLSD& response); - virtual void setVisible(BOOL visible); + virtual void setVisible(bool visible); private: typedef std::map<F32, LLViewerVisualParam*> value_map_t; diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 2ad7a23278..bc2c930459 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -165,7 +165,7 @@ LLPanelEnvironmentInfo::~LLPanelEnvironmentInfo() mUpdateConnection.disconnect(); } -BOOL LLPanelEnvironmentInfo::postBuild() +bool LLPanelEnvironmentInfo::postBuild() { getChild<LLUICtrl>(BTN_USEDEFAULT)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onBtnDefault(); }); @@ -198,7 +198,7 @@ BOOL LLPanelEnvironmentInfo::postBuild() getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[3])->setPanel(this, alt_prefixes[3]); getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[4])->setPanel(this, alt_prefixes[4]); - return TRUE; + return true; } // virtual @@ -208,7 +208,7 @@ void LLPanelEnvironmentInfo::onOpen(const LLSD& key) } // virtual -void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility) +void LLPanelEnvironmentInfo::onVisibilityChange(bool new_visibility) { if (new_visibility) { @@ -1133,17 +1133,17 @@ LLSettingsDropTarget::LLSettingsDropTarget(const LLSettingsDropTarget::Params& p : LLView(p), mEnvironmentInfoPanel(NULL), mDndEnabled(false) {} -BOOL LLSettingsDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLSettingsDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { - BOOL handled = FALSE; + bool handled = false; if (getParent() && mDndEnabled) { - handled = TRUE; + handled = true; switch (cargo_type) { diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h index 38e3f09e34..ff39714cea 100644 --- a/indra/newview/llpanelenvironment.h +++ b/indra/newview/llpanelenvironment.h @@ -47,11 +47,11 @@ public: LLPanelEnvironmentInfo(); virtual ~LLPanelEnvironmentInfo(); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onOpen(const LLSD& key) override; - virtual BOOL isDirty() const override { return getIsDirty(); } - virtual void onVisibilityChange(BOOL new_visibility) override; + virtual bool isDirty() const override { return getIsDirty(); } + virtual void onVisibilityChange(bool new_visibility) override; virtual void refresh() override; @@ -206,7 +206,7 @@ public: LLSettingsDropTarget(const Params&); ~LLSettingsDropTarget() {}; - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp index 0fdb9a57f3..b6ff033d05 100644 --- a/indra/newview/llpanelexperiencelisteditor.cpp +++ b/indra/newview/llpanelexperiencelisteditor.cpp @@ -55,7 +55,7 @@ LLPanelExperienceListEditor::LLPanelExperienceListEditor() { } -BOOL LLPanelExperienceListEditor::postBuild() +bool LLPanelExperienceListEditor::postBuild() { mItems = getChild<LLNameListCtrl>("experience_list"); mAdd = getChild<LLButton>("btn_add"); @@ -69,7 +69,7 @@ BOOL LLPanelExperienceListEditor::postBuild() mItems->setCommitCallback(boost::bind(&LLPanelExperienceListEditor::checkButtonsEnabled, this)); checkButtonsEnabled(); - return TRUE; + return true; } const uuid_list_t& LLPanelExperienceListEditor::getExperienceIds() const diff --git a/indra/newview/llpanelexperiencelisteditor.h b/indra/newview/llpanelexperiencelisteditor.h index bc9867752d..1579e14c29 100644 --- a/indra/newview/llpanelexperiencelisteditor.h +++ b/indra/newview/llpanelexperiencelisteditor.h @@ -47,7 +47,7 @@ public: typedef LLHandle<LLFloaterExperiencePicker> PickerHandle; LLPanelExperienceListEditor(); ~LLPanelExperienceListEditor(); - BOOL postBuild(); + bool postBuild(); void loading(); diff --git a/indra/newview/llpanelexperiencelog.cpp b/indra/newview/llpanelexperiencelog.cpp index e5c637938f..5690384b8a 100644 --- a/indra/newview/llpanelexperiencelog.cpp +++ b/indra/newview/llpanelexperiencelog.cpp @@ -54,7 +54,7 @@ LLPanelExperienceLog::LLPanelExperienceLog( ) buildFromFile("panel_experience_log.xml"); } -BOOL LLPanelExperienceLog::postBuild( void ) +bool LLPanelExperienceLog::postBuild() { LLExperienceLog* log = LLExperienceLog::getInstance(); mEventList = getChild<LLScrollListCtrl>("experience_log_list"); @@ -82,7 +82,7 @@ BOOL LLPanelExperienceLog::postBuild( void ) mPageSize = log->getPageSize(); refresh(); mNewEvent = LLExperienceLog::instance().addUpdateSignal(boost::bind(&LLPanelExperienceLog::refresh, this)); - return TRUE; + return true; } LLPanelExperienceLog* LLPanelExperienceLog::create() diff --git a/indra/newview/llpanelexperiencelog.h b/indra/newview/llpanelexperiencelog.h index 4135d9cac9..1436bbad41 100644 --- a/indra/newview/llpanelexperiencelog.h +++ b/indra/newview/llpanelexperiencelog.h @@ -40,7 +40,7 @@ public: static LLPanelExperienceLog* create(); - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(); void refresh(); protected: diff --git a/indra/newview/llpanelexperiencepicker.cpp b/indra/newview/llpanelexperiencepicker.cpp index 6dfdbaf63f..dd17606fc5 100644 --- a/indra/newview/llpanelexperiencepicker.cpp +++ b/indra/newview/llpanelexperiencepicker.cpp @@ -70,7 +70,7 @@ LLPanelExperiencePicker::~LLPanelExperiencePicker() { } -BOOL LLPanelExperiencePicker::postBuild() +bool LLPanelExperiencePicker::postBuild() { getChild<LLLineEditor>(TEXT_EDIT)->setKeystrokeCallback( boost::bind(&LLPanelExperiencePicker::editKeystroke, this, _1, _2),NULL); @@ -102,7 +102,7 @@ BOOL LLPanelExperiencePicker::postBuild() // Start searching when Return is pressed in the line editor. search_panel->setDefaultBtn(BTN_FIND); } - return TRUE; + return true; } void LLPanelExperiencePicker::editKeystroke( class LLLineEditor* caller, void* user_data ) diff --git a/indra/newview/llpanelexperiencepicker.h b/indra/newview/llpanelexperiencepicker.h index 97aa04cf4c..c1b8c27b2c 100644 --- a/indra/newview/llpanelexperiencepicker.h +++ b/indra/newview/llpanelexperiencepicker.h @@ -47,7 +47,7 @@ public: LLPanelExperiencePicker(); virtual ~LLPanelExperiencePicker(); - BOOL postBuild(); + bool postBuild(); void addFilter(filter_function func){mFilters.push_back(func);} template <class IT> diff --git a/indra/newview/llpanelexperiences.cpp b/indra/newview/llpanelexperiences.cpp index 91d3b523fb..8ae407f5c7 100644 --- a/indra/newview/llpanelexperiences.cpp +++ b/indra/newview/llpanelexperiences.cpp @@ -51,7 +51,7 @@ LLPanelExperiences::LLPanelExperiences( ) buildFromFile("panel_experiences.xml"); } -BOOL LLPanelExperiences::postBuild( void ) +bool LLPanelExperiences::postBuild( void ) { mExperiencesList = getChild<LLFlatListView>("experiences_list"); if (hasString("loading_experiences")) @@ -64,7 +64,7 @@ BOOL LLPanelExperiences::postBuild( void ) } mExperiencesList->setComparator(&NAME_COMPARATOR); - return TRUE; + return true; } @@ -212,10 +212,10 @@ LLPanelSearchExperiences* LLPanelSearchExperiences::create( const std::string& n return panel; } -BOOL LLPanelSearchExperiences::postBuild( void ) +bool LLPanelSearchExperiences::postBuild( void ) { childSetAction("search_button", boost::bind(&LLPanelSearchExperiences::doSearch, this)); - return TRUE; + return true; } bool LLExperienceItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const diff --git a/indra/newview/llpanelexperiences.h b/indra/newview/llpanelexperiences.h index 11111f2a2e..70b93fd25b 100644 --- a/indra/newview/llpanelexperiences.h +++ b/indra/newview/llpanelexperiences.h @@ -40,7 +40,7 @@ class LLPanelSearchExperiences public: LLPanelSearchExperiences(){} static LLPanelSearchExperiences* create(const std::string& name); - /*virtual*/ BOOL postBuild(void); + /*virtual*/ bool postBuild(void); void doSearch(); }; @@ -53,8 +53,7 @@ public: static LLPanelExperiences* create(const std::string& name); - /*virtual*/ BOOL postBuild(void); - /*virtual*/ void onClosePanel(); + /*virtual*/ bool postBuild(void); void setExperienceList(const LLSD& experiences); void getExperienceIdsList(std::vector<LLUUID>& result); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 5f8071d3eb..ea1ac602a8 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -252,7 +252,7 @@ F32 LLPanelFace::getCurrentShinyOffsetV() { return getChild<LLUICtrl>("shinyOf // Methods // -BOOL LLPanelFace::postBuild() +bool LLPanelFace::postBuild() { childSetCommitCallback("combobox shininess",&LLPanelFace::onCommitShiny,this); childSetCommitCallback("combobox bumpiness",&LLPanelFace::onCommitBump,this); @@ -311,7 +311,7 @@ BOOL LLPanelFace::postBuild() LLSpinCtrl* mCtrlGlow; - setMouseOpaque(FALSE); + setMouseOpaque(false); LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control"); if (pbr_ctrl) @@ -471,7 +471,7 @@ BOOL LLPanelFace::postBuild() clearCtrls(); - return TRUE; + return true; } LLPanelFace::LLPanelFace() @@ -492,7 +492,7 @@ LLPanelFace::~LLPanelFace() unloadMedia(); } -void LLPanelFace::onVisibilityChange(BOOL new_visibility) +void LLPanelFace::onVisibilityChange(bool new_visibility) { if (new_visibility) { diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 5ca6a95699..681f758856 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -100,7 +100,7 @@ public: class LLPanelFace : public LLPanel { public: - virtual BOOL postBuild(); + virtual bool postBuild(); LLPanelFace(); virtual ~LLPanelFace(); @@ -110,7 +110,7 @@ public: static void onMaterialOverrideReceived(const LLUUID& object_id, S32 side); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + /*virtual*/ void onVisibilityChange(bool new_visibility); /*virtual*/ void draw(); LLMaterialPtr createDefaultMaterial(LLMaterialPtr current_material) diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index ab255d5215..4c0384d168 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -78,9 +78,9 @@ BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp) return TRUE; } -BOOL LLPanelGroupTab::postBuild() +bool LLPanelGroupTab::postBuild() { - return TRUE; + return true; } LLPanelGroup::LLPanelGroup() @@ -137,7 +137,7 @@ void LLPanelGroup::onOpen(const LLSD& key) } -BOOL LLPanelGroup::postBuild() +bool LLPanelGroup::postBuild() { mDefaultNeedsApplyMesg = getString("default_needs_apply_text"); mWantApplyMesg = getString("want_apply_text"); @@ -187,7 +187,7 @@ BOOL LLPanelGroup::postBuild() LLVoiceClient::getInstance()->addObserver(this); - return TRUE; + return true; } void LLPanelGroup::reposButton(const std::string& name) @@ -221,7 +221,7 @@ void LLPanelGroup::reposButtons() reposButton("btn_call"); } -void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent ) +void LLPanelGroup::reshape(S32 width, S32 height, bool called_from_parent ) { LLPanel::reshape(width, height, called_from_parent ); diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index be40b08a6d..28ba790a74 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -49,7 +49,7 @@ public: LLPanelGroup(); virtual ~LLPanelGroup(); - virtual BOOL postBuild(); + virtual bool postBuild(); void setGroupID(const LLUUID& group_id); @@ -77,7 +77,7 @@ public: void callGroup(); void chatGroup(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); static void showNotice(const std::string& subject, const std::string& message, @@ -148,7 +148,7 @@ public: virtual void update(LLGroupChange gc) { } // This just connects the help button callback. - virtual BOOL postBuild(); + virtual bool postBuild(); virtual BOOL isVisibleByAgent(LLAgent* agentp); diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp index cf1f0bc32f..c047ffb270 100644 --- a/indra/newview/llpanelgroupbulkban.cpp +++ b/indra/newview/llpanelgroupbulkban.cpp @@ -57,9 +57,9 @@ LLPanelGroupBulkBan::LLPanelGroupBulkBan(const LLUUID& group_id) : LLPanelGroupB buildFromFile( "panel_group_bulk_ban.xml"); } -BOOL LLPanelGroupBulkBan::postBuild() +bool LLPanelGroupBulkBan::postBuild() { - BOOL recurse = TRUE; + constexpr bool recurse = true; mImplementation->mLoadingText = getString("loading"); mImplementation->mGroupName = getChild<LLTextBox>("group_name_text", recurse); @@ -83,7 +83,7 @@ BOOL LLPanelGroupBulkBan::postBuild() if ( mImplementation->mRemoveButton ) { mImplementation->mRemoveButton->setClickedCallback(LLPanelGroupBulkImpl::callbackClickRemove, mImplementation); - mImplementation->mRemoveButton->setEnabled(FALSE); + mImplementation->mRemoveButton->setEnabled(false); } mImplementation->mOKButton = @@ -91,7 +91,7 @@ BOOL LLPanelGroupBulkBan::postBuild() if ( mImplementation->mOKButton ) { mImplementation->mOKButton->setClickedCallback(LLPanelGroupBulkBan::callbackClickSubmit, this); - mImplementation->mOKButton->setEnabled(FALSE); + mImplementation->mOKButton->setEnabled(false); } button = getChild<LLButton>("cancel_button", recurse); @@ -106,7 +106,7 @@ BOOL LLPanelGroupBulkBan::postBuild() mImplementation->mCannotBanYourself = getString("cant_ban_yourself"); update(); - return TRUE; + return true; } // TODO: Refactor the shitty callback functions with void* -- just use boost::bind to call submit() instead. diff --git a/indra/newview/llpanelgroupbulkban.h b/indra/newview/llpanelgroupbulkban.h index 9060d275f9..2ceb9df679 100644 --- a/indra/newview/llpanelgroupbulkban.h +++ b/indra/newview/llpanelgroupbulkban.h @@ -38,7 +38,7 @@ public: LLPanelGroupBulkBan(const LLUUID& group_id); ~LLPanelGroupBulkBan() {} - virtual BOOL postBuild(); + virtual bool postBuild(); static void callbackClickSubmit(void* userdata); virtual void submit(); diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp index 01a4ab0455..dcdc5821ef 100644 --- a/indra/newview/llpanelgroupcreate.cpp +++ b/indra/newview/llpanelgroupcreate.cpp @@ -66,28 +66,28 @@ LLPanelGroupCreate::~LLPanelGroupCreate() { } -BOOL LLPanelGroupCreate::postBuild() +bool LLPanelGroupCreate::postBuild() { childSetCommitCallback("back", boost::bind(&LLPanelGroupCreate::onBackBtnClick, this), NULL); - mComboMature = getChild<LLComboBox>("group_mature_check", TRUE); - mCtrlOpenEnrollment = getChild<LLCheckBoxCtrl>("open_enrollement", TRUE); - mCtrlEnrollmentFee = getChild<LLCheckBoxCtrl>("check_enrollment_fee", TRUE); - mEditCharter = getChild<LLTextEditor>("charter", TRUE); - mSpinEnrollmentFee = getChild<LLSpinCtrl>("spin_enrollment_fee", TRUE); - mMembershipList = getChild<LLScrollListCtrl>("membership_list", TRUE); + mComboMature = getChild<LLComboBox>("group_mature_check", true); + mCtrlOpenEnrollment = getChild<LLCheckBoxCtrl>("open_enrollement", true); + mCtrlEnrollmentFee = getChild<LLCheckBoxCtrl>("check_enrollment_fee", true); + mEditCharter = getChild<LLTextEditor>("charter", true); + mSpinEnrollmentFee = getChild<LLSpinCtrl>("spin_enrollment_fee", true); + mMembershipList = getChild<LLScrollListCtrl>("membership_list", true); - mCreateButton = getChild<LLButton>("btn_create", TRUE); + mCreateButton = getChild<LLButton>("btn_create", true); mCreateButton->setCommitCallback(boost::bind(&LLPanelGroupCreate::onBtnCreate, this)); - mGroupNameEditor = getChild<LLLineEditor>("group_name_editor", TRUE); + mGroupNameEditor = getChild<LLLineEditor>("group_name_editor", true); mGroupNameEditor->setPrevalidate(LLTextValidate::validateASCIINoLeadingSpace); - mInsignia = getChild<LLTextureCtrl>("insignia", TRUE); + mInsignia = getChild<LLTextureCtrl>("insignia", true); mInsignia->setAllowLocalTexture(FALSE); mInsignia->setCanApplyImmediately(FALSE); - return TRUE; + return true; } void LLPanelGroupCreate::onOpen(const LLSD& key) @@ -97,8 +97,8 @@ void LLPanelGroupCreate::onOpen(const LLSD& key) mGroupNameEditor->clear(); mEditCharter->clear(); mSpinEnrollmentFee->set(0.f); - mCtrlEnrollmentFee->set(FALSE); - mCtrlOpenEnrollment->set(FALSE); + mCtrlEnrollmentFee->set(false); + mCtrlOpenEnrollment->set(false); mMembershipList->clearRows(); // populate list diff --git a/indra/newview/llpanelgroupcreate.h b/indra/newview/llpanelgroupcreate.h index 3ae2e7f24a..fd0b6e243d 100644 --- a/indra/newview/llpanelgroupcreate.h +++ b/indra/newview/llpanelgroupcreate.h @@ -46,9 +46,9 @@ public: LLPanelGroupCreate(); virtual ~LLPanelGroupCreate(); - virtual BOOL postBuild(); + bool postBuild() override; - void onOpen(const LLSD& key); + void onOpen(const LLSD& key) override; static void refreshCreatedGroup(const LLUUID& group_id); diff --git a/indra/newview/llpanelgroupexperiences.cpp b/indra/newview/llpanelgroupexperiences.cpp index 6c40499208..d5fa4d1a73 100644 --- a/indra/newview/llpanelgroupexperiences.cpp +++ b/indra/newview/llpanelgroupexperiences.cpp @@ -50,7 +50,7 @@ LLPanelGroupExperiences::~LLPanelGroupExperiences() { } -BOOL LLPanelGroupExperiences::postBuild() +bool LLPanelGroupExperiences::postBuild() { mExperiencesList = getChild<LLFlatListView>("experiences_list"); if (hasString("loading_experiences")) diff --git a/indra/newview/llpanelgroupexperiences.h b/indra/newview/llpanelgroupexperiences.h index 7c79f77332..58d5397bb5 100644 --- a/indra/newview/llpanelgroupexperiences.h +++ b/indra/newview/llpanelgroupexperiences.h @@ -40,7 +40,7 @@ public: // LLPanelGroupTab virtual void activate(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void setGroupID(const LLUUID& id); diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 04d3236bf1..d16dde667a 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -87,9 +87,9 @@ LLPanelGroupGeneral::~LLPanelGroupGeneral() { } -BOOL LLPanelGroupGeneral::postBuild() +bool LLPanelGroupGeneral::postBuild() { - bool recurse = true; + constexpr bool recurse = true; mEditCharter = getChild<LLTextEditor>("charter", recurse); if(mEditCharter) @@ -139,8 +139,8 @@ BOOL LLPanelGroupGeneral::postBuild() mSpinEnrollmentFee->resetDirty(); } - BOOL accept_notices = FALSE; - BOOL list_in_profile = FALSE; + bool accept_notices = false; + bool list_in_profile = false; LLGroupData data; if(gAgent.getGroupData(mGroupID,data)) { @@ -177,13 +177,13 @@ BOOL LLPanelGroupGeneral::postBuild() // If the group_id is null, then we are creating a new group if (mGroupID.isNull()) { - mEditCharter->setEnabled(TRUE); + mEditCharter->setEnabled(true); - mCtrlShowInGroupList->setEnabled(TRUE); - mComboMature->setEnabled(TRUE); - mCtrlOpenEnrollment->setEnabled(TRUE); - mCtrlEnrollmentFee->setEnabled(TRUE); - mSpinEnrollmentFee->setEnabled(TRUE); + mCtrlShowInGroupList->setEnabled(true); + mComboMature->setEnabled(true); + mCtrlOpenEnrollment->setEnabled(true); + mCtrlEnrollmentFee->setEnabled(true); + mSpinEnrollmentFee->setEnabled(true); } diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 1d0789521c..79a9895029 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -54,7 +54,7 @@ public: virtual void update(LLGroupChange gc); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void draw(); diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index d6b66ee622..cdc619e362 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -642,9 +642,9 @@ void LLPanelGroupInvite::updateLists() } } -BOOL LLPanelGroupInvite::postBuild() +bool LLPanelGroupInvite::postBuild() { - BOOL recurse = TRUE; + constexpr bool recurse = true; mImplementation->mLoadingText = getString("loading"); mImplementation->mRoleNames = getChild<LLComboBox>("role_name", @@ -654,7 +654,7 @@ BOOL LLPanelGroupInvite::postBuild() getChild<LLNameListCtrl>("invitee_list", recurse); if ( mImplementation->mInvitees ) { - mImplementation->mInvitees->setCommitOnSelectionChange(TRUE); + mImplementation->mInvitees->setCommitOnSelectionChange(true); mImplementation->mInvitees->setCommitCallback(impl::callbackSelect, mImplementation); } @@ -671,7 +671,7 @@ BOOL LLPanelGroupInvite::postBuild() if ( mImplementation->mRemoveButton ) { mImplementation->mRemoveButton->setClickedCallback(impl::callbackClickRemove, mImplementation); - mImplementation->mRemoveButton->setEnabled(FALSE); + mImplementation->mRemoveButton->setEnabled(false); } mImplementation->mOKButton = @@ -679,7 +679,7 @@ BOOL LLPanelGroupInvite::postBuild() if ( mImplementation->mOKButton ) { mImplementation->mOKButton->setClickedCallback(impl::callbackClickOK, mImplementation); - mImplementation->mOKButton->setEnabled(FALSE); + mImplementation->mOKButton->setEnabled(false); } button = getChild<LLButton>("cancel_button", recurse); diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h index 9f7b5ae9be..c1d2e3defe 100644 --- a/indra/newview/llpanelgroupinvite.h +++ b/indra/newview/llpanelgroupinvite.h @@ -48,8 +48,8 @@ public: void setCloseCallback(void (*close_callback)(void*), void* data); - virtual void draw(); - virtual BOOL postBuild(); + void draw() override; + bool postBuild() override; protected: class impl; impl* mImplementation; diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index f276d6d785..fd25148e25 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -674,7 +674,7 @@ void LLPanelGroupLandMoney::cancel() } -BOOL LLPanelGroupLandMoney::postBuild() +bool LLPanelGroupLandMoney::postBuild() { /* This power was removed to make group roles simpler bool has_parcel_view = gAgent.hasPowerInGroup(mGroupID, @@ -722,12 +722,12 @@ BOOL LLPanelGroupLandMoney::postBuild() if ( mImplementationp->mGroupOverLimitTextp ) { - mImplementationp->mGroupOverLimitTextp->setVisible(FALSE); + mImplementationp->mGroupOverLimitTextp->setVisible(false); } if ( mImplementationp->mGroupOverLimitIconp ) { - mImplementationp->mGroupOverLimitIconp->setVisible(FALSE); + mImplementationp->mGroupOverLimitIconp->setVisible(false); } if ( !can_view ) diff --git a/indra/newview/llpanelgrouplandmoney.h b/indra/newview/llpanelgrouplandmoney.h index 3cec6065e7..0df34d26ba 100644 --- a/indra/newview/llpanelgrouplandmoney.h +++ b/indra/newview/llpanelgrouplandmoney.h @@ -36,7 +36,7 @@ class LLPanelGroupLandMoney : public LLPanelGroupTab public: LLPanelGroupLandMoney(); virtual ~LLPanelGroupLandMoney(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual BOOL isVisibleByAgent(LLAgent* agentp); virtual void activate(); diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index b007291179..05d4ff409f 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -91,7 +91,7 @@ public: // // LLView functionality - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -112,18 +112,18 @@ LLGroupDropTarget::LLGroupDropTarget(const LLGroupDropTarget::Params& p) mGroupID(p.group_id) {} -BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { - BOOL handled = FALSE; + bool handled = false; if (!gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND)) { *accept = ACCEPT_NO; - return TRUE; + return true; } if(getParent()) @@ -131,7 +131,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // check if inside //LLRect parent_rect = mParentView->getRect(); //getRect().set(0, parent_rect.getHeight(), parent_rect.getWidth(), 0); - handled = TRUE; + handled = true; // check the type switch(cargo_type) @@ -236,9 +236,9 @@ BOOL LLPanelGroupNotices::isVisibleByAgent(LLAgent* agentp) agentp->hasPowerInGroup(mGroupID, GP_NOTICES_SEND | GP_NOTICES_RECEIVE); } -BOOL LLPanelGroupNotices::postBuild() +bool LLPanelGroupNotices::postBuild() { - bool recurse = true; + constexpr bool recurse = true; mNoticesList = getChild<LLScrollListCtrl>("notice_list",recurse); mNoticesList->setCommitOnSelectionChange(TRUE); @@ -256,29 +256,29 @@ BOOL LLPanelGroupNotices::postBuild() mCreateMessage = getChild<LLTextEditor>("create_message",recurse); mCreateInventoryName = getChild<LLLineEditor>("create_inventory_name",recurse); - mCreateInventoryName->setTabStop(FALSE); - mCreateInventoryName->setEnabled(FALSE); + mCreateInventoryName->setTabStop(false); + mCreateInventoryName->setEnabled(false); mCreateInventoryIcon = getChild<LLIconCtrl>("create_inv_icon",recurse); - mCreateInventoryIcon->setVisible(FALSE); + mCreateInventoryIcon->setVisible(false); mBtnSendMessage = getChild<LLButton>("send_notice",recurse); mBtnSendMessage->setClickedCallback(onClickSendMessage, this); mBtnRemoveAttachment = getChild<LLButton>("remove_attachment",recurse); mBtnRemoveAttachment->setClickedCallback(onClickRemoveAttachment, this); - mBtnRemoveAttachment->setEnabled(FALSE); + mBtnRemoveAttachment->setEnabled(false); // View mViewSubject = getChild<LLLineEditor>("view_subject",recurse); mViewMessage = getChild<LLTextEditor>("view_message",recurse); mViewInventoryName = getChild<LLLineEditor>("view_inventory_name",recurse); - mViewInventoryName->setTabStop(FALSE); - mViewInventoryName->setEnabled(FALSE); + mViewInventoryName->setTabStop(false); + mViewInventoryName->setEnabled(false); mViewInventoryIcon = getChild<LLIconCtrl>("view_inv_icon",recurse); - mViewInventoryIcon->setVisible(FALSE); + mViewInventoryIcon->setVisible(false); mBtnOpenAttachment = getChild<LLButton>("open_attachment",recurse); mBtnOpenAttachment->setClickedCallback(onClickOpenAttachment, this); diff --git a/indra/newview/llpanelgroupnotices.h b/indra/newview/llpanelgroupnotices.h index 55319cb9ae..02bd063017 100644 --- a/indra/newview/llpanelgroupnotices.h +++ b/indra/newview/llpanelgroupnotices.h @@ -50,7 +50,7 @@ public: //virtual bool apply(std::string& mesg); //virtual void update(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual BOOL isVisibleByAgent(LLAgent* agentp); void setItem(LLPointer<LLInventoryItem> inv_item); diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index e3d75d5604..c427b57545 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -127,13 +127,13 @@ LLPanelGroupRoles::~LLPanelGroupRoles() { } -BOOL LLPanelGroupRoles::postBuild() +bool LLPanelGroupRoles::postBuild() { LL_DEBUGS() << "LLPanelGroupRoles::postBuild()" << LL_ENDL; mSubTabContainer = getChild<LLTabContainer>("roles_tab_container"); - if (!mSubTabContainer) return FALSE; + if (!mSubTabContainer) return false; // Hook up each sub-tabs callback and widgets. for (S32 i = 0; i < mSubTabContainer->getTabCount(); ++i) @@ -143,13 +143,13 @@ BOOL LLPanelGroupRoles::postBuild() if (!subtabp) { LL_WARNS() << "Invalid subtab panel: " << panel->getName() << LL_ENDL; - return FALSE; + return false; } // Hand the subtab a pointer to this LLPanelGroupRoles, so that it can // look around for the widgets it is interested in. if (!subtabp->postBuildSubTab(this)) - return FALSE; + return false; //subtabp->addObserver(this); } @@ -165,7 +165,7 @@ BOOL LLPanelGroupRoles::postBuild() mCurrentTab = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); } - if (!mCurrentTab) return FALSE; + if (!mCurrentTab) return false; // Act as though this tab was just activated. mCurrentTab->activate(); @@ -461,10 +461,10 @@ BOOL LLPanelGroupSubTab::postBuildSubTab(LLView* root) return TRUE; } -BOOL LLPanelGroupSubTab::postBuild() +bool LLPanelGroupSubTab::postBuild() { // Hook up the search widgets. - bool recurse = true; + constexpr bool recurse = true; mSearchEditor = findChild<LLFilterEditor>("filter_input", recurse); if (mSearchEditor) // SubTab doesn't implement this, only some of derived classes diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 459b77703f..8426d8fc06 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -53,7 +53,7 @@ public: friend class LLPanelGroupRolesSubTab; friend class LLPanelGroupActionsSubTab; - virtual BOOL postBuild(); + virtual bool postBuild(); virtual BOOL isVisibleByAgent(LLAgent* agentp); @@ -97,7 +97,7 @@ public: LLPanelGroupSubTab(); virtual ~LLPanelGroupSubTab(); - virtual BOOL postBuild(); + virtual bool postBuild(); // This allows sub-tabs to collect child widgets from a higher level in the view hierarchy. virtual BOOL postBuildSubTab(LLView* root); diff --git a/indra/newview/llpanelhome.cpp b/indra/newview/llpanelhome.cpp index ab0ccffae4..b8b1d45d95 100644 --- a/indra/newview/llpanelhome.cpp +++ b/indra/newview/llpanelhome.cpp @@ -52,7 +52,7 @@ void LLPanelHome::onOpen(const LLSD& key) mFirstView = false; } -BOOL LLPanelHome::postBuild() +bool LLPanelHome::postBuild() { mBrowser = getChild<LLMediaCtrl>("browser"); if (mBrowser) @@ -64,7 +64,7 @@ BOOL LLPanelHome::postBuild() mBrowser->setHomePageUrl(url); } - return TRUE; + return true; } void LLPanelHome::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event) diff --git a/indra/newview/llpanelhome.h b/indra/newview/llpanelhome.h index 748566326f..809e8edf8c 100644 --- a/indra/newview/llpanelhome.h +++ b/indra/newview/llpanelhome.h @@ -44,7 +44,7 @@ class LLPanelHome : public: LLPanelHome(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp index acdb16f432..65ef1023ea 100644 --- a/indra/newview/llpanelland.cpp +++ b/indra/newview/llpanelland.cpp @@ -56,7 +56,7 @@ public: }; -BOOL LLPanelLandInfo::postBuild() +bool LLPanelLandInfo::postBuild() { childSetAction("button buy land",boost::bind(onClickClaim)); childSetAction("button abandon land", boost::bind(onClickRelease)); @@ -67,7 +67,7 @@ BOOL LLPanelLandInfo::postBuild() mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners"); getChild<LLUICtrl>("checkbox show owners")->setValue(gSavedSettings.getBOOL("ShowParcelOwners")); - return TRUE; + return true; } // // Methods diff --git a/indra/newview/llpanelland.h b/indra/newview/llpanelland.h index 2ab1618d47..aa2a14d440 100644 --- a/indra/newview/llpanelland.h +++ b/indra/newview/llpanelland.h @@ -56,7 +56,7 @@ protected: static void onClickAbout(); protected: - virtual BOOL postBuild(); + bool postBuild() override; static LLPanelLandSelectObserver* sObserver; static LLPanelLandInfo* sInstance; diff --git a/indra/newview/llpanellandaudio.cpp b/indra/newview/llpanellandaudio.cpp index 9e3fc54477..fd83586a86 100644 --- a/indra/newview/llpanellandaudio.cpp +++ b/indra/newview/llpanellandaudio.cpp @@ -74,7 +74,7 @@ LLPanelLandAudio::~LLPanelLandAudio() } -BOOL LLPanelLandAudio::postBuild() +bool LLPanelLandAudio::postBuild() { mCheckSoundLocal = getChild<LLCheckBoxCtrl>("check sound local"); childSetCommitCallback("check sound local", onCommitAny, this); @@ -100,7 +100,7 @@ BOOL LLPanelLandAudio::postBuild() mCheckObscureMOAP = getChild<LLCheckBoxCtrl>("obscure_moap"); childSetCommitCallback("obscure_moap", onCommitAny, this); - return TRUE; + return true; } diff --git a/indra/newview/llpanellandaudio.h b/indra/newview/llpanellandaudio.h index b54fe62179..f805338086 100644 --- a/indra/newview/llpanellandaudio.h +++ b/indra/newview/llpanellandaudio.h @@ -39,7 +39,7 @@ class LLPanelLandAudio public: LLPanelLandAudio(LLSafeHandle<LLParcelSelection>& parcelp); /*virtual*/ ~LLPanelLandAudio(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void refresh(); private: diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index cea078bc23..3c166f2c28 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -69,7 +69,7 @@ LLPanelLandmarkInfo::~LLPanelLandmarkInfo() {} // virtual -BOOL LLPanelLandmarkInfo::postBuild() +bool LLPanelLandmarkInfo::postBuild() { LLPanelPlaceInfo::postBuild(); @@ -86,7 +86,7 @@ BOOL LLPanelLandmarkInfo::postBuild() icon_m = getString("icon_M"); icon_r = getString("icon_R"); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h index 8802ce066e..f607126328 100644 --- a/indra/newview/llpanellandmarkinfo.h +++ b/indra/newview/llpanellandmarkinfo.h @@ -40,7 +40,7 @@ public: LLPanelLandmarkInfo(); /*virtual*/ ~LLPanelLandmarkInfo(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void resetLocation(); diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index c3334605ae..d573660668 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -175,7 +175,7 @@ LLLandmarksPanel::~LLLandmarksPanel() { } -BOOL LLLandmarksPanel::postBuild() +bool LLLandmarksPanel::postBuild() { if (!gInventory.isInventoryUsable()) return FALSE; @@ -184,7 +184,7 @@ BOOL LLLandmarksPanel::postBuild() initListCommandsHandlers(); initLandmarksInventoryPanel(); - return TRUE; + return true; } // virtual @@ -1225,17 +1225,17 @@ LLFavoritesPanel::LLFavoritesPanel() buildFromFile("panel_favorites.xml"); } -BOOL LLFavoritesPanel::postBuild() +bool LLFavoritesPanel::postBuild() { if (!gInventory.isInventoryUsable()) - return FALSE; + return false; // mast be called before any other initXXX methods to init Gear menu LLLandmarksPanel::initListCommandsHandlers(); initFavoritesInventoryPanel(); - return TRUE; + return true; } void LLFavoritesPanel::initFavoritesInventoryPanel() diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 16f3a5dc24..305d1bf035 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -52,7 +52,7 @@ public: LLLandmarksPanel(bool is_landmark_panel); virtual ~LLLandmarksPanel(); - BOOL postBuild() override; + bool postBuild() override; void onSearchEdit(const std::string& string) override; void onShowOnMap() override; void onShowProfile() override; @@ -162,7 +162,7 @@ class LLFavoritesPanel : public LLLandmarksPanel public: LLFavoritesPanel(); - BOOL postBuild() override; + bool postBuild() override; void initFavoritesInventoryPanel(); }; diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index ed4ed2c610..1c2e5aa94d 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -78,7 +78,7 @@ LLPanelLandMedia::~LLPanelLandMedia() { } -BOOL LLPanelLandMedia::postBuild() +bool LLPanelLandMedia::postBuild() { mMediaTextureCtrl = getChild<LLTextureCtrl>("media texture"); @@ -112,7 +112,7 @@ BOOL LLPanelLandMedia::postBuild() mSetURLButton = getChild<LLButton>("set_media_url"); childSetAction("set_media_url", onSetBtn, this); - return TRUE; + return true; } diff --git a/indra/newview/llpanellandmedia.h b/indra/newview/llpanellandmedia.h index 63cfa01470..b841ded56d 100644 --- a/indra/newview/llpanellandmedia.h +++ b/indra/newview/llpanellandmedia.h @@ -39,7 +39,7 @@ class LLPanelLandMedia public: LLPanelLandMedia(LLSafeHandle<LLParcelSelection>& parcelp); /*virtual*/ ~LLPanelLandMedia(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void refresh(); void setMediaType(const std::string& media_type); void setMediaURL(const std::string& media_type); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 1fd1462d66..399cb34a11 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -451,7 +451,7 @@ LLPanelLogin::~LLPanelLogin() } // virtual -void LLPanelLogin::setFocus(BOOL b) +void LLPanelLogin::setFocus(bool b) { if(b != hasFocus()) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index c6254f72cf..c2353c06c9 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -49,7 +49,7 @@ public: void *callback_data); ~LLPanelLogin(); - virtual void setFocus( BOOL b ); + virtual void setFocus( bool b ); static void show(const LLRect &rect, void (*callback)(S32 option, void* user_data), @@ -71,8 +71,6 @@ public: static void closePanel(); - void setSiteIsAlive( bool alive ); - static void loadLoginPage(); static void giveFocus(); static void setAlwaysRefresh(bool refresh); @@ -93,14 +91,12 @@ public: private: friend class LLPanelLoginListener; void addFavoritesToStartLocation(); - void addUsersWithFavoritesToUsername(); void onSelectServer(); void onLocationSLURL(); static void setFields(LLPointer<LLCredential> credential); static void onClickConnect(bool commit_fields = true); - static void onClickNewAccount(void*); static void onClickVersion(void*); static void onClickForgotPassword(void*); static void onClickSignUp(void*); @@ -109,7 +105,6 @@ private: static void onRememberUserCheck(void*); static void onRememberPasswordCheck(void*); static void onPassKey(LLLineEditor* caller, void* user_data); - static void updateServerCombo(); private: boost::scoped_ptr<LLPanelLoginListener> mListener; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a5a768776a..47f952781d 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -80,7 +80,7 @@ class LLFloaterInventoryFinder : public LLFloater public: LLFloaterInventoryFinder( LLPanelMainInventory* inventory_view); virtual void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void changeFilter(LLInventoryFilter* filter); void updateElementsFromFilter(); BOOL getCheckShowEmpty(); @@ -142,7 +142,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mSavedFolderState->setApply(FALSE); } -BOOL LLPanelMainInventory::postBuild() +bool LLPanelMainInventory::postBuild() { gInventory.addObserver(this); @@ -386,7 +386,7 @@ void LLPanelMainInventory::startSearch() } } -BOOL LLPanelMainInventory::handleKeyHere(KEY key, MASK mask) +bool LLPanelMainInventory::handleKeyHere(KEY key, MASK mask) { LLFolderView* root_folder = mActivePanel ? mActivePanel->getRootFolder() : NULL; if (root_folder) @@ -399,7 +399,7 @@ BOOL LLPanelMainInventory::handleKeyHere(KEY key, MASK mask) && mask == MASK_NONE) { // move focus to inventory proper - mActivePanel->setFocus(TRUE); + mActivePanel->setFocus(true); root_folder->scrollToShowSelection(); return TRUE; } @@ -914,7 +914,7 @@ void LLPanelMainInventory::setFilterSubString(const std::string& string) mActivePanel->setFilterSubString(string); } -BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -922,7 +922,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, { // Check to see if we are auto scrolling from the last frame LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel(); - BOOL needsToScroll = panel->getScrollableContainer()->canAutoScroll(x, y); + bool needsToScroll = panel->getScrollableContainer()->canAutoScroll(x, y); if(mFilterTabs) { if(needsToScroll) @@ -931,7 +931,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } } - BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + bool handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); return handled; } @@ -1108,7 +1108,7 @@ LLFloaterInventoryFinder::LLFloaterInventoryFinder(LLPanelMainInventory* invento updateElementsFromFilter(); } -BOOL LLFloaterInventoryFinder::postBuild() +bool LLFloaterInventoryFinder::postBuild() { const LLRect& viewrect = mPanelMainInventory->getRect(); setRect(LLRect(viewrect.mLeft - getRect().getWidth(), viewrect.mTop, viewrect.mLeft, viewrect.mTop - getRect().getHeight())); @@ -1130,7 +1130,7 @@ BOOL LLFloaterInventoryFinder::postBuild() childSetAction("Close", onCloseBtn, this); updateElementsFromFilter(); - return TRUE; + return true; } void LLFloaterInventoryFinder::onTimeAgo(LLUICtrl *ctrl, void *user_data) { @@ -2002,14 +2002,14 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } } -void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility ) +void LLPanelMainInventory::onVisibilityChange( bool new_visibility ) { if(!new_visibility) { LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if (menu) { - menu->setVisible(FALSE); + menu->setVisible(false); } getActivePanel()->getRootFolder()->finishRenamingItem(); } diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index fbfca43f64..b6eb055270 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -65,7 +65,7 @@ public: LLPanelMainInventory(const LLPanel::Params& p = getDefaultParams()); ~LLPanelMainInventory(); - BOOL postBuild(); + bool postBuild(); enum EViewModeType { @@ -74,17 +74,17 @@ public: MODE_COMBINATION }; - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); // Inherited functionality - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); /*virtual*/ void changed(U32); /*virtual*/ void draw(); - /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); + /*virtual*/ void onVisibilityChange ( bool new_visibility ); LLInventoryPanel* getPanel() { return mActivePanel; } LLInventoryPanel* getActivePanel() { return mActivePanel; } diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index 3638ee14fc..a46fbf0a82 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -63,14 +63,14 @@ LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox() } // virtual -BOOL LLPanelMarketplaceInbox::postBuild() +bool LLPanelMarketplaceInbox::postBuild() { LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this)); mFreshCountCtrl = getChild<LLUICtrl>("inbox_fresh_new_count"); mInboxButton = getChild<LLButton>("inbox_btn"); - return TRUE; + return true; } void LLPanelMarketplaceInbox::onSelectionChange() @@ -122,10 +122,10 @@ void LLPanelMarketplaceInbox::onFocusReceived() gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } -BOOL LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) +bool LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { *accept = ACCEPT_NO; - return TRUE; + return true; } U32 LLPanelMarketplaceInbox::getFreshItemCount() const diff --git a/indra/newview/llpanelmarketplaceinbox.h b/indra/newview/llpanelmarketplaceinbox.h index 952e3a333a..199d98366f 100644 --- a/indra/newview/llpanelmarketplaceinbox.h +++ b/indra/newview/llpanelmarketplaceinbox.h @@ -48,11 +48,11 @@ public: LLPanelMarketplaceInbox(const Params& p = getDefaultParams()); ~LLPanelMarketplaceInbox(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) override; - /*virtual*/ void draw(); + void draw() override; LLInventoryPanel * setupInventoryPanel(); diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 8380394f2c..ffbf91b522 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -80,7 +80,7 @@ LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() : //////////////////////////////////////////////////////////////////////////////// // -BOOL LLPanelMediaSettingsGeneral::postBuild() +bool LLPanelMediaSettingsGeneral::postBuild() { // connect member vars with UI widgets mAutoLoop = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_LOOP_KEY ); diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h index 06793d91fc..0950ae9c55 100644 --- a/indra/newview/llpanelmediasettingsgeneral.h +++ b/indra/newview/llpanelmediasettingsgeneral.h @@ -53,7 +53,7 @@ public: // Hook that the floater calls after applying changes to the panel void postApply(); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void draw(); /*virtual*/ void onClose(bool app_quitting); diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp index cb0b7789ff..99b158550b 100644 --- a/indra/newview/llpanelmediasettingspermissions.cpp +++ b/indra/newview/llpanelmediasettingspermissions.cpp @@ -64,7 +64,7 @@ LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() : //////////////////////////////////////////////////////////////////////////////// // -BOOL LLPanelMediaSettingsPermissions::postBuild() +bool LLPanelMediaSettingsPermissions::postBuild() { // connect member vars with UI widgets mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY ); diff --git a/indra/newview/llpanelmediasettingspermissions.h b/indra/newview/llpanelmediasettingspermissions.h index f976720180..b2611745fa 100644 --- a/indra/newview/llpanelmediasettingspermissions.h +++ b/indra/newview/llpanelmediasettingspermissions.h @@ -44,7 +44,7 @@ public: LLPanelMediaSettingsPermissions(); ~LLPanelMediaSettingsPermissions(); - BOOL postBuild(); + bool postBuild(); virtual void draw(); // XXX TODO: put these into a common parent class? diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index b588e8f930..d6ee15b7b9 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -58,7 +58,7 @@ LLPanelMediaSettingsSecurity::LLPanelMediaSettingsSecurity() : //////////////////////////////////////////////////////////////////////////////// // -BOOL LLPanelMediaSettingsSecurity::postBuild() +bool LLPanelMediaSettingsSecurity::postBuild() { mEnableWhiteList = getChild< LLCheckBoxCtrl >( LLMediaEntry::WHITELIST_ENABLE_KEY ); mWhiteListList = getChild< LLScrollListCtrl >( LLMediaEntry::WHITELIST_KEY ); diff --git a/indra/newview/llpanelmediasettingssecurity.h b/indra/newview/llpanelmediasettingssecurity.h index fe8e843571..0660182f23 100644 --- a/indra/newview/llpanelmediasettingssecurity.h +++ b/indra/newview/llpanelmediasettingssecurity.h @@ -40,7 +40,7 @@ public: LLPanelMediaSettingsSecurity(); ~LLPanelMediaSettingsSecurity(); - BOOL postBuild(); + bool postBuild(); virtual void draw(); // XXX TODO: put these into a common parent class? diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index aed7c34a64..a8553b654e 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -120,7 +120,7 @@ LLPanelNearByMedia::~LLPanelNearByMedia() { } -BOOL LLPanelNearByMedia::postBuild() +bool LLPanelNearByMedia::postBuild() { LLPanelPulldown::postBuild(); @@ -171,8 +171,8 @@ BOOL LLPanelNearByMedia::postBuild() mPlayingString = getString("playing_suffix"); mMediaList->setDoubleClickCallback(onZoomMedia, this); - mMediaList->sortByColumnIndex(PROXIMITY_COLUMN, TRUE); - mMediaList->sortByColumnIndex(VISIBILITY_COLUMN, FALSE); + mMediaList->sortByColumnIndex(PROXIMITY_COLUMN, true); + mMediaList->sortByColumnIndex(VISIBILITY_COLUMN, false); refreshList(); updateControls(); @@ -191,7 +191,7 @@ BOOL LLPanelNearByMedia::postBuild() gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - return TRUE; + return true; } void LLPanelNearByMedia::handleMediaAutoPlayChanged(const LLSD& newvalue) @@ -211,7 +211,7 @@ void LLPanelNearByMedia::handleMediaAutoPlayChanged(const LLSD& newvalue) } /*virtual*/ -void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLPanelNearByMedia::reshape(S32 width, S32 height, bool called_from_parent) { LLPanelPulldown::reshape(width, height, called_from_parent); @@ -276,7 +276,7 @@ bool LLPanelNearByMedia::handleRightMouseDown(S32 x, S32 y, MASK mask) } -void LLPanelNearByMedia::onVisibilityChange(BOOL new_visibility) +void LLPanelNearByMedia::onVisibilityChange(bool new_visibility) { if (!new_visibility && mContextMenu->getVisible()) { diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index fc58d14381..22f154f388 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -44,12 +44,12 @@ class LLPanelNearByMedia : public LLPanelPulldown { public: - BOOL postBuild() override; + bool postBuild() override; void draw() override; - void reshape(S32 width, S32 height, BOOL called_from_parent) override; + void reshape(S32 width, S32 height, bool called_from_parent) override; bool handleHover(S32 x, S32 y, MASK mask) override; bool handleRightMouseDown(S32 x, S32 y, MASK mask) override; - void onVisibilityChange(BOOL new_visibility) override; + void onVisibilityChange(bool new_visibility) override; // this is part of the nearby media *dialog* so we can track whether // the user *implicitly* wants audio on or off via their *explicit* diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 0704fc881d..3423e07dec 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -97,9 +97,9 @@ const F32 MAX_ATTACHMENT_DIST = 3.5f; // meters //static const std::string LEGACY_FULLBRIGHT_DESC =LLTrans::getString("Fullbright"); -BOOL LLPanelObject::postBuild() +bool LLPanelObject::postBuild() { - setMouseOpaque(FALSE); + setMouseOpaque(false); //-------------------------------------------------------- // Top @@ -280,7 +280,7 @@ BOOL LLPanelObject::postBuild() // Start with everyone disabled clearCtrls(); - return TRUE; + return true; } LLPanelObject::LLPanelObject() diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index 515dd27c0a..dd9ed1a122 100644 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -51,7 +51,7 @@ public: LLPanelObject(); virtual ~LLPanelObject(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void draw(); virtual void clearCtrls(); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 18e134e4e4..4af8f9efdc 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -127,17 +127,17 @@ public: virtual void closeItem() {} virtual void selectItem() {} virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {} - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual bool renameItem(const std::string& new_name); - virtual BOOL isItemMovable() const; - virtual BOOL isItemRemovable() const; - virtual BOOL removeItem(); + virtual bool isItemMovable() const; + virtual bool isItemRemovable() const; + virtual bool removeItem(); virtual void removeBatch(std::vector<LLFolderViewModelItem*>& batch); virtual void move(LLFolderViewModelItem* parent_listener); virtual bool isItemCopyable(bool can_copy_as_link = true) const; - virtual BOOL copyToClipboard() const; - virtual BOOL cutToClipboard(); - virtual BOOL isClipboardPasteable() const; + virtual bool copyToClipboard() const; + virtual bool cutToClipboard(); + virtual bool isClipboardPasteable() const; virtual void pasteFromClipboard(); virtual void pasteLinkFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); @@ -154,7 +154,7 @@ public: // LLDragAndDropBridge functionality virtual LLToolDragAndDrop::ESource getDragSource() const { return LLToolDragAndDrop::SOURCE_WORLD; } virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); @@ -288,9 +288,9 @@ void LLTaskInvFVBridge::openItem() LL_DEBUGS() << "LLTaskInvFVBridge::openItem()" << LL_ENDL; } -BOOL LLTaskInvFVBridge::isItemRenameable() const +bool LLTaskInvFVBridge::isItemRenameable() const { - if(gAgent.isGodlike()) return TRUE; + if(gAgent.isGodlike()) return true; LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { @@ -298,10 +298,10 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const if(item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE, GOD_LIKE)) { - return TRUE; + return true; } } - return FALSE; + return false; } bool LLTaskInvFVBridge::renameItem(const std::string& new_name) @@ -325,26 +325,26 @@ bool LLTaskInvFVBridge::renameItem(const std::string& new_name) return true; } -BOOL LLTaskInvFVBridge::isItemMovable() const +bool LLTaskInvFVBridge::isItemMovable() const { //LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); //if(object && (object->permModify() || gAgent.isGodlike())) //{ - // return TRUE; + // return true; //} - //return FALSE; + //return false; return true; } -BOOL LLTaskInvFVBridge::isItemRemovable() const +bool LLTaskInvFVBridge::isItemRemovable() const { const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object && (object->permModify() || object->permYouOwner())) { - return TRUE; + return true; } - return FALSE; + return false; } bool remove_task_inventory_callback(const LLSD& notification, const LLSD& response, LLPanelObjectInventory* panel) @@ -372,7 +372,7 @@ bool remove_task_inventory_callback(const LLSD& notification, const LLSD& respon // ! REFACTOR ! two_uuids_list_t is also defined in llinventorybridge.h, but differently. typedef std::pair<LLUUID, std::list<LLUUID> > panel_two_uuids_list_t; typedef std::pair<LLPanelObjectInventory*, panel_two_uuids_list_t> remove_data_t; -BOOL LLTaskInvFVBridge::removeItem() +bool LLTaskInvFVBridge::removeItem() { if(isItemRemovable() && mPanel) { @@ -383,7 +383,7 @@ BOOL LLTaskInvFVBridge::removeItem() { // just do it. object->removeInventory(mUUID); - return TRUE; + return true; } else { @@ -391,11 +391,11 @@ BOOL LLTaskInvFVBridge::removeItem() payload["task_id"] = mPanel->getTaskUUID(); payload["inventory_ids"].append(mUUID); LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel)); - return FALSE; + return false; } } } - return FALSE; + return false; } void LLTaskInvFVBridge::removeBatch(std::vector<LLFolderViewModelItem*>& batch) @@ -450,19 +450,19 @@ bool LLTaskInvFVBridge::isItemCopyable(bool can_link) const GP_OBJECT_MANIPULATE); } -BOOL LLTaskInvFVBridge::copyToClipboard() const +bool LLTaskInvFVBridge::copyToClipboard() const { - return FALSE; + return false; } -BOOL LLTaskInvFVBridge::cutToClipboard() +bool LLTaskInvFVBridge::cutToClipboard() { - return FALSE; + return false; } -BOOL LLTaskInvFVBridge::isClipboardPasteable() const +bool LLTaskInvFVBridge::isClipboardPasteable() const { - return FALSE; + return false; } void LLTaskInvFVBridge::pasteFromClipboard() @@ -511,13 +511,13 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const return FALSE; } -BOOL LLTaskInvFVBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLTaskInvFVBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { //LL_INFOS() << "LLTaskInvFVBridge::dragOrDrop()" << LL_ENDL; - return FALSE; + return false; } // virtual @@ -585,14 +585,14 @@ public: virtual LLUIImagePtr getIcon() const; virtual const std::string& getDisplayName() const; - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; // virtual BOOL isItemCopyable() const { return FALSE; } virtual bool renameItem(const std::string& new_name); - virtual BOOL isItemRemovable() const; + virtual bool isItemRemovable() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool hasChildren() const; virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; - virtual BOOL dragOrDrop(MASK mask, BOOL drop, + virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); @@ -638,9 +638,9 @@ const std::string& LLTaskCategoryBridge::getDisplayName() const return mDisplayName; } -BOOL LLTaskCategoryBridge::isItemRenameable() const +bool LLTaskCategoryBridge::isItemRenameable() const { - return FALSE; + return false; } bool LLTaskCategoryBridge::renameItem(const std::string& new_name) @@ -648,9 +648,9 @@ bool LLTaskCategoryBridge::renameItem(const std::string& new_name) return false; } -BOOL LLTaskCategoryBridge::isItemRemovable() const +bool LLTaskCategoryBridge::isItemRemovable() const { - return FALSE; + return false; } void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -664,7 +664,7 @@ bool LLTaskCategoryBridge::hasChildren() const { // return TRUE if we have or do know know if we have children. // *FIX: For now, return FALSE - we will know for sure soon enough. - return FALSE; + return false; } void LLTaskCategoryBridge::openItem() @@ -691,13 +691,13 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const return FALSE; } -BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, +bool LLTaskCategoryBridge::dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg) { //LL_INFOS() << "LLTaskCategoryBridge::dragOrDrop()" << LL_ENDL; - BOOL accept = FALSE; + bool accept = false; LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { @@ -739,7 +739,7 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, && (LLToolDragAndDrop::SOURCE_WORLD != LLToolDragAndDrop::getInstance()->getSource()) && (LLToolDragAndDrop::SOURCE_NOTECARD != LLToolDragAndDrop::getInstance()->getSource())) { - accept = TRUE; + accept = true; } if(accept && drop) { @@ -905,13 +905,13 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL isItemRenameable() const; + virtual bool isItemRenameable() const; virtual bool renameItem(const std::string& new_name); }; -BOOL LLTaskCallingCardBridge::isItemRenameable() const +bool LLTaskCallingCardBridge::isItemRenameable() const { - return FALSE; + return false; } bool LLTaskCallingCardBridge::renameItem(const std::string& new_name) @@ -945,7 +945,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); //virtual void buildContextMenu(LLMenuGL& menu); //static void copyToInventory(void* userdata); @@ -976,7 +976,7 @@ void LLTaskLSLBridge::openItem() } } -BOOL LLTaskLSLBridge::removeItem() +bool LLTaskLSLBridge::removeItem() { LLFloaterReg::hideInstance("preview_scriptedit", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1010,7 +1010,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); }; void LLTaskNotecardBridge::openItem() @@ -1039,7 +1039,7 @@ void LLTaskNotecardBridge::openItem() } } -BOOL LLTaskNotecardBridge::removeItem() +bool LLTaskNotecardBridge::removeItem() { LLFloaterReg::hideInstance("preview_notecard", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1059,7 +1059,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); }; void LLTaskGestureBridge::openItem() @@ -1072,7 +1072,7 @@ void LLTaskGestureBridge::openItem() LLPreviewGesture::show(mUUID, mPanel->getTaskUUID()); } -BOOL LLTaskGestureBridge::removeItem() +bool LLTaskGestureBridge::removeItem() { // Don't need to deactivate gesture because gestures inside objects can never be active. LLFloaterReg::hideInstance("preview_gesture", LLSD(mUUID)); @@ -1093,7 +1093,7 @@ public: virtual BOOL canOpenItem() const { return TRUE; } virtual void openItem(); - virtual BOOL removeItem(); + virtual bool removeItem(); }; void LLTaskAnimationBridge::openItem() @@ -1111,7 +1111,7 @@ void LLTaskAnimationBridge::openItem() } } -BOOL LLTaskAnimationBridge::removeItem() +bool LLTaskAnimationBridge::removeItem() { LLFloaterReg::hideInstance("preview_anim", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1179,7 +1179,7 @@ public: BOOL canOpenItem() const override { return TRUE; } void openItem() override; - BOOL removeItem() override; + bool removeItem() override; }; void LLTaskMaterialBridge::openItem() @@ -1210,7 +1210,7 @@ void LLTaskMaterialBridge::openItem() } } -BOOL LLTaskMaterialBridge::removeItem() +bool LLTaskMaterialBridge::removeItem() { LLFloaterReg::hideInstance("material_editor", LLSD(mUUID)); return LLTaskInvFVBridge::removeItem(); @@ -1359,7 +1359,7 @@ LLPanelObjectInventory::~LLPanelObjectInventory() } } -BOOL LLPanelObjectInventory::postBuild() +bool LLPanelObjectInventory::postBuild() { // clear contents and initialize menus, sets up mFolders reset(); @@ -1367,7 +1367,7 @@ BOOL LLPanelObjectInventory::postBuild() // Register an idle update callback gIdleCallbacks.addFunction(idle, this); - return TRUE; + return true; } void LLPanelObjectInventory::doToSelected(const LLSD& userdata) @@ -1789,14 +1789,14 @@ void LLPanelObjectInventory::deleteAllChildren() LLView::deleteAllChildren(); } -BOOL LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) +bool LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { if (mFolders) { LLFolderViewItem* folderp = mFolders->getNextFromChild(NULL); if (!folderp) { - return FALSE; + return false; } // Try to pass on unmodified mouse coordinates S32 local_x = x - mFolders->getRect().mLeft; @@ -1814,7 +1814,7 @@ BOOL LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL dro } else { - return FALSE; + return false; } } @@ -1880,9 +1880,9 @@ void LLPanelObjectInventory::clearItemIDs() mItemMap.clear(); } -BOOL LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) +bool LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) { - BOOL handled = FALSE; + bool handled = false; switch (key) { case KEY_DELETE: @@ -1894,7 +1894,7 @@ BOOL LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) if (isSelectionRemovable() && mask == MASK_NONE) { LLInventoryAction::doToSelected(&gInventory, mFolders, "delete"); - handled = TRUE; + handled = true; } break; } diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index 0e450d8ce9..50ca2372ca 100644 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -60,7 +60,7 @@ public: LLPanelObjectInventory(const Params&); virtual ~LLPanelObjectInventory(); - virtual BOOL postBuild(); + virtual bool postBuild(); LLFolderViewModelInventory& getRootViewModel() { return mInventoryViewModel; } @@ -76,7 +76,7 @@ public: virtual void draw(); virtual void deleteAllChildren(); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); @@ -101,7 +101,7 @@ protected: void removeItemID(const LLUUID& id); void clearItemIDs(); - BOOL handleKeyHere( KEY key, MASK mask ); + bool handleKeyHere( KEY key, MASK mask ); BOOL isSelectionRemovable(); private: diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 4a755a6e93..71027e1f87 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -440,7 +440,7 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit() } } -BOOL LLPanelOutfitEdit::postBuild() +bool LLPanelOutfitEdit::postBuild() { // gInventory.isInventoryUsable() no longer needs to be tested per Richard's fix for race conditions between inventory and panels @@ -568,7 +568,7 @@ BOOL LLPanelOutfitEdit::postBuild() getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); onOutfitChanging(gAgentWearables.isCOFChangeInProgress()); - return TRUE; + return true; } // virtual @@ -1168,7 +1168,7 @@ void LLPanelOutfitEdit::update() updateVerbs(); } -BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1215,7 +1215,7 @@ BOOL LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } } - return TRUE; + return true; } void LLPanelOutfitEdit::displayCurrentOutfit() diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index d0597fb72b..ec88018f8f 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -124,7 +124,7 @@ public: LLPanelOutfitEdit(); /*virtual*/ ~LLPanelOutfitEdit(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); void moveWearable(bool closer_to_body); @@ -181,7 +181,7 @@ public: void resetAccordionState(); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index d8c34d5c40..a6f5c906c2 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -78,7 +78,7 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory() } // virtual -BOOL LLPanelOutfitsInventory::postBuild() +bool LLPanelOutfitsInventory::postBuild() { initTabPanels(); initListCommandsHandlers(); @@ -96,7 +96,7 @@ BOOL LLPanelOutfitsInventory::postBuild() getChild<LLButton>(SAVE_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::saveOutfit, this, false)); getChild<LLButton>(SAVE_AS_BTN)->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::saveOutfit, this, true)); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 50d7074d4b..a2d83dc46e 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -46,7 +46,7 @@ public: LLPanelOutfitsInventory(); virtual ~LLPanelOutfitsInventory(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); void onSearchEdit(const std::string& string); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 31fe6bc49b..09f58f5626 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -609,7 +609,7 @@ void LLPanelPeople::removePicker() } } -BOOL LLPanelPeople::postBuild() +bool LLPanelPeople::postBuild() { S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit(); @@ -729,7 +729,7 @@ BOOL LLPanelPeople::postBuild() mOnlineFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2)); mAllFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2)); - return TRUE; + return true; } // virtual diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 25abebc576..807384f50c 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -50,12 +50,12 @@ public: LLPanelPeople(); virtual ~LLPanelPeople(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ bool notifyChildren(const LLSD& info); + bool postBuild() override; + void onOpen(const LLSD& key) override; + bool notifyChildren(const LLSD& info) override; // Implements LLVoiceClientStatusObserver::onChange() to enable call buttons // when voice is available - /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); + void onChange(EStatusType status, const std::string &channelURI, bool proximal) override; // internals class Updater; diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 8a8518ce0d..c6e63c731c 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -154,7 +154,7 @@ LLPanelPermissions::LLPanelPermissions() : setMouseOpaque(FALSE); } -BOOL LLPanelPermissions::postBuild() +bool LLPanelPermissions::postBuild() { childSetCommitCallback("Object Name",LLPanelPermissions::onCommitName,this); getChild<LLLineEditor>("Object Name")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe); @@ -188,7 +188,7 @@ BOOL LLPanelPermissions::postBuild() mLabelOwnerName = getChild<LLTextBox>("Owner Name"); mLabelCreatorName = getChild<LLTextBox>("Creator Name"); - return TRUE; + return true; } diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h index e657f8f8b7..5be9d9efe6 100644 --- a/indra/newview/llpanelpermissions.h +++ b/indra/newview/llpanelpermissions.h @@ -48,7 +48,7 @@ public: LLPanelPermissions(); virtual ~LLPanelPermissions(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void updateOwnerName(const LLUUID& owner_id, const LLAvatarName& owner_name, const LLStyle::Params& style_params); void updateCreatorName(const LLUUID& creator_id, const LLAvatarName& creator_name, const LLStyle::Params& style_params); void refresh(); // refresh all labels as needed diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index fb5957ff8f..4f6e025bf5 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -72,7 +72,7 @@ LLPanelPlaceInfo::~LLPanelPlaceInfo() } //virtual -BOOL LLPanelPlaceInfo::postBuild() +bool LLPanelPlaceInfo::postBuild() { mTitle = getChild<LLTextBox>("title"); mCurrentTitle = mTitle->getText(); @@ -92,7 +92,7 @@ BOOL LLPanelPlaceInfo::postBuild() mScrollingPanelMinHeight = mScrollContainer->getScrolledViewRect().getHeight(); mScrollingPanelWidth = mScrollingPanel->getRect().getWidth(); - return TRUE; + return true; } //virtual @@ -194,7 +194,7 @@ void LLPanelPlaceInfo::setErrorStatus(S32 status, const std::string& reason) mRegionTitle.clear(); // Enable "Back" button that was disabled when parcel request was sent. - getChild<LLButton>("back_btn")->setEnabled(TRUE); + getChild<LLButton>("back_btn")->setEnabled(true); } // virtual @@ -258,7 +258,7 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) } // virtual -void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLPanelPlaceInfo::reshape(S32 width, S32 height, bool called_from_parent) { // This if was added to force collapsing description textbox on Windows at the beginning of reshape diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 533215016a..c9dfca6b62 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -62,7 +62,7 @@ public: LLPanelPlaceInfo(); /*virtual*/ ~LLPanelPlaceInfo(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); // Ignore all old location information, useful if you are // recycling an existing dialog and need to clear it. @@ -89,7 +89,7 @@ public: /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); // Create a pick for the location specified // by global_pos. diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 9283dfa218..4087380519 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -92,7 +92,7 @@ LLPanelPlaceProfile::~LLPanelPlaceProfile() } // virtual -BOOL LLPanelPlaceProfile::postBuild() +bool LLPanelPlaceProfile::postBuild() { LLPanelPlaceInfo::postBuild(); @@ -166,7 +166,7 @@ BOOL LLPanelPlaceProfile::postBuild() mLastSelectedRegionID = LLUUID::null; mNextCovenantUpdateTime = 0; - return TRUE; + return true; } // virtual @@ -312,7 +312,7 @@ void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data) } // virtual -void LLPanelPlaceProfile::onVisibilityChange(BOOL new_visibility) +void LLPanelPlaceProfile::onVisibilityChange(bool new_visibility) { LLPanel::onVisibilityChange(new_visibility); diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index 16478bc179..ce0b89f5f7 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -39,7 +39,7 @@ public: LLPanelPlaceProfile(); /*virtual*/ ~LLPanelPlaceProfile(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void resetLocation(); @@ -47,7 +47,7 @@ public: /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + /*virtual*/ void onVisibilityChange(bool new_visibility); // Displays information about the currently selected parcel // without sending a request to the server. diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index b603c361d8..31413900a1 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -275,7 +275,7 @@ LLPanelPlaces::~LLPanelPlaces() } } -BOOL LLPanelPlaces::postBuild() +bool LLPanelPlaces::postBuild() { mTeleportBtn = getChild<LLButton>("teleport_btn"); mTeleportBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onTeleportButtonClicked, this)); @@ -323,7 +323,7 @@ BOOL LLPanelPlaces::postBuild() mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if (mPlaceMenu) { - mPlaceMenu->setAlwaysShowMenu(TRUE); + mPlaceMenu->setAlwaysShowMenu(true); } else { @@ -360,7 +360,7 @@ BOOL LLPanelPlaces::postBuild() mPlaceProfile = findChild<LLPanelPlaceProfile>("panel_place_profile"); mLandmarkInfo = findChild<LLPanelLandmarkInfo>("panel_landmark_info"); if (!mPlaceProfile || !mLandmarkInfo) - return FALSE; + return false; mPlaceProfileBackBtn = mPlaceProfile->getChild<LLButton>("back_btn"); mPlaceProfileBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); @@ -382,7 +382,7 @@ BOOL LLPanelPlaces::postBuild() createTabs(); updateVerbs(); - return TRUE; + return true; } void LLPanelPlaces::onOpen(const LLSD& key) @@ -1107,7 +1107,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) } // virtual -void LLPanelPlaces::onVisibilityChange(BOOL new_visibility) +void LLPanelPlaces::onVisibilityChange(bool new_visibility) { LLPanel::onVisibilityChange(new_visibility); diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index e554099343..baa20d2e66 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -57,7 +57,7 @@ public: LLPanelPlaces(); virtual ~LLPanelPlaces(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); // Called on parcel selection change to update place information. @@ -103,7 +103,7 @@ private: void togglePlaceInfoPanel(BOOL visible); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + /*virtual*/ void onVisibilityChange(bool new_visibility); void updateVerbs(); diff --git a/indra/newview/llpanelpresetscamerapulldown.cpp b/indra/newview/llpanelpresetscamerapulldown.cpp index 4c9c30160c..56c8c771b9 100644 --- a/indra/newview/llpanelpresetscamerapulldown.cpp +++ b/indra/newview/llpanelpresetscamerapulldown.cpp @@ -54,7 +54,7 @@ LLPanelPresetsCameraPulldown::LLPanelPresetsCameraPulldown() buildFromFile( "panel_presets_camera_pulldown.xml"); } -BOOL LLPanelPresetsCameraPulldown::postBuild() +bool LLPanelPresetsCameraPulldown::postBuild() { LLPresetsManager* presetsMgr = LLPresetsManager::getInstance(); if (presetsMgr) diff --git a/indra/newview/llpanelpresetscamerapulldown.h b/indra/newview/llpanelpresetscamerapulldown.h index c49bab042e..b313e5785e 100644 --- a/indra/newview/llpanelpresetscamerapulldown.h +++ b/indra/newview/llpanelpresetscamerapulldown.h @@ -35,7 +35,7 @@ class LLPanelPresetsCameraPulldown : public LLPanelPulldown { public: LLPanelPresetsCameraPulldown(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void populatePanel(); private: diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp index f6e501f147..ac84d7ac56 100644 --- a/indra/newview/llpanelpresetspulldown.cpp +++ b/indra/newview/llpanelpresetspulldown.cpp @@ -57,7 +57,7 @@ LLPanelPresetsPulldown::LLPanelPresetsPulldown() buildFromFile( "panel_presets_pulldown.xml"); } -BOOL LLPanelPresetsPulldown::postBuild() +bool LLPanelPresetsPulldown::postBuild() { LLPresetsManager* presetsMgr = LLPresetsManager::getInstance(); presetsMgr->setPresetListChangeCallback(boost::bind(&LLPanelPresetsPulldown::populatePanel, this)); diff --git a/indra/newview/llpanelpresetspulldown.h b/indra/newview/llpanelpresetspulldown.h index 79bd6886b1..cc3ea7f038 100644 --- a/indra/newview/llpanelpresetspulldown.h +++ b/indra/newview/llpanelpresetspulldown.h @@ -36,7 +36,7 @@ class LLPanelPresetsPulldown : public LLPanelPulldown { public: LLPanelPresetsPulldown(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; void populatePanel(); private: diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 986b846d0c..2eacebf623 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -141,7 +141,7 @@ LLPanelPrimMediaControls::~LLPanelPrimMediaControls() { } -BOOL LLPanelPrimMediaControls::postBuild() +bool LLPanelPrimMediaControls::postBuild() { mMediaRegion = getChild<LLView>("media_region"); mBackCtrl = getChild<LLUICtrl>("back"); @@ -223,8 +223,8 @@ BOOL LLPanelPrimMediaControls::postBuild() mCurrentZoom = ZOOM_NONE; // clicks on buttons do not remove keyboard focus from media - setIsChrome(TRUE); - return TRUE; + setIsChrome(true); + return true; } void LLPanelPrimMediaControls::setMediaFace(LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl, LLVector3 pick_normal) @@ -876,7 +876,7 @@ bool LLPanelPrimMediaControls::handleMouseUp(S32 x, S32 y, MASK mask) return LLPanel::handleMouseUp(x, y, mask); } -BOOL LLPanelPrimMediaControls::handleKeyHere( KEY key, MASK mask ) +bool LLPanelPrimMediaControls::handleKeyHere( KEY key, MASK mask ) { mInactivityTimer.start(); return LLPanel::handleKeyHere(key, mask); diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 62ed4badaf..1b8f106f7b 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -46,14 +46,14 @@ class LLPanelPrimMediaControls : public LLPanel public: LLPanelPrimMediaControls(); virtual ~LLPanelPrimMediaControls(); - /*virtual*/ BOOL postBuild(); - virtual void draw(); - virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks); - virtual bool handleScrollHWheel(S32 x, S32 y, S32 clicks); - - virtual bool handleMouseDown(S32 x, S32 y, MASK mask); - virtual bool handleMouseUp(S32 x, S32 y, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask); + bool postBuild() override; + void draw() override; + bool handleScrollWheel(S32 x, S32 y, S32 clicks) override; + bool handleScrollHWheel(S32 x, S32 y, S32 clicks) override; + + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleMouseUp(S32 x, S32 y, MASK mask) override; + bool handleKeyHere(KEY key, MASK mask) override; void updateShape(); bool isMouseOver(); diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 00fa3853f7..be5783dd50 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -534,7 +534,7 @@ public: { if (params.size() < 2) return false; LLUUID avatar_id; - if (!avatar_id.set(params[0], FALSE)) + if (!avatar_id.set(params[0], false)) { return false; } @@ -661,7 +661,7 @@ class LLFloaterProfilePermissions public: LLFloaterProfilePermissions(LLView * owner, const LLUUID &avatar_id); ~LLFloaterProfilePermissions(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; void draw() override; void changed(U32 mask) override; // LLFriendObserver @@ -713,7 +713,7 @@ LLFloaterProfilePermissions::~LLFloaterProfilePermissions() } } -BOOL LLFloaterProfilePermissions::postBuild() +bool LLFloaterProfilePermissions::postBuild() { mDescription = getChild<LLTextBase>("perm_description"); mOnlineStatus = getChild<LLCheckBoxCtrl>("online_check"); @@ -728,7 +728,7 @@ BOOL LLFloaterProfilePermissions::postBuild() mOkBtn->setCommitCallback([this](LLUICtrl*, void*) { onApplyRights(); }, nullptr); mCancelBtn->setCommitCallback([this](LLUICtrl*, void*) { onCancel(); }, nullptr); - return TRUE; + return true; } void LLFloaterProfilePermissions::onOpen(const LLSD& key) @@ -925,7 +925,7 @@ LLPanelProfileSecondLife::~LLPanelProfileSecondLife() } } -BOOL LLPanelProfileSecondLife::postBuild() +bool LLPanelProfileSecondLife::postBuild() { mGroupList = getChild<LLGroupList>("group_list"); mShowInSearchCombo = getChild<LLComboBox>("show_in_search"); @@ -957,7 +957,7 @@ BOOL LLPanelProfileSecondLife::postBuild() mCantEditObjectsIcon->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentPermissionsDialog(); }); mSecondLifePic->setMouseUpCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { onShowAgentProfileTexture(); }); - return TRUE; + return true; } void LLPanelProfileSecondLife::onOpen(const LLSD& key) @@ -1014,7 +1014,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) } -BOOL LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1024,13 +1024,13 @@ BOOL LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL d if (LLPanelProfileTab::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) && *accept != ACCEPT_NO) { - return TRUE; + return true; } // No point sharing with own profile if (getSelfProfile()) { - return FALSE; + return false; } // Exclude fields that look like they are editable. @@ -2124,13 +2124,13 @@ void LLPanelProfileWeb::onOpen(const LLSD& key) mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileWeb::onAvatarNameCache, this, _1, _2)); } -BOOL LLPanelProfileWeb::postBuild() +bool LLPanelProfileWeb::postBuild() { mWebBrowser = getChild<LLMediaCtrl>("profile_html"); mWebBrowser->addObserver(this); mWebBrowser->setHomePageUrl("about:blank"); - return TRUE; + return true; } void LLPanelProfileWeb::resetData() @@ -2249,7 +2249,7 @@ LLPanelProfileFirstLife::~LLPanelProfileFirstLife() { } -BOOL LLPanelProfileFirstLife::postBuild() +bool LLPanelProfileFirstLife::postBuild() { mDescriptionEdit = getChild<LLTextEditor>("fl_description_edit"); mPicture = getChild<LLThumbnailCtrl>("real_world_pic"); @@ -2267,7 +2267,7 @@ BOOL LLPanelProfileFirstLife::postBuild() mDiscardChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardDescriptionChanges(); }, nullptr); mDescriptionEdit->setKeystrokeCallback([this](LLTextEditor* caller) { onSetDescriptionDirty(); }); - return TRUE; + return true; } void LLPanelProfileFirstLife::onOpen(const LLSD& key) @@ -2544,7 +2544,7 @@ void LLPanelProfileNotes::commitUnsavedChanges() } } -BOOL LLPanelProfileNotes::postBuild() +bool LLPanelProfileNotes::postBuild() { mNotesEditor = getChild<LLTextEditor>("notes_edit"); mSaveChanges = getChild<LLButton>("notes_save_changes"); @@ -2554,7 +2554,7 @@ BOOL LLPanelProfileNotes::postBuild() mDiscardChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardNotesChanges(); }, nullptr); mNotesEditor->setKeystrokeCallback([this](LLTextEditor* caller) { onSetNotesDirty(); }); - return TRUE; + return true; } void LLPanelProfileNotes::onOpen(const LLSD& key) @@ -2639,9 +2639,9 @@ LLPanelProfile::~LLPanelProfile() { } -BOOL LLPanelProfile::postBuild() +bool LLPanelProfile::postBuild() { - return TRUE; + return true; } void LLPanelProfile::onTabChange() diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index 45655cd67b..554a217575 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -78,7 +78,7 @@ public: void onOpen(const LLSD& key) override; - BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -95,7 +95,7 @@ public: void setAvatarId(const LLUUID& avatar_id) override; - BOOL postBuild() override; + bool postBuild() override; void resetData() override; @@ -240,7 +240,7 @@ public: void onOpen(const LLSD& key) override; - BOOL postBuild() override; + bool postBuild() override; void resetData() override; @@ -281,7 +281,7 @@ public: void onOpen(const LLSD& key) override; - BOOL postBuild() override; + bool postBuild() override; void processProperties(const LLAvatarData* avatar_data); @@ -336,7 +336,7 @@ public: void onOpen(const LLSD& key) override; - BOOL postBuild() override; + bool postBuild() override; void processProperties(LLAvatarNotes* avatar_notes); @@ -372,7 +372,7 @@ public: LLPanelProfile(); /*virtual*/ ~LLPanelProfile(); - BOOL postBuild() override; + bool postBuild() override; void updateData() override; void refreshName(); diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp index 3fbaad4dee..1eb12051ee 100644 --- a/indra/newview/llpanelprofileclassifieds.cpp +++ b/indra/newview/llpanelprofileclassifieds.cpp @@ -300,7 +300,7 @@ void LLPanelProfileClassifieds::createClassified() } } -BOOL LLPanelProfileClassifieds::postBuild() +bool LLPanelProfileClassifieds::postBuild() { mTabContainer = getChild<LLTabContainer>("tab_classifieds"); mNoItemsLabel = getChild<LLUICtrl>("classifieds_panel_text"); @@ -310,7 +310,7 @@ BOOL LLPanelProfileClassifieds::postBuild() mNewButton->setCommitCallback(boost::bind(&LLPanelProfileClassifieds::onClickNewBtn, this)); mDeleteButton->setCommitCallback(boost::bind(&LLPanelProfileClassifieds::onClickDelete, this)); - return TRUE; + return true; } void LLPanelProfileClassifieds::onClickNewBtn() @@ -605,7 +605,7 @@ LLPanelProfileClassified* LLPanelProfileClassified::create() return panel; } -BOOL LLPanelProfileClassified::postBuild() +bool LLPanelProfileClassified::postBuild() { mScrollContainer = getChild<LLScrollContainer>("profile_scroll"); mInfoPanel = getChild<LLView>("info_panel"); @@ -673,7 +673,7 @@ BOOL LLPanelProfileClassified::postBuild() mContentTypeCombo->setCommitCallback(boost::bind(&LLPanelProfileClassified::onChange, this)); mAutoRenewEdit->setCommitCallback(boost::bind(&LLPanelProfileClassified::onChange, this)); - return TRUE; + return true; } void LLPanelProfileClassified::onOpen(const LLSD& key) @@ -1238,14 +1238,14 @@ void LLPanelProfileClassified::onTeleportClick() } } -BOOL LLPanelProfileClassified::isDirty() const +bool LLPanelProfileClassified::isDirty() const { if(mIsNew) { - return TRUE; + return true; } - BOOL dirty = false; + bool dirty = false; dirty |= mSnapshotCtrl->isDirty(); dirty |= mClassifiedNameEdit->isDirty(); dirty |= mClassifiedDescEdit->isDirty(); @@ -1507,14 +1507,14 @@ LLPublishClassifiedFloater::~LLPublishClassifiedFloater() { } -BOOL LLPublishClassifiedFloater::postBuild() +bool LLPublishClassifiedFloater::postBuild() { LLFloater::postBuild(); childSetAction("publish_btn", boost::bind(&LLFloater::closeFloater, this, false)); childSetAction("cancel_btn", boost::bind(&LLFloater::closeFloater, this, false)); - return TRUE; + return true; } void LLPublishClassifiedFloater::setPrice(S32 price) diff --git a/indra/newview/llpanelprofileclassifieds.h b/indra/newview/llpanelprofileclassifieds.h index 912819e86b..d05c7f6b79 100644 --- a/indra/newview/llpanelprofileclassifieds.h +++ b/indra/newview/llpanelprofileclassifieds.h @@ -54,7 +54,7 @@ public: LLPublishClassifiedFloater(const LLSD& key); virtual ~LLPublishClassifiedFloater(); - BOOL postBuild() override; + bool postBuild() override; void setPrice(S32 price); S32 getPrice(); @@ -74,7 +74,7 @@ public: LLPanelProfileClassifieds(); /*virtual*/ ~LLPanelProfileClassifieds(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; @@ -125,7 +125,7 @@ public: /*virtual*/ ~LLPanelProfileClassified(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; @@ -171,7 +171,7 @@ public: void setInfoLoaded(bool loaded) { mInfoLoaded = loaded; } - BOOL isDirty() const override; + bool isDirty() const override; void resetDirty() override; diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index ff3f654d0e..e24438f272 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -228,7 +228,7 @@ void LLPanelProfilePicks::selectPick(const LLUUID& pick_id) } } -BOOL LLPanelProfilePicks::postBuild() +bool LLPanelProfilePicks::postBuild() { mTabContainer = getChild<LLTabContainer>("tab_picks"); mNoItemsLabel = getChild<LLUICtrl>("picks_panel_text"); @@ -238,12 +238,12 @@ BOOL LLPanelProfilePicks::postBuild() mNewButton->setCommitCallback(boost::bind(&LLPanelProfilePicks::onClickNewBtn, this)); mDeleteButton->setCommitCallback(boost::bind(&LLPanelProfilePicks::onClickDelete, this)); - return TRUE; + return true; } void LLPanelProfilePicks::onClickNewBtn() { - mNoItemsLabel->setVisible(FALSE); + mNoItemsLabel->setVisible(false); LLPanelProfilePick* pick_panel = LLPanelProfilePick::create(); pick_panel->setAvatarId(getAvatarId()); mTabContainer->addTabPanel( @@ -570,7 +570,7 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id) } } -BOOL LLPanelProfilePick::postBuild() +bool LLPanelProfilePick::postBuild() { mPickName = getChild<LLLineEditor>("pick_name"); mPickDescription = getChild<LLTextEditor>("pick_desc"); @@ -591,14 +591,14 @@ BOOL LLPanelProfilePick::postBuild() mSetCurrentLocationButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSetLocation, this)); mPickName->setKeystrokeCallback(boost::bind(&LLPanelProfilePick::onPickChanged, this, _1), NULL); - mPickName->setEnabled(FALSE); + mPickName->setEnabled(false); mPickDescription->setKeystrokeCallback(boost::bind(&LLPanelProfilePick::onPickChanged, this, _1)); mPickDescription->setFocusReceivedCallback(boost::bind(&LLPanelProfilePick::onDescriptionFocusReceived, this)); - getChild<LLUICtrl>("pick_location")->setEnabled(FALSE); + getChild<LLUICtrl>("pick_location")->setEnabled(false); - return TRUE; + return true; } void LLPanelProfilePick::onDescriptionFocusReceived() @@ -736,7 +736,7 @@ void LLPanelProfilePick::resetDirty() mLocationChanged = false; } -BOOL LLPanelProfilePick::isDirty() const +bool LLPanelProfilePick::isDirty() const { if (mNewPick || LLPanel::isDirty() @@ -745,9 +745,9 @@ BOOL LLPanelProfilePick::isDirty() const || mPickName->isDirty() || mPickDescription->isDirty()) { - return TRUE; + return true; } - return FALSE; + return false; } void LLPanelProfilePick::onClickSetLocation() diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h index f84463cc9b..bb38896476 100644 --- a/indra/newview/llpanelprofilepicks.h +++ b/indra/newview/llpanelprofilepicks.h @@ -50,7 +50,7 @@ public: LLPanelProfilePicks(); /*virtual*/ ~LLPanelProfilePicks(); - BOOL postBuild() override; + bool postBuild() override; void onOpen(const LLSD& key) override; @@ -110,7 +110,7 @@ public: /*virtual*/ ~LLPanelProfilePick(); - BOOL postBuild() override; + bool postBuild() override; void setAvatarId(const LLUUID& avatar_id) override; @@ -126,7 +126,7 @@ public: /** * Returns true if any of Pick properties was changed by user. */ - BOOL isDirty() const override; + bool isDirty() const override; /** * Saves changes. diff --git a/indra/newview/llpanelpulldown.cpp b/indra/newview/llpanelpulldown.cpp index b8c57301a4..102ccb9bea 100644 --- a/indra/newview/llpanelpulldown.cpp +++ b/indra/newview/llpanelpulldown.cpp @@ -90,7 +90,7 @@ void LLPanelPulldown::onMouseLeave(S32 x, S32 y, MASK mask) } /*virtual*/ -void LLPanelPulldown::onVisibilityChange(BOOL new_visibility) +void LLPanelPulldown::onVisibilityChange(bool new_visibility) { if (new_visibility) { diff --git a/indra/newview/llpanelpulldown.h b/indra/newview/llpanelpulldown.h index f7819c22e3..834bd2595c 100644 --- a/indra/newview/llpanelpulldown.h +++ b/indra/newview/llpanelpulldown.h @@ -37,16 +37,16 @@ class LLPanelPulldown : public LLPanel { public: LLPanelPulldown(); - /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask); - /*virtual*/ void onMouseLeave(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 handleDoubleClick(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleScrollWheel(S32 x, S32 y, S32 clicks); - /*virtual*/ void onTopLost(); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); - - /*virtual*/ void draw(); + void onMouseEnter(S32 x, S32 y, MASK mask) override; + void onMouseLeave(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 handleDoubleClick(S32 x, S32 y, MASK mask) override; + bool handleScrollWheel(S32 x, S32 y, S32 clicks) override; + void onTopLost() override; + void onVisibilityChange(bool new_visibility) override; + + void draw() override; protected: LLFrameTimer mHoverTimer; diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp index c3524a8c87..5353fb0925 100644 --- a/indra/newview/llpanelsnapshot.cpp +++ b/indra/newview/llpanelsnapshot.cpp @@ -41,7 +41,7 @@ #include "llagentbenefits.h" -const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +constexpr S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 S32 power_of_two(S32 sz, S32 upper) { @@ -59,7 +59,7 @@ LLPanelSnapshot::LLPanelSnapshot() {} // virtual -BOOL LLPanelSnapshot::postBuild() +bool LLPanelSnapshot::postBuild() { getChild<LLUICtrl>("save_btn")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost())); getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1)); @@ -78,7 +78,7 @@ BOOL LLPanelSnapshot::postBuild() updateControls(LLSD()); mSnapshotFloater = getParentByType<LLFloaterSnapshotBase>(); - return TRUE; + return true; } // virtual @@ -104,7 +104,7 @@ LLSnapshotModel::ESnapshotFormat LLPanelSnapshot::getImageFormat() const return LLSnapshotModel::SNAPSHOT_FORMAT_JPEG; } -void LLPanelSnapshot::enableControls(BOOL enable) +void LLPanelSnapshot::enableControls(bool enable) { setCtrlsEnabled(enable); } diff --git a/indra/newview/llpanelsnapshot.h b/indra/newview/llpanelsnapshot.h index 55273797cc..8ebd92600d 100644 --- a/indra/newview/llpanelsnapshot.h +++ b/indra/newview/llpanelsnapshot.h @@ -43,8 +43,8 @@ class LLPanelSnapshot: public LLPanel public: LLPanelSnapshot(); - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + bool postBuild() override; + void onOpen(const LLSD& key) override; virtual std::string getWidthSpinnerName() const = 0; virtual std::string getHeightSpinnerName() const = 0; @@ -60,7 +60,7 @@ public: virtual LLSnapshotModel::ESnapshotFormat getImageFormat() const; virtual LLSnapshotModel::ESnapshotType getSnapshotType(); virtual void updateControls(const LLSD& info) = 0; ///< Update controls from saved settings - void enableControls(BOOL enable); + void enableControls(bool enable); protected: LLSideTrayPanelContainer* getParentContainer(); diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index 9e56a04b3b..7bbe8a363c 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -50,7 +50,7 @@ class LLPanelSnapshotInventoryBase public: LLPanelSnapshotInventoryBase(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); protected: void onSend(); /*virtual*/ LLSnapshotModel::ESnapshotType getSnapshotType(); @@ -63,7 +63,7 @@ class LLPanelSnapshotInventory public: LLPanelSnapshotInventory(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); void onResolutionCommit(LLUICtrl* ctrl); @@ -85,7 +85,7 @@ class LLPanelOutfitSnapshotInventory public: LLPanelOutfitSnapshotInventory(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: @@ -107,7 +107,7 @@ LLPanelSnapshotInventoryBase::LLPanelSnapshotInventoryBase() { } -BOOL LLPanelSnapshotInventoryBase::postBuild() +bool LLPanelSnapshotInventoryBase::postBuild() { return LLPanelSnapshot::postBuild(); } @@ -124,10 +124,10 @@ LLPanelSnapshotInventory::LLPanelSnapshotInventory() } // virtual -BOOL LLPanelSnapshotInventory::postBuild() +bool LLPanelSnapshotInventory::postBuild() { - getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE); - getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE); + getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(false); + getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(false); getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshotInventory::onResolutionCommit, this, _1)); return LLPanelSnapshotInventoryBase::postBuild(); @@ -183,7 +183,7 @@ LLPanelOutfitSnapshotInventory::LLPanelOutfitSnapshotInventory() } // virtual -BOOL LLPanelOutfitSnapshotInventory::postBuild() +bool LLPanelOutfitSnapshotInventory::postBuild() { return LLPanelSnapshotInventoryBase::postBuild(); } diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index e7fced92a7..4d9368bd72 100644 --- a/indra/newview/llpanelsnapshotlocal.cpp +++ b/indra/newview/llpanelsnapshotlocal.cpp @@ -47,7 +47,7 @@ class LLPanelSnapshotLocal public: LLPanelSnapshotLocal(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: @@ -79,7 +79,7 @@ LLPanelSnapshotLocal::LLPanelSnapshotLocal() } // virtual -BOOL LLPanelSnapshotLocal::postBuild() +bool LLPanelSnapshotLocal::postBuild() { getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onQualitySliderCommit, this, _1)); getChild<LLUICtrl>("local_format_combo")->setCommitCallback(boost::bind(&LLPanelSnapshotLocal::onFormatComboCommit, this, _1)); diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 8cc2fbc770..42f0731172 100644 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -46,7 +46,7 @@ class LLPanelSnapshotOptions public: LLPanelSnapshotOptions(); ~LLPanelSnapshotOptions(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: @@ -75,7 +75,7 @@ LLPanelSnapshotOptions::~LLPanelSnapshotOptions() } // virtual -BOOL LLPanelSnapshotOptions::postBuild() +bool LLPanelSnapshotOptions::postBuild() { mSnapshotFloater = getParentByType<LLFloaterSnapshotBase>(); return LLPanel::postBuild(); diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index 05fa2b58b1..db8fc421cf 100644 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -56,7 +56,7 @@ class LLPanelSnapshotPostcard public: LLPanelSnapshotPostcard(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: @@ -92,12 +92,12 @@ LLPanelSnapshotPostcard::LLPanelSnapshotPostcard() } // virtual -BOOL LLPanelSnapshotPostcard::postBuild() +bool LLPanelSnapshotPostcard::postBuild() { // For the first time a user focuses to .the msg box, all text will be selected. getChild<LLUICtrl>("msg_form")->setFocusChangedCallback(boost::bind(&LLPanelSnapshotPostcard::onMsgFormFocusRecieved, this)); - getChild<LLUICtrl>("to_form")->setFocus(TRUE); + getChild<LLUICtrl>("to_form")->setFocus(true); getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1)); diff --git a/indra/newview/llpanelsnapshotprofile.cpp b/indra/newview/llpanelsnapshotprofile.cpp index 38dec78030..84742fad64 100644 --- a/indra/newview/llpanelsnapshotprofile.cpp +++ b/indra/newview/llpanelsnapshotprofile.cpp @@ -49,7 +49,7 @@ class LLPanelSnapshotProfile public: LLPanelSnapshotProfile(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); private: @@ -73,7 +73,7 @@ LLPanelSnapshotProfile::LLPanelSnapshotProfile() } // virtual -BOOL LLPanelSnapshotProfile::postBuild() +bool LLPanelSnapshotProfile::postBuild() { return LLPanelSnapshot::postBuild(); } diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index b4704d153a..c7b4cc7cee 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -60,7 +60,7 @@ public: LLDate date, const std::string &hl); virtual ~LLTeleportHistoryFlatItem(); - virtual BOOL postBuild(); + virtual bool postBuild(); /*virtual*/ S32 notify(const LLSD& info); @@ -148,7 +148,7 @@ LLTeleportHistoryFlatItem::~LLTeleportHistoryFlatItem() } //virtual -BOOL LLTeleportHistoryFlatItem::postBuild() +bool LLTeleportHistoryFlatItem::postBuild() { mTitle = getChild<LLTextBox>("region"); @@ -400,14 +400,14 @@ LLTeleportHistoryPanel::~LLTeleportHistoryPanel() mTeleportHistoryChangedConnection.disconnect(); } -BOOL LLTeleportHistoryPanel::postBuild() +bool LLTeleportHistoryPanel::postBuild() { mCommitCallbackRegistrar.add("TeleportHistory.GearMenu.Action", boost::bind(&LLTeleportHistoryPanel::onGearMenuAction, this, _2)); mEnableCallbackRegistrar.add("TeleportHistory.GearMenu.Enable", boost::bind(&LLTeleportHistoryPanel::isActionEnabled, this, _2)); // init menus before list, since menus are passed to list mGearItemMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_teleport_history_item.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mGearItemMenu->setAlwaysShowMenu(TRUE); // all items can be disabled if nothing is selected, show anyway + mGearItemMenu->setAlwaysShowMenu(true); // all items can be disabled if nothing is selected, show anyway mSortingMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_teleport_history_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mTeleportHistory = LLTeleportHistoryStorage::getInstance(); @@ -461,7 +461,7 @@ BOOL LLTeleportHistoryPanel::postBuild() } } - return TRUE; + return true; } // virtual diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index 058fee0170..9343c1eb5e 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -46,7 +46,7 @@ public: LLTeleportHistoryPanel(); virtual ~LLTeleportHistoryPanel(); - BOOL postBuild() override; + bool postBuild() override; void draw() override; void onSearchEdit(const std::string& string) override; diff --git a/indra/newview/llpaneltiptoast.cpp b/indra/newview/llpaneltiptoast.cpp index 35009a552d..61808ab788 100644 --- a/indra/newview/llpaneltiptoast.cpp +++ b/indra/newview/llpaneltiptoast.cpp @@ -28,7 +28,7 @@ #include "llpaneltiptoast.h" -BOOL LLPanelTipToast::postBuild() +bool LLPanelTipToast::postBuild() { mMessageText= findChild<LLUICtrl>("message"); @@ -40,10 +40,10 @@ BOOL LLPanelTipToast::postBuild() else { llassert(!"Can't find child 'message' text box."); - return FALSE; + return false; } - return TRUE; + return true; } void LLPanelTipToast::onMessageTextClick() diff --git a/indra/newview/llpaneltiptoast.h b/indra/newview/llpaneltiptoast.h index cb09f1dca6..e6f871ffc1 100644 --- a/indra/newview/llpaneltiptoast.h +++ b/indra/newview/llpaneltiptoast.h @@ -40,7 +40,7 @@ class LLPanelTipToast : public LLToastPanel LOG_CLASS(LLPanelTipToast); public: LLPanelTipToast(const LLNotificationPtr& notification): LLToastPanel(notification) {} - virtual BOOL postBuild(); + bool postBuild() override; private: void onMessageTextClick(); void onPanelClick(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index 264c70777c..6fbf07644d 100644 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -139,7 +139,7 @@ bool LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask) return true; } -BOOL LLPanelTopInfoBar::postBuild() +bool LLPanelTopInfoBar::postBuild() { mInfoBtn = getChild<LLButton>("place_info_btn"); mInfoBtn->setClickedCallback(boost::bind(&LLPanelTopInfoBar::onInfoButtonClicked, this)); @@ -172,7 +172,7 @@ BOOL LLPanelTopInfoBar::postBuild() setVisibleCallback(boost::bind(&LLPanelTopInfoBar::onVisibilityChanged, this, _2)); - return TRUE; + return true; } void LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged() diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h index 5688af58a0..c1c8bad218 100644 --- a/indra/newview/llpaneltopinfobar.h +++ b/indra/newview/llpaneltopinfobar.h @@ -46,8 +46,8 @@ class LLPanelTopInfoBar : public LLPanel, public LLSingleton<LLPanelTopInfoBar>, public: typedef boost::signals2::signal<void ()> resize_signal_t; - /*virtual*/ BOOL postBuild(); - /*virtual*/ void draw(); + bool postBuild() override; + void draw() override; /** * Updates location and parcel icons on login complete diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index 9f8b3f2b19..62be2f3d45 100644 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -62,7 +62,7 @@ LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings() { } -BOOL LLPanelVoiceDeviceSettings::postBuild() +bool LLPanelVoiceDeviceSettings::postBuild() { LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); // set mic volume tuning slider based on last mic volume setting @@ -84,11 +84,11 @@ BOOL LLPanelVoiceDeviceSettings::postBuild() mCtrlInputDevices->setMouseDownCallback(boost::bind(&LLPanelVoiceDeviceSettings::onInputDevicesClicked, this)); - return TRUE; + return true; } // virtual -void LLPanelVoiceDeviceSettings::onVisibilityChange ( BOOL new_visibility ) +void LLPanelVoiceDeviceSettings::onVisibilityChange ( bool new_visibility ) { if (new_visibility) { diff --git a/indra/newview/llpanelvoicedevicesettings.h b/indra/newview/llpanelvoicedevicesettings.h index 355bc02b05..490d20b2ab 100644 --- a/indra/newview/llpanelvoicedevicesettings.h +++ b/indra/newview/llpanelvoicedevicesettings.h @@ -37,14 +37,14 @@ public: ~LLPanelVoiceDeviceSettings(); /*virtual*/ void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void apply(); void cancel(); void refresh(); void initialize(); void cleanup(); - /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); + /*virtual*/ void onVisibilityChange ( bool new_visibility ); void setUseTuningMode(bool use) { mUseTuningMode = use; }; diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp index a3f0e25ef0..996f4757e2 100644 --- a/indra/newview/llpanelvoiceeffect.cpp +++ b/indra/newview/llpanelvoiceeffect.cpp @@ -61,7 +61,7 @@ LLPanelVoiceEffect::~LLPanelVoiceEffect() } // virtual -BOOL LLPanelVoiceEffect::postBuild() +bool LLPanelVoiceEffect::postBuild() { mVoiceEffectCombo = getChild<LLComboBox>("voice_effect"); @@ -78,7 +78,7 @@ BOOL LLPanelVoiceEffect::postBuild() update(true); - return TRUE; + return true; } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelvoiceeffect.h b/indra/newview/llpanelvoiceeffect.h index bba525e1df..b22e446daa 100644 --- a/indra/newview/llpanelvoiceeffect.h +++ b/indra/newview/llpanelvoiceeffect.h @@ -43,14 +43,14 @@ public: LLPanelVoiceEffect(); virtual ~LLPanelVoiceEffect(); - virtual BOOL postBuild(); + bool postBuild() override; private: void onCommitVoiceEffect(); void update(bool list_updated); /// Called by voice effect provider when voice effect list is changed. - virtual void onVoiceEffectChanged(bool effect_list_updated); + void onVoiceEffectChanged(bool effect_list_updated) override; // Fixed entries in the Voice Morph list typedef enum e_voice_effect_combo_items diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 595609b4de..e881d059d5 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -90,7 +90,7 @@ const F32 DEFAULT_GRAVITY_MULTIPLIER = 1.f; const F32 DEFAULT_DENSITY = 1000.f; // "Features" Tab -BOOL LLPanelVolume::postBuild() +bool LLPanelVolume::postBuild() { // Flexible Objects Parameters { @@ -213,7 +213,7 @@ BOOL LLPanelVolume::postBuild() // Start with everyone disabled clearCtrls(); - return TRUE; + return true; } LLPanelVolume::LLPanelVolume() diff --git a/indra/newview/llpanelvolume.h b/indra/newview/llpanelvolume.h index 01b7ebb75c..0b6168d819 100644 --- a/indra/newview/llpanelvolume.h +++ b/indra/newview/llpanelvolume.h @@ -52,7 +52,7 @@ public: virtual void draw(); virtual void clearCtrls(); - virtual BOOL postBuild(); + virtual bool postBuild(); void refresh(); diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp index 6f11e76a72..4a3117da1b 100644 --- a/indra/newview/llpanelvolumepulldown.cpp +++ b/indra/newview/llpanelvolumepulldown.cpp @@ -55,7 +55,7 @@ LLPanelVolumePulldown::LLPanelVolumePulldown() buildFromFile( "panel_volume_pulldown.xml"); } -BOOL LLPanelVolumePulldown::postBuild() +bool LLPanelVolumePulldown::postBuild() { return LLPanelPulldown::postBuild(); } @@ -63,7 +63,7 @@ BOOL LLPanelVolumePulldown::postBuild() void LLPanelVolumePulldown::onAdvancedButtonClick(const LLSD& user_data) { // close the global volume minicontrol, we're bringing up the big one - setVisible(FALSE); + setVisible(false); // bring up the prefs floater LLFloaterPreference* prefsfloater = dynamic_cast<LLFloaterPreference*> @@ -87,7 +87,7 @@ void LLPanelVolumePulldown::setControlFalse(const LLSD& user_data) LLControlVariable* control = findControl(control_name); if (control) - control->set(LLSD(FALSE)); + control->set(LLSD(false)); } void LLPanelVolumePulldown::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl) diff --git a/indra/newview/llpanelvolumepulldown.h b/indra/newview/llpanelvolumepulldown.h index e907bb0c78..88e50ce0ef 100644 --- a/indra/newview/llpanelvolumepulldown.h +++ b/indra/newview/llpanelvolumepulldown.h @@ -36,7 +36,7 @@ class LLPanelVolumePulldown : public LLPanelPulldown { public: LLPanelVolumePulldown(); - /*virtual*/ BOOL postBuild(); + bool postBuild() override; private: void setControlFalse(const LLSD& user_data); diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 5242c4fef9..e8afd1edbf 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -236,7 +236,7 @@ LLPanelWearing::~LLPanelWearing() } } -BOOL LLPanelWearing::postBuild() +bool LLPanelWearing::postBuild() { mAccordionCtrl = getChild<LLAccordionCtrl>("wearables_accordion"); mWearablesTab = getChild<LLAccordionCtrlTab>("tab_wearables"); @@ -255,7 +255,7 @@ BOOL LLPanelWearing::postBuild() menu_gear_btn->setMenu(mGearMenu->getMenu()); - return TRUE; + return true; } //virtual diff --git a/indra/newview/llpanelwearing.h b/indra/newview/llpanelwearing.h index 18e543eec6..a45568cf87 100644 --- a/indra/newview/llpanelwearing.h +++ b/indra/newview/llpanelwearing.h @@ -55,7 +55,7 @@ public: LLPanelWearing(); virtual ~LLPanelWearing(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void draw(); diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 0ca068331b..f7a65f6f91 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -67,17 +67,17 @@ LLPreview::LLPreview(const LLSD& key) { mAuxItem = new LLInventoryItem; // don't necessarily steal focus on creation -- sometimes these guys pop up without user action - setAutoFocus(FALSE); + setAutoFocus(false); gInventory.addObserver(this); refreshFromItem(); } -BOOL LLPreview::postBuild() +bool LLPreview::postBuild() { refreshFromItem(); - return TRUE; + return true; } LLPreview::~LLPreview() diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h index 8d1d731452..5d5057a845 100644 --- a/indra/newview/llpreview.h +++ b/indra/newview/llpreview.h @@ -68,7 +68,7 @@ public: LLPreview(const LLSD& key ); virtual ~LLPreview(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); virtual void setObjectID(const LLUUID& object_id); void setItem( LLInventoryItem* item ); @@ -88,7 +88,6 @@ public: static void onBtnCopyToInv(void* userdata); - void addKeepDiscardButtons(); static void onKeepBtn(void* data); static void onDiscardBtn(void* data); /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); @@ -98,8 +97,6 @@ public: virtual void loadAsset() { mAssetStatus = PREVIEW_ASSET_LOADED; } virtual EAssetStatus getAssetStatus() { return mAssetStatus;} - static LLPreview* getFirstPreviewForSource(const LLUUID& source_id); - // Why is this at the LLPreview level? JC void setNotecardInfo(const LLUUID& notecard_inv_id, const LLUUID& object_id); @@ -115,8 +112,6 @@ public: protected: virtual void onCommit(); - void addDescriptionUI(); - static void onText(LLUICtrl*, void* userdata); static void onRadio(LLUICtrl*, void* userdata); diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 7f01438425..4b3b3a0041 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -50,7 +50,7 @@ LLPreviewAnim::LLPreviewAnim(const LLSD& key) } // virtual -BOOL LLPreviewAnim::postBuild() +bool LLPreviewAnim::postBuild() { childSetCommitCallback("desc", LLPreview::onText, this); getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); diff --git a/indra/newview/llpreviewanim.h b/indra/newview/llpreviewanim.h index 9f4ad4fa69..ec1bdd8828 100644 --- a/indra/newview/llpreviewanim.h +++ b/indra/newview/llpreviewanim.h @@ -38,7 +38,7 @@ class LLPreviewAnim : public LLPreview public: LLPreviewAnim(const LLSD& key); - BOOL postBuild() override; + bool postBuild() override; void onClose(bool app_quitting) override; void draw() override; void refreshFromItem() override; diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 2e40455a46..867b3ab362 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -137,12 +137,12 @@ void LLPreviewGesture::draw() } // virtual -BOOL LLPreviewGesture::handleKeyHere(KEY key, MASK mask) +bool LLPreviewGesture::handleKeyHere(KEY key, MASK mask) { if(('S' == key) && (MASK_CONTROL == (mask & MASK_CONTROL))) { saveIfNeeded(); - return TRUE; + return true; } return LLPreview::handleKeyHere(key, mask); @@ -150,13 +150,13 @@ BOOL LLPreviewGesture::handleKeyHere(KEY key, MASK mask) // virtual -BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { - BOOL handled = TRUE; + bool handled = true; switch(cargo_type) { case DAD_ANIMATION: @@ -225,12 +225,12 @@ BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // virtual -BOOL LLPreviewGesture::canClose() +bool LLPreviewGesture::canClose() { if(!mDirty || mForceClose) { - return TRUE; + return true; } else { @@ -241,7 +241,7 @@ BOOL LLPreviewGesture::canClose() LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) ); } - return FALSE; + return false; } } @@ -336,7 +336,7 @@ LLPreviewGesture::~LLPreviewGesture() } -BOOL LLPreviewGesture::postBuild() +bool LLPreviewGesture::postBuild() { setVisibleCallback(boost::bind(&LLPreviewGesture::onVisibilityChanged, this, _2)); @@ -353,20 +353,20 @@ BOOL LLPreviewGesture::postBuild() edit = getChild<LLLineEditor>("trigger_editor"); edit->setKeystrokeCallback(onKeystrokeCommit, this); edit->setCommitCallback(onCommitSetDirty, this); - edit->setCommitOnFocusLost(TRUE); - edit->setIgnoreTab(TRUE); + edit->setCommitOnFocusLost(true); + edit->setIgnoreTab(true); mTriggerEditor = edit; text = getChild<LLTextBox>("replace_text"); - text->setEnabled(FALSE); + text->setEnabled(false); mReplaceText = text; edit = getChild<LLLineEditor>("replace_editor"); - edit->setEnabled(FALSE); + edit->setEnabled(false); edit->setKeystrokeCallback(onKeystrokeCommit, this); edit->setCommitCallback(onCommitSetDirty, this); - edit->setCommitOnFocusLost(TRUE); - edit->setIgnoreTab(TRUE); + edit->setCommitOnFocusLost(true); + edit->setIgnoreTab(true); mReplaceEditor = edit; combo = getChild<LLComboBox>( "modifier_combo"); @@ -384,22 +384,22 @@ BOOL LLPreviewGesture::postBuild() btn = getChild<LLButton>( "add_btn"); btn->setClickedCallback(onClickAdd, this); - btn->setEnabled(FALSE); + btn->setEnabled(false); mAddBtn = btn; btn = getChild<LLButton>( "up_btn"); btn->setClickedCallback(onClickUp, this); - btn->setEnabled(FALSE); + btn->setEnabled(false); mUpBtn = btn; btn = getChild<LLButton>( "down_btn"); btn->setClickedCallback(onClickDown, this); - btn->setEnabled(FALSE); + btn->setEnabled(false); mDownBtn = btn; btn = getChild<LLButton>( "delete_btn"); btn->setClickedCallback(onClickDelete, this); - btn->setEnabled(FALSE); + btn->setEnabled(false); mDeleteBtn = btn; list = getChild<LLScrollListCtrl>("step_list"); @@ -410,47 +410,47 @@ BOOL LLPreviewGesture::postBuild() mOptionsText = getChild<LLTextBox>("options_text"); combo = getChild<LLComboBox>( "animation_list"); - combo->setVisible(FALSE); + combo->setVisible(false); combo->setCommitCallback(onCommitAnimation, this); mAnimationCombo = combo; LLRadioGroup* group; group = getChild<LLRadioGroup>("animation_trigger_type"); - group->setVisible(FALSE); + group->setVisible(false); group->setCommitCallback(onCommitAnimationTrigger, this); mAnimationRadio = group; combo = getChild<LLComboBox>( "sound_list"); - combo->setVisible(FALSE); + combo->setVisible(false); combo->setCommitCallback(onCommitSound, this); mSoundCombo = combo; edit = getChild<LLLineEditor>("chat_editor"); - edit->setVisible(FALSE); + edit->setVisible(false); edit->setCommitCallback(onCommitChat, this); //edit->setKeystrokeCallback(onKeystrokeCommit, this); - edit->setCommitOnFocusLost(TRUE); - edit->setIgnoreTab(TRUE); + edit->setCommitOnFocusLost(true); + edit->setIgnoreTab(true); mChatEditor = edit; check = getChild<LLCheckBoxCtrl>( "wait_anim_check"); - check->setVisible(FALSE); + check->setVisible(false); check->setCommitCallback(onCommitWait, this); mWaitAnimCheck = check; check = getChild<LLCheckBoxCtrl>( "wait_time_check"); - check->setVisible(FALSE); + check->setVisible(false); check->setCommitCallback(onCommitWait, this); mWaitTimeCheck = check; edit = getChild<LLLineEditor>("wait_time_editor"); - edit->setEnabled(FALSE); - edit->setVisible(FALSE); + edit->setEnabled(false); + edit->setVisible(false); edit->setPrevalidate(LLTextValidate::validateFloat); // edit->setKeystrokeCallback(onKeystrokeCommit, this); - edit->setCommitOnFocusLost(TRUE); + edit->setCommitOnFocusLost(true); edit->setCommitCallback(onCommitWaitTime, this); - edit->setIgnoreTab(TRUE); + edit->setIgnoreTab(true); mWaitTimeEditor = edit; // Buttons at the bottom diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index f5c47d71b8..a9a0ecc452 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -52,18 +52,18 @@ public: // LLView /*virtual*/ void draw(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); // LLPanel - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); // LLFloater - /*virtual*/ BOOL canClose(); + /*virtual*/ bool canClose(); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void onUpdateSucceeded(); /*virtual*/ void refresh(); diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 1a613afbb8..9fda92114a 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -82,7 +82,7 @@ LLPreviewNotecard::~LLPreviewNotecard() delete mLiveFile; } -BOOL LLPreviewNotecard::postBuild() +bool LLPreviewNotecard::postBuild() { mEditor = getChild<LLViewerTextEditor>("Notecard Editor"); mEditor->setNotecardInfo(mItemUUID, mObjectID, getKey()); @@ -116,7 +116,7 @@ bool LLPreviewNotecard::saveItem() return saveIfNeeded(item); } -void LLPreviewNotecard::setEnabled( BOOL enabled ) +void LLPreviewNotecard::setEnabled(bool enabled) { LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor"); @@ -139,25 +139,25 @@ void LLPreviewNotecard::draw() } // virtual -BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) +bool LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) { if(('S' == key) && (MASK_CONTROL == (mask & MASK_CONTROL))) { saveIfNeeded(); - return TRUE; + return true; } return LLPreview::handleKeyHere(key, mask); } // virtual -BOOL LLPreviewNotecard::canClose() +bool LLPreviewNotecard::canClose() { LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor"); if(mForceClose || editor->isPristine()) { - return TRUE; + return true; } else { @@ -167,7 +167,7 @@ BOOL LLPreviewNotecard::canClose() // Bring up view-modal dialog: Save changes? Yes, No, Cancel LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2)); } - return FALSE; + return false; } } diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h index 321f44a1ea..4d9e6fcd2c 100644 --- a/indra/newview/llpreviewnotecard.h +++ b/indra/newview/llpreviewnotecard.h @@ -53,14 +53,14 @@ public: // llview void draw() override; - BOOL handleKeyHere(KEY key, MASK mask) override; - void setEnabled( BOOL enabled ) override; + bool handleKeyHere(KEY key, MASK mask) override; + void setEnabled(bool enabled) override; // llfloater - BOOL canClose() override; + bool canClose() override; // llpanel - BOOL postBuild() override; + bool postBuild() override; // reach into the text editor, and grab the drag item const LLInventoryItem* getDragItem(); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index b0b9e00d1b..11892933d8 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -153,7 +153,7 @@ public: LLFloaterScriptSearch(LLScriptEdCore* editor_core); ~LLFloaterScriptSearch(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); static void show(LLScriptEdCore* editor_core); static void onBtnSearch(void* userdata); void handleBtnSearch(); @@ -168,7 +168,7 @@ public: static LLFloaterScriptSearch* getInstance() { return sInstance; } virtual bool hasAccelerators() const; - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); private: @@ -207,19 +207,19 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core) } } -BOOL LLFloaterScriptSearch::postBuild() +bool LLFloaterScriptSearch::postBuild() { mReplaceBox = getChild<LLLineEditor>("replace_text"); mSearchBox = getChild<LLLineEditor>("search_text"); mSearchBox->setCommitCallback(boost::bind(&LLFloaterScriptSearch::onSearchBoxCommit, this)); - mSearchBox->setCommitOnFocusLost(FALSE); + mSearchBox->setCommitOnFocusLost(false); childSetAction("search_btn", onBtnSearch,this); childSetAction("replace_btn", onBtnReplace,this); childSetAction("replace_all_btn", onBtnReplaceAll,this); setDefaultBtn("search_btn"); - return TRUE; + return true; } //static @@ -296,21 +296,21 @@ bool LLFloaterScriptSearch::hasAccelerators() const { return mEditorCore->hasAccelerators(); } - return FALSE; + return false; } -BOOL LLFloaterScriptSearch::handleKeyHere(KEY key, MASK mask) +bool LLFloaterScriptSearch::handleKeyHere(KEY key, MASK mask) { if (mEditorCore) { - BOOL handled = mEditorCore->handleKeyHere(key, mask); + bool handled = mEditorCore->handleKeyHere(key, mask); if (!handled) { LLFloater::handleKeyHere(key, mask); } } - return FALSE; + return false; } void LLFloaterScriptSearch::onSearchBoxCommit() @@ -438,7 +438,7 @@ void LLLiveLSLEditor::onToggleExperience( LLUICtrl *ui, void* userdata ) self->updateExperiencePanel(); } -BOOL LLScriptEdCore::postBuild() +bool LLScriptEdCore::postBuild() { mErrorList = getChild<LLScrollListCtrl>("lsl errors"); @@ -460,7 +460,7 @@ BOOL LLScriptEdCore::postBuild() LLSyntaxIdLSL::getInstance()->initialize(); processKeywords(); - return TRUE; + return true; } void LLScriptEdCore::processKeywords() @@ -1173,7 +1173,7 @@ void LLScriptEdCore::deleteBridges() } // virtual -BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask) +bool LLScriptEdCore::handleKeyHere(KEY key, MASK mask) { bool just_control = MASK_CONTROL == (mask & MASK_MODIFIERS); @@ -1185,7 +1185,7 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask) mSaveCallback(mUserdata, FALSE); } - return TRUE; + return true; } if(('F' == key) && just_control) @@ -1195,10 +1195,10 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask) mSearchReplaceCallback(mUserdata); } - return TRUE; + return true; } - return FALSE; + return false; } void LLScriptEdCore::onBtnLoadFromFile( void* data ) @@ -1520,7 +1520,7 @@ LLPreviewLSL::LLPreviewLSL(const LLSD& key ) } // virtual -BOOL LLPreviewLSL::postBuild() +bool LLPreviewLSL::postBuild() { const LLInventoryItem* item = getItem(); @@ -1630,7 +1630,7 @@ void LLPreviewLSL::loadAsset() } -BOOL LLPreviewLSL::canClose() +bool LLPreviewLSL::canClose() { return mScriptEd->canClose(); } @@ -1861,20 +1861,20 @@ LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) : mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this); } -BOOL LLLiveLSLEditor::postBuild() +bool LLLiveLSLEditor::postBuild() { childSetCommitCallback("running", LLLiveLSLEditor::onRunningCheckboxClicked, this); - getChildView("running")->setEnabled(FALSE); + getChildView("running")->setEnabled(false); childSetAction("Reset",&LLLiveLSLEditor::onReset,this); - getChildView("Reset")->setEnabled(TRUE); + getChildView("Reset")->setEnabled(true); mMonoCheckbox = getChild<LLCheckBoxCtrl>("mono"); childSetCommitCallback("mono", &LLLiveLSLEditor::onMonoCheckboxClicked, this); - getChildView("mono")->setEnabled(FALSE); + getChildView("mono")->setEnabled(true); mScriptEd->mEditor->makePristine(); - mScriptEd->mEditor->setFocus(TRUE); + mScriptEd->mEditor->setFocus(true); mExperiences = getChild<LLComboBox>("Experiences..."); @@ -2317,7 +2317,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/) } } -BOOL LLLiveLSLEditor::canClose() +bool LLLiveLSLEditor::canClose() { return (mScriptEd->canClose()); } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index b01c7fd4ad..11a02400cd 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -95,13 +95,11 @@ protected: public: ~LLScriptEdCore(); - void initializeKeywords(); void initMenu(); void processKeywords(); - void processLoaded(); virtual void draw(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); BOOL canClose(); void setEnableEditing(bool enable); bool canLoadOrSaveToFile( void* userdata ); @@ -153,7 +151,7 @@ private: void selectFirstError(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); void enableSave(BOOL b) {mEnableSave = b;} @@ -223,11 +221,11 @@ public: virtual void callbackLSLCompileSucceeded(); virtual void callbackLSLCompileFailed(const LLSD& compile_errors); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); protected: virtual void draw(); - virtual BOOL canClose(); + virtual bool canClose(); void closeIfNeeded(); virtual void loadAsset(); @@ -269,7 +267,7 @@ public: bool is_script_running); virtual void callbackLSLCompileFailed(const LLSD& compile_errors); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void setIsNew() { mIsNew = TRUE; } @@ -282,15 +280,13 @@ public: void updateExperiencePanel(); void requestExperiences(); void experienceChanged(); - void addAssociatedExperience(const LLSD& experience); private: - virtual BOOL canClose(); + virtual bool canClose(); void closeIfNeeded(); virtual void draw(); virtual void loadAsset(); - void loadAsset(BOOL is_new); /*virtual*/ void saveIfNeeded(bool sync = true); BOOL monoChecked() const; @@ -307,8 +303,6 @@ private: void loadScriptText(const LLUUID &uuid, LLAssetType::EType type); - static void onErrorList(LLUICtrl*, void* user_data); - static void* createScriptEdPanel(void* userdata); static void onMonoCheckboxClicked(LLUICtrl*, void* userdata); diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp index 105c5e8cbe..2fbbfdc40d 100644 --- a/indra/newview/llpreviewsound.cpp +++ b/indra/newview/llpreviewsound.cpp @@ -48,7 +48,7 @@ LLPreviewSound::LLPreviewSound(const LLSD& key) } // virtual -BOOL LLPreviewSound::postBuild() +bool LLPreviewSound::postBuild() { const LLInventoryItem* item = getItem(); if (item) diff --git a/indra/newview/llpreviewsound.h b/indra/newview/llpreviewsound.h index 0453bfd936..4c0aebd5e3 100644 --- a/indra/newview/llpreviewsound.h +++ b/indra/newview/llpreviewsound.h @@ -38,7 +38,7 @@ public: static void auditionSound( void* userdata ); protected: - /* virtual */ BOOL postBuild(); + bool postBuild() override; }; #endif // LL_LLPREVIEWSOUND_H diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 975e2bb910..4bea98aa95 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -126,7 +126,7 @@ void LLPreviewTexture::populateRatioList() } // virtual -BOOL LLPreviewTexture::postBuild() +bool LLPreviewTexture::postBuild() { if (mCopyToInv) { @@ -283,7 +283,7 @@ void LLPreviewTexture::draw() // virtual -BOOL LLPreviewTexture::canSaveAs() const +bool LLPreviewTexture::canSaveAs() const { return mIsFullPerm && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset(); } @@ -357,7 +357,7 @@ void LLPreviewTexture::saveMultipleToFile(const std::string& file_name) } // virtual -void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLPreviewTexture::reshape(S32 width, S32 height, bool called_from_parent) { LLPreview::reshape(width, height, called_from_parent); diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 16db51332e..f493956677 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -43,13 +43,13 @@ public: virtual void draw(); - virtual BOOL canSaveAs() const; + virtual bool canSaveAs() const; virtual void saveAs(); virtual void loadAsset(); virtual EAssetStatus getAssetStatus(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true); virtual void onFocusReceived(); static void onFileLoadedForSave( @@ -73,7 +73,7 @@ public: protected: void init(); void populateRatioList(); - /* virtual */ BOOL postBuild(); + /* virtual */ bool postBuild(); bool setAspectRatio(const F32 width, const F32 height); static void onAspectRatioCommit(LLUICtrl*,void* userdata); void adjustAspectRatio(); diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 6799e20de0..40925cd7da 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -77,7 +77,7 @@ LLProgressView::LLProgressView() mFadeFromLoginTimer.stop(); } -BOOL LLProgressView::postBuild() +bool LLProgressView::postBuild() { mProgressBar = getChild<LLProgressBar>("login_progress_bar"); @@ -96,12 +96,12 @@ BOOL LLProgressView::postBuild() getChild<LLTextBox>("message_text")->setClickedCallback(onClickMessage, this); // hidden initially, until we need it - setVisible(FALSE); + setVisible(false); LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLProgressView::onAlertModal, this, _1)); sInstance = this; - return TRUE; + return true; } @@ -125,14 +125,14 @@ bool LLProgressView::handleHover(S32 x, S32 y, MASK mask) } -BOOL LLProgressView::handleKeyHere(KEY key, MASK mask) +bool LLProgressView::handleKeyHere(KEY key, MASK mask) { // Suck up all keystokes except CTRL-Q. if( ('Q' == key) && (MASK_CONTROL == mask) ) { LLAppViewer::instance()->userQuit(); } - return TRUE; + return true; } void LLProgressView::revealIntroPanel() @@ -173,7 +173,7 @@ void LLProgressView::setStartupComplete() } } -void LLProgressView::setVisible(BOOL visible) +void LLProgressView::setVisible(bool visible) { if (!visible && mFadeFromLoginTimer.getStarted()) { @@ -182,14 +182,14 @@ void LLProgressView::setVisible(BOOL visible) // hiding progress view if (getVisible() && !visible) { - LLPanel::setVisible(FALSE); + LLPanel::setVisible(false); } // showing progress view else if (visible && (!getVisible() || mFadeToWorldTimer.getStarted())) { setFocus(TRUE); mFadeToWorldTimer.stop(); - LLPanel::setVisible(TRUE); + LLPanel::setVisible(true); } } diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h index ace13b0401..fcd340c5e9 100644 --- a/indra/newview/llprogressview.h +++ b/indra/newview/llprogressview.h @@ -48,15 +48,15 @@ public: LLProgressView(); virtual ~LLProgressView(); - BOOL postBuild(); + bool postBuild(); /*virtual*/ void draw(); void drawStartTexture(F32 alpha); void drawLogos(F32 alpha); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); + /*virtual*/ void setVisible(bool visible); // inherited from LLViewerMediaObserver /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 2655075ad1..ca03aa0bd2 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -717,7 +717,7 @@ void LLSceneMonitorView::onTeleportFinished() } } -void LLSceneMonitorView::onVisibilityChange(BOOL visible) +void LLSceneMonitorView::onVisibilityChange(bool visible) { LLSceneMonitor::getInstance()->setDebugViewerVisible(visible); } diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h index f2e1ef69b9..b9dc46e494 100644 --- a/indra/newview/llscenemonitor.h +++ b/indra/newview/llscenemonitor.h @@ -114,7 +114,7 @@ public: ~LLSceneMonitorView(); virtual void draw(); - virtual void onVisibilityChange(BOOL visible); + virtual void onVisibilityChange(bool visible); protected: virtual void onClose(bool app_quitting=false); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 17f2970f99..7e07483e6f 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -99,7 +99,7 @@ LLScreenChannelBase::LLScreenChannelBase(const Params& p) setVisible(FALSE); } -BOOL LLScreenChannelBase::postBuild() +bool LLScreenChannelBase::postBuild() { if (mFloaterSnapRegion == NULL) { @@ -111,10 +111,10 @@ BOOL LLScreenChannelBase::postBuild() mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container"); } - return TRUE; + return true; } -void LLScreenChannelBase::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLScreenChannelBase::reshape(S32 width, S32 height, bool called_from_parent) { if (mChannelAlignment == CA_CENTRE) { diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index e5f4807ab7..ae9591ca8f 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -70,9 +70,9 @@ public: LLScreenChannelBase(const Params&); - BOOL postBuild(); + bool postBuild(); - void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + void reshape(S32 width, S32 height, bool called_from_parent = true); // Channel's outfit-functions // update channel's size and position in the World View diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 6a27ff3047..9d7e8623e5 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -205,7 +205,7 @@ void LLScriptFloater::setDocked(bool docked, bool pop_on_undock /* = true */) hideToastsIfNeeded(); } -void LLScriptFloater::setVisible(BOOL visible) +void LLScriptFloater::setVisible(bool visible) { LLDockableFloater::setVisible(visible); diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 3695b8a3e1..6279211fc6 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -185,7 +185,7 @@ public: /** * Hide all notification toasts when we show dockable floater */ - /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void setVisible(bool visible); bool getSavePosition() { return mSaveFloaterPosition; } diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index bfa453a0ae..bec7349991 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -99,7 +99,7 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param LLScrollingPanelParam::~LLScrollingPanelParam() { } -void LLScrollingPanelParam::updatePanel(BOOL allow_modify) +void LLScrollingPanelParam::updatePanel(bool allow_modify) { if (!mWearable) { @@ -114,7 +114,7 @@ void LLScrollingPanelParam::updatePanel(BOOL allow_modify) getChildView("more")->setEnabled(mAllowModify); } -void LLScrollingPanelParam::setVisible( BOOL visible ) +void LLScrollingPanelParam::setVisible( bool visible ) { if( getVisible() != visible ) { diff --git a/indra/newview/llscrollingpanelparam.h b/indra/newview/llscrollingpanelparam.h index c7a47d5c7a..59780e16fe 100644 --- a/indra/newview/llscrollingpanelparam.h +++ b/indra/newview/llscrollingpanelparam.h @@ -44,9 +44,9 @@ public: LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = TRUE ); virtual ~LLScrollingPanelParam(); - virtual void draw(); - virtual void setVisible( BOOL visible ); - virtual void updatePanel(BOOL allow_modify); + void draw() override; + void setVisible(bool visible) override; + void updatePanel(bool allow_modify) override; static void onSliderMouseDown(LLUICtrl* ctrl, void* userdata); static void onSliderMouseUp(LLUICtrl* ctrl, void* userdata); diff --git a/indra/newview/llscrollingpanelparambase.cpp b/indra/newview/llscrollingpanelparambase.cpp index fe7a362723..56e6672504 100644 --- a/indra/newview/llscrollingpanelparambase.cpp +++ b/indra/newview/llscrollingpanelparambase.cpp @@ -66,7 +66,7 @@ LLScrollingPanelParamBase::~LLScrollingPanelParamBase() { } -void LLScrollingPanelParamBase::updatePanel(BOOL allow_modify) +void LLScrollingPanelParamBase::updatePanel(bool allow_modify) { LLViewerVisualParam* param = mParam; diff --git a/indra/newview/llscrollingpanelparambase.h b/indra/newview/llscrollingpanelparambase.h index 9538826251..5a441985d3 100644 --- a/indra/newview/llscrollingpanelparambase.h +++ b/indra/newview/llscrollingpanelparambase.h @@ -45,7 +45,7 @@ public: LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = FALSE ); virtual ~LLScrollingPanelParamBase(); - virtual void updatePanel(BOOL allow_modify); + void updatePanel(bool allow_modify) override; static void onSliderMoved(LLUICtrl* ctrl, void* userdata); diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp index 2824c70582..16542b993f 100644 --- a/indra/newview/llsearchcombobox.cpp +++ b/indra/newview/llsearchcombobox.cpp @@ -186,7 +186,7 @@ void LLSearchComboBox::clearHistory() setTextEntry(LLStringUtil::null); } -BOOL LLSearchComboBox::handleKeyHere(KEY key,MASK mask ) +bool LLSearchComboBox::handleKeyHere(KEY key,MASK mask ) { if(mTextEntry->hasFocus() && MASK_NONE == mask && KEY_DOWN == key) { diff --git a/indra/newview/llsearchcombobox.h b/indra/newview/llsearchcombobox.h index 68f3979532..d7920b5352 100644 --- a/indra/newview/llsearchcombobox.h +++ b/indra/newview/llsearchcombobox.h @@ -57,7 +57,7 @@ public: */ void clearHistory(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); ~LLSearchComboBox(); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 7ef05b42e0..873a724329 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -7394,7 +7394,7 @@ LLBBox LLSelectMgr::getBBoxOfSelection() const //----------------------------------------------------------------------------- // canUndo() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::canUndo() const +bool LLSelectMgr::canUndo() const { // Can edit or can move return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstUndoEnabledObject() != NULL; // HACK: casting away constness - MG; @@ -7413,7 +7413,7 @@ void LLSelectMgr::undo() //----------------------------------------------------------------------------- // canRedo() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::canRedo() const +bool LLSelectMgr::canRedo() const { return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstEditableObject() != NULL; // HACK: casting away constness - MG } @@ -7431,7 +7431,7 @@ void LLSelectMgr::redo() //----------------------------------------------------------------------------- // canDoDelete() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::canDoDelete() const +bool LLSelectMgr::canDoDelete() const { bool can_delete = false; // This function is "logically const" - it does not change state in @@ -7462,7 +7462,7 @@ void LLSelectMgr::doDelete() //----------------------------------------------------------------------------- // canDeselect() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::canDeselect() const +bool LLSelectMgr::canDeselect() const { return !mSelectedObjects->isEmpty(); } @@ -7477,7 +7477,7 @@ void LLSelectMgr::deselect() //----------------------------------------------------------------------------- // canDuplicate() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::canDuplicate() const +bool LLSelectMgr::canDuplicate() const { return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstCopyableObject() != NULL; // HACK: casting away constness - MG } diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index f89209b437..693eabd5f5 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -463,20 +463,20 @@ public: static void cleanupGlobals(); // LLEditMenuHandler interface - virtual BOOL canUndo() const; + virtual bool canUndo() const; virtual void undo(); - virtual BOOL canRedo() const; + virtual bool canRedo() const; virtual void redo(); - virtual BOOL canDoDelete() const; + virtual bool canDoDelete() const; virtual void doDelete(); virtual void deselect(); - virtual BOOL canDeselect() const; + virtual bool canDeselect() const; virtual void duplicate(); - virtual BOOL canDuplicate() const; + virtual bool canDuplicate() const; void clearSelections(); void update(); diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 293073c9a1..61bf39fa61 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -88,19 +88,19 @@ LLSetKeyBindDialog::~LLSetKeyBindDialog() } //virtual -BOOL LLSetKeyBindDialog::postBuild() +bool LLSetKeyBindDialog::postBuild() { childSetAction("SetEmpty", onBlank, this); childSetAction("Default", onDefault, this); childSetAction("Cancel", onCancel, this); - getChild<LLUICtrl>("Cancel")->setFocus(TRUE); + getChild<LLUICtrl>("Cancel")->setFocus(true); pCheckBox = getChild<LLCheckBoxCtrl>("apply_all"); pDescription = getChild<LLTextBase>("description"); - gFocusMgr.setKeystrokesOnly(TRUE); + gFocusMgr.setKeystrokesOnly(true); - return TRUE; + return true; } //virtual diff --git a/indra/newview/llsetkeybinddialog.h b/indra/newview/llsetkeybinddialog.h index 026f4b0c0a..1e2c585d64 100644 --- a/indra/newview/llsetkeybinddialog.h +++ b/indra/newview/llsetkeybinddialog.h @@ -59,7 +59,7 @@ public: LLSetKeyBindDialog(const LLSD& key); ~LLSetKeyBindDialog(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& data); /*virtual*/ void onClose(bool app_quiting); /*virtual*/ void draw(); diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp index 42b5c0b0e5..ebe3bc4007 100644 --- a/indra/newview/llsettingspicker.cpp +++ b/indra/newview/llsettingspicker.cpp @@ -88,10 +88,10 @@ LLFloaterSettingsPicker::~LLFloaterSettingsPicker() } //------------------------------------------------------------------------- -BOOL LLFloaterSettingsPicker::postBuild() +bool LLFloaterSettingsPicker::postBuild() { if (!LLFloater::postBuild()) - return FALSE; + return false; std::string prefix = getString(STR_TITLE_PREFIX); std::string label = getString(STR_TITLE_SETTINGS); @@ -137,7 +137,7 @@ BOOL LLFloaterSettingsPicker::postBuild() // update permission filter once UI is fully initialized mSavedFolderState.setApply(FALSE); - return TRUE; + return true; } void LLFloaterSettingsPicker::onClose(bool app_quitting) @@ -400,7 +400,7 @@ bool LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask) return result; } -BOOL LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask) +bool LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask) { if ((key == KEY_RETURN) && (mask == MASK_NONE)) { @@ -416,7 +416,7 @@ BOOL LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask) (*mCommitSignal)(this, res); } closeFloater(); - return TRUE; + return true; } } diff --git a/indra/newview/llsettingspicker.h b/indra/newview/llsettingspicker.h index f70da700e2..291af6a304 100644 --- a/indra/newview/llsettingspicker.h +++ b/indra/newview/llsettingspicker.h @@ -60,7 +60,7 @@ public: void setActive(bool active); - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onClose(bool app_quitting) override; virtual void draw() override; @@ -108,7 +108,7 @@ private: void onButtonCancel(); void onButtonSelect(); virtual bool handleDoubleClick(S32 x, S32 y, MASK mask) override; - BOOL handleKeyHere(KEY key, MASK mask) override; + bool handleKeyHere(KEY key, MASK mask) override; void onFocusLost() override; diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index aed9dba7ef..a1c12edf53 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -92,7 +92,7 @@ LLSidepanelAppearance::~LLSidepanelAppearance() } // virtual -BOOL LLSidepanelAppearance::postBuild() +bool LLSidepanelAppearance::postBuild() { mOpenOutfitBtn = getChild<LLButton>("openoutfit_btn"); mOpenOutfitBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onOpenOutfitButtonClicked, this)); @@ -142,7 +142,7 @@ BOOL LLSidepanelAppearance::postBuild() setWearablesLoading(gAgentWearables.isCOFChangeInProgress()); - return TRUE; + return true; } // virtual @@ -335,7 +335,7 @@ void LLSidepanelAppearance::showWearableEditPanel(LLViewerWearable *wearable /* toggleWearableEditPanel(TRUE, wearable, disable_camera_switch); } -void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible, const std::string& tab_name) +void LLSidepanelAppearance::toggleMyOutfitsPanel(bool visible, const std::string& tab_name) { if (!mPanelOutfitsInventory || (mPanelOutfitsInventory->getVisible() == visible && tab_name.empty())) @@ -361,7 +361,7 @@ void LLSidepanelAppearance::toggleMyOutfitsPanel(BOOL visible, const std::string } } -void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch) +void LLSidepanelAppearance::toggleOutfitEditPanel(bool visible, bool disable_camera_switch) { if (!mOutfitEdit || mOutfitEdit->getVisible() == visible) { @@ -386,7 +386,7 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_cam } } -void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearable *wearable, BOOL disable_camera_switch) +void LLSidepanelAppearance::toggleWearableEditPanel(bool visible, LLViewerWearable *wearable, bool disable_camera_switch) { if (!mEditWearable) { diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index bb9709a2b8..83c36933ea 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -46,7 +46,7 @@ public: LLSidepanelAppearance(); virtual ~LLSidepanelAppearance(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); void refreshCurrentOutfitName(const std::string& name = ""); @@ -73,9 +73,9 @@ private: void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); - void toggleMyOutfitsPanel(BOOL visible, const std::string& tab_name); - void toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch = FALSE); - void toggleWearableEditPanel(BOOL visible, LLViewerWearable* wearable = NULL, BOOL disable_camera_switch = FALSE); + void toggleMyOutfitsPanel(bool visible, const std::string& tab_name); + void toggleOutfitEditPanel(bool visible, bool disable_camera_switch = false); + void toggleWearableEditPanel(bool visible, LLViewerWearable* wearable = nullptr, bool disable_camera_switch = false); LLFilterEditor* mFilterEditor; LLPanelOutfitsInventory* mPanelOutfitsInventory; diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index e970f70e92..6485a42af5 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -153,7 +153,7 @@ void handleInventoryDisplayInboxChanged() } } -BOOL LLSidepanelInventory::postBuild() +bool LLSidepanelInventory::postBuild() { // UI elements from inventory panel { @@ -223,7 +223,7 @@ BOOL LLSidepanelInventory::postBuild() initInventoryViews(); } - return TRUE; + return true; } void LLSidepanelInventory::updateInbox() diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 08989bb6af..a982965ec5 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -53,7 +53,7 @@ public: void observeInboxCreation(); void observeInboxModifications(const LLUUID& inboxID); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any. diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp index 3b73b6b7dd..a54ee36dda 100644 --- a/indra/newview/llsidepanelinventorysubpanel.cpp +++ b/indra/newview/llsidepanelinventorysubpanel.cpp @@ -60,7 +60,7 @@ LLSidepanelInventorySubpanel::~LLSidepanelInventorySubpanel() } // virtual -BOOL LLSidepanelInventorySubpanel::postBuild() +bool LLSidepanelInventorySubpanel::postBuild() { mCancelBtn = findChild<LLButton>("cancel_btn"); @@ -68,10 +68,10 @@ BOOL LLSidepanelInventorySubpanel::postBuild() { mCancelBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onCancelButtonClicked, this)); } - return TRUE; + return true; } -void LLSidepanelInventorySubpanel::setVisible(BOOL visible) +void LLSidepanelInventorySubpanel::setVisible(bool visible) { if (visible) { diff --git a/indra/newview/llsidepanelinventorysubpanel.h b/indra/newview/llsidepanelinventorysubpanel.h index 0d18943cbf..f6c18c727e 100644 --- a/indra/newview/llsidepanelinventorysubpanel.h +++ b/indra/newview/llsidepanelinventorysubpanel.h @@ -43,8 +43,8 @@ public: LLSidepanelInventorySubpanel(const LLPanel::Params& p = getDefaultParams()); virtual ~LLSidepanelInventorySubpanel(); - /*virtual*/ void setVisible(BOOL visible); - virtual BOOL postBuild(); + /*virtual*/ void setVisible(bool visible); + virtual bool postBuild(); virtual void draw(); virtual void reset(); diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 7feacd530d..dc441f1c05 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -152,7 +152,7 @@ LLSidepanelItemInfo::~LLSidepanelItemInfo() } // virtual -BOOL LLSidepanelItemInfo::postBuild() +bool LLSidepanelItemInfo::postBuild() { mChangeThumbnailBtn = getChild<LLUICtrl>("change_thumbnail_btn"); mItemTypeIcon = getChild<LLIconCtrl>("item_type_icon"); @@ -182,7 +182,7 @@ BOOL LLSidepanelItemInfo::postBuild() // "Price" label for edit getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this, _1)); refresh(); - return TRUE; + return true; } void LLSidepanelItemInfo::setObjectID(const LLUUID& object_id) diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h index b916f44520..f82a75b09a 100644 --- a/indra/newview/llsidepaneliteminfo.h +++ b/indra/newview/llsidepaneliteminfo.h @@ -53,7 +53,7 @@ public: LLSidepanelItemInfo(const LLPanel::Params& p = getDefaultParams()); virtual ~LLSidepanelItemInfo(); - /*virtual*/ BOOL postBuild() override; + /*virtual*/ bool postBuild() override; /*virtual*/ void reset(); void setObjectID(const LLUUID& object_id); diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index fe61b7a02a..a96ac3578b 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -97,7 +97,7 @@ LLSidepanelTaskInfo::~LLSidepanelTaskInfo() } // virtual -BOOL LLSidepanelTaskInfo::postBuild() +bool LLSidepanelTaskInfo::postBuild() { mOpenBtn = getChild<LLButton>("open_btn"); mOpenBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onOpenButtonClicked, this)); @@ -160,10 +160,10 @@ BOOL LLSidepanelTaskInfo::postBuild() mDAN = getChild<LLUICtrl>("N:"); mDAF = getChild<LLUICtrl>("F:"); - return TRUE; + return true; } -/*virtual*/ void LLSidepanelTaskInfo::onVisibilityChange ( BOOL visible ) +/*virtual*/ void LLSidepanelTaskInfo::onVisibilityChange(bool visible) { if (visible) { diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index 2baafc67e7..8509edd8f1 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -49,8 +49,8 @@ public: LLSidepanelTaskInfo(); virtual ~LLSidepanelTaskInfo(); - BOOL postBuild() override; - void onVisibilityChange ( BOOL new_visibility ) override; + bool postBuild() override; + void onVisibilityChange (bool new_visibility) override; void setObjectSelection(LLObjectSelectionHandle selection); diff --git a/indra/newview/llsidetraypanelcontainer.cpp b/indra/newview/llsidetraypanelcontainer.cpp index e340333c2c..f475766d3c 100644 --- a/indra/newview/llsidetraypanelcontainer.cpp +++ b/indra/newview/llsidetraypanelcontainer.cpp @@ -81,7 +81,7 @@ void LLSideTrayPanelContainer::openPreviousPanel() } } -BOOL LLSideTrayPanelContainer::handleKeyHere(KEY key, MASK mask) +bool LLSideTrayPanelContainer::handleKeyHere(KEY key, MASK mask) { // No key press handling code for Panel Container - this disables // Tab Container's Alt + Left/Right Button tab switching. diff --git a/indra/newview/llsidetraypanelcontainer.h b/indra/newview/llsidetraypanelcontainer.h index 93a85ed374..e32e651b65 100644 --- a/indra/newview/llsidetraypanelcontainer.h +++ b/indra/newview/llsidetraypanelcontainer.h @@ -70,7 +70,7 @@ public: * Overrides LLTabContainer::handleKeyHere to disable panel switch on * Alt + Left/Right button press. */ - BOOL handleKeyHere(KEY key, MASK mask); + bool handleKeyHere(KEY key, MASK mask); /** * Name of parameter that stores panel name to open. diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 863cd13678..828572526b 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -56,16 +56,16 @@ #include "llworld.h" #include <boost/filesystem.hpp> -const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; +constexpr F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; -F32 SHINE_TIME = 0.5f; -F32 SHINE_WIDTH = 0.6f; -F32 SHINE_OPACITY = 0.3f; -F32 FALL_TIME = 0.6f; -S32 BORDER_WIDTH = 6; -S32 TOP_PANEL_HEIGHT = 30; +constexpr F32 SHINE_TIME = 0.5f; +constexpr F32 SHINE_WIDTH = 0.6f; +constexpr F32 SHINE_OPACITY = 0.3f; +constexpr F32 FALL_TIME = 0.6f; +constexpr S32 BORDER_WIDTH = 6; +constexpr S32 TOP_PANEL_HEIGHT = 30; -const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 +constexpr S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512 std::set<LLSnapshotLivePreview*> LLSnapshotLivePreview::sList; LLPointer<LLImageFormatted> LLSnapshotLivePreview::sSaveLocalImage = NULL; @@ -428,7 +428,7 @@ void LLSnapshotLivePreview::draw() } /*virtual*/ -void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLSnapshotLivePreview::reshape(S32 width, S32 height, bool called_from_parent) { LLRect old_rect = getRect(); LLView::reshape(width, height, called_from_parent); diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index 6e38a957b4..b667b6ebc4 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -59,7 +59,7 @@ public: void setContainer(LLView* container) { mViewContainer = container; } /*virtual*/ void draw(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent); void setSize(S32 w, S32 h); void setWidth(S32 w) { mWidth[mCurImageIndex] = w; } diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp index 1fc4308d10..d6fe6d43a1 100644 --- a/indra/newview/llsplitbutton.cpp +++ b/indra/newview/llsplitbutton.cpp @@ -67,7 +67,7 @@ void LLSplitButton::onFocusLost() LLUICtrl::onFocusLost(); } -void LLSplitButton::setFocus(BOOL b) +void LLSplitButton::setFocus(bool b) { LLUICtrl::setFocus(b); @@ -75,12 +75,12 @@ void LLSplitButton::setFocus(BOOL b) { if (mItemsPanel && mItemsPanel->getVisible()) { - mItemsPanel->setFocus(TRUE); + mItemsPanel->setFocus(true); } } } -void LLSplitButton::setEnabled(BOOL enabled) +void LLSplitButton::setEnabled(bool enabled) { LLView::setEnabled(enabled); mArrowBtn->setEnabled(enabled); diff --git a/indra/newview/llsplitbutton.h b/indra/newview/llsplitbutton.h index 15d7ddaf52..a4a6a179c1 100644 --- a/indra/newview/llsplitbutton.h +++ b/indra/newview/llsplitbutton.h @@ -71,8 +71,8 @@ public: //Overridden virtual void onFocusLost(); - virtual void setFocus(BOOL b); - virtual void setEnabled(BOOL enabled); + virtual void setFocus(bool b); + virtual void setEnabled(bool enabled); //Callbacks void onArrowBtnDown(); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 050a5228ca..b899db8557 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -159,7 +159,7 @@ bool LLStatusBar::handleRightMouseDown(S32 x, S32 y, MASK mask) return true; } -BOOL LLStatusBar::postBuild() +bool LLStatusBar::postBuild() { gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3)); @@ -235,22 +235,22 @@ BOOL LLStatusBar::postBuild() mPanelPresetsCameraPulldown = new LLPanelPresetsCameraPulldown(); addChild(mPanelPresetsCameraPulldown); mPanelPresetsCameraPulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); - mPanelPresetsCameraPulldown->setVisible(FALSE); + mPanelPresetsCameraPulldown->setVisible(false); mPanelPresetsPulldown = new LLPanelPresetsPulldown(); addChild(mPanelPresetsPulldown); mPanelPresetsPulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); - mPanelPresetsPulldown->setVisible(FALSE); + mPanelPresetsPulldown->setVisible(false); mPanelVolumePulldown = new LLPanelVolumePulldown(); addChild(mPanelVolumePulldown); mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); - mPanelVolumePulldown->setVisible(FALSE); + mPanelVolumePulldown->setVisible(false); mPanelNearByMedia = new LLPanelNearByMedia(); addChild(mPanelNearByMedia); mPanelNearByMedia->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); - mPanelNearByMedia->setVisible(FALSE); + mPanelNearByMedia->setVisible(false); updateBalancePanelPosition(); @@ -258,7 +258,7 @@ BOOL LLStatusBar::postBuild() mFilterEdit = getChild<LLSearchEditor>( "search_menu_edit" ); mSearchPanel = getChild<LLPanel>( "menu_search_panel" ); - BOOL search_panel_visible = gSavedSettings.getBOOL("MenuSearch"); + bool search_panel_visible = gSavedSettings.getBOOL("MenuSearch"); mSearchPanel->setVisible(search_panel_visible); mFilterEdit->setKeystrokeCallback(boost::bind(&LLStatusBar::onUpdateFilterTerm, this)); mFilterEdit->setCommitCallback(boost::bind(&LLStatusBar::onUpdateFilterTerm, this)); @@ -270,7 +270,7 @@ BOOL LLStatusBar::postBuild() updateMenuSearchPosition(); } - return TRUE; + return true; } // Per-frame updates of visibility diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 2e8ac76c16..1beba357ef 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -65,7 +65,7 @@ public: /*virtual*/ void draw(); /*virtual*/ bool handleRightMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); // MANIPULATORS void setBalance(S32 balance); @@ -104,7 +104,6 @@ private: void onMouseEnterPresets(); void onMouseEnterVolume(); void onMouseEnterNearbyMedia(); - void onClickScreen(S32 x, S32 y); static void onClickMediaToggle(void* data); static void onClickBalance(void* data); diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 0bfc034330..6e8a8e4849 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -50,7 +50,7 @@ LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(N } //--------------------------------------------------------------------------------- -BOOL LLSysWellWindow::postBuild() +bool LLSysWellWindow::postBuild() { mMessageList = getChild<LLFlatListView>("notification_list"); @@ -61,7 +61,7 @@ BOOL LLSysWellWindow::postBuild() } //--------------------------------------------------------------------------------- -void LLSysWellWindow::setMinimized(BOOL minimize) +void LLSysWellWindow::setMinimized(bool minimize) { LLTransientDockableFloater::setMinimized(minimize); } @@ -137,7 +137,7 @@ void LLSysWellWindow::initChannel() } //--------------------------------------------------------------------------------- -void LLSysWellWindow::setVisible(BOOL visible) +void LLSysWellWindow::setVisible(bool visible) { if (visible) { @@ -150,7 +150,7 @@ void LLSysWellWindow::setVisible(BOOL visible) } // do not show empty window - if (NULL == mMessageList || isWindowEmpty()) visible = FALSE; + if (NULL == mMessageList || isWindowEmpty()) visible = false; LLTransientDockableFloater::setVisible(visible); @@ -323,9 +323,9 @@ LLIMWellWindow* LLIMWellWindow::findInstance(const LLSD& key /*= LLSD()*/) return LLFloaterReg::findTypedInstance<LLIMWellWindow>("im_well_window", key); } -BOOL LLIMWellWindow::postBuild() +bool LLIMWellWindow::postBuild() { - BOOL rv = LLSysWellWindow::postBuild(); + bool rv = LLSysWellWindow::postBuild(); setTitle(getString("title_im_well_window")); LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findObjectChiclet, this, _1)); diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index d0c4a9acfd..12c1de7626 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -48,7 +48,7 @@ public: LLSysWellWindow(const LLSD& key); virtual ~LLSysWellWindow(); - BOOL postBuild(); + bool postBuild(); // other interface functions // check is window empty @@ -59,11 +59,11 @@ public: LLPanel * findItemByID(const LLUUID& id); // Operating with outfit - virtual void setVisible(BOOL visible); + virtual void setVisible(bool visible); void adjustWindowPosition(); /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 - /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void setMinimized(bool minimize); /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onStartUpToastClick(S32 x, S32 y, MASK mask); @@ -71,8 +71,8 @@ public: void setSysWellChiclet(LLSysWellChiclet* chiclet); // size constants for the window and for its elements - static const S32 MAX_WINDOW_HEIGHT = 200; - static const S32 MIN_WINDOW_WIDTH = 318; + static constexpr S32 MAX_WINDOW_HEIGHT = 200; + static constexpr S32 MIN_WINDOW_WIDTH = 318; protected: // init Window's channel @@ -111,7 +111,7 @@ public: static LLIMWellWindow* findInstance(const LLSD& key = LLSD()); static void initClass() { getInstance(); } - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); void addObjectRow(const LLUUID& notification_id, bool new_message = false); void removeObjectRow(const LLUUID& notification_id); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 70a1eb60cf..e220ba26f5 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -411,14 +411,14 @@ bool LLFloaterTexturePicker::updateImageStats() } // virtual -BOOL LLFloaterTexturePicker::handleDragAndDrop( +bool LLFloaterTexturePicker::handleDragAndDrop( S32 x, S32 y, MASK mask, - BOOL drop, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { - BOOL handled = FALSE; + bool handled = false; bool is_mesh = cargo_type == DAD_MESH; bool is_texture = cargo_type == DAD_TEXTURE; @@ -442,9 +442,9 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop( { LLInventoryItem *item = (LLInventoryItem *)cargo_data; - BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID()); - BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID()); - BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, + bool copy = item->getPermissions().allowCopyBy(gAgent.getID()); + bool mod = item->getPermissions().allowModifyBy(gAgent.getID()); + bool xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); PermissionMask item_perm_mask = 0; @@ -473,13 +473,13 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop( *accept = ACCEPT_NO; } - handled = TRUE; + handled = true; LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFloaterTexturePicker " << getName() << LL_ENDL; return handled; } -BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask) +bool LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask) { LLFolderView* root_folder = mInventoryPanel->getRootFolder(); @@ -494,23 +494,23 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask) LLFolderViewItem* itemp = mInventoryPanel->getItemByID(gInventory.getRootFolderID()); if (itemp) { - root_folder->setSelection(itemp, FALSE, FALSE); + root_folder->setSelection(itemp, false, false); } } root_folder->scrollToShowSelection(); // move focus to inventory proper - mInventoryPanel->setFocus(TRUE); + mInventoryPanel->setFocus(true); // treat this as a user selection of the first filtered result commitIfImmediateSet(); - return TRUE; + return true; } if (mInventoryPanel->hasFocus() && key == KEY_UP) { - mFilterEdit->focusFirstItem(TRUE); + mFilterEdit->focusFirstItem(true); } } @@ -537,7 +537,7 @@ void LLFloaterTexturePicker::onClose(bool app_quitting) } // virtual -BOOL LLFloaterTexturePicker::postBuild() +bool LLFloaterTexturePicker::postBuild() { LLFloater::postBuild(); @@ -635,7 +635,7 @@ BOOL LLFloaterTexturePicker::postBuild() getChild<LLComboBox>("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this); setBakeTextureEnabled(TRUE); - return TRUE; + return true; } // virtual @@ -1721,7 +1721,7 @@ void LLTextureCtrl::setFilterPermissionMasks(PermissionMask mask) setDnDFilterPermMask(mask); } -void LLTextureCtrl::setVisible( BOOL visible ) +void LLTextureCtrl::setVisible( bool visible ) { if( !visible ) { @@ -1730,7 +1730,7 @@ void LLTextureCtrl::setVisible( BOOL visible ) LLUICtrl::setVisible( visible ); } -void LLTextureCtrl::setEnabled( BOOL enabled ) +void LLTextureCtrl::setEnabled( bool enabled ) { LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get(); if( floaterp ) @@ -2072,12 +2072,12 @@ void LLTextureCtrl::setInventoryPickType(EPickInventoryType type) } } -BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, void *cargo_data, +bool LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { - BOOL handled = FALSE; + bool handled = false; // this downcast may be invalid - but if the second test below // returns true, then the cast was valid, and we can perform @@ -2125,7 +2125,7 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, *accept = ACCEPT_NO; } - handled = TRUE; + handled = true; LL_DEBUGS("UserInput") << "dragAndDrop handled by LLTextureCtrl " << getName() << LL_ENDL; return handled; diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index ab0d10552e..88837e5376 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -137,16 +137,16 @@ public: // LLView interface virtual bool handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, void *cargo_data, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); virtual bool handleHover(S32 x, S32 y, MASK mask); virtual bool handleUnicodeCharHere(llwchar uni_char); virtual void draw(); - virtual void setVisible( BOOL visible ); - virtual void setEnabled( BOOL enabled ); + virtual void setVisible( bool visible ); + virtual void setEnabled( bool enabled ); void setValid(BOOL valid); @@ -306,15 +306,15 @@ public: virtual ~LLFloaterTexturePicker(); // LLView overrides - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, void *cargo_data, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); /*virtual*/ void draw(); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ bool handleKeyHere(KEY key, MASK mask); // LLFloater overrides - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onClose(bool app_settings); diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 2b10f43cfb..821f3d04a2 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -972,7 +972,7 @@ void LLTextureView::draw() } -BOOL LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) +bool LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) { llassert(imagep); @@ -992,7 +992,7 @@ BOOL LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) addChild(barp); mTextureBars.push_back(barp); - return TRUE; + return true; } bool LLTextureView::handleMouseDown(S32 x, S32 y, MASK mask) @@ -1025,9 +1025,9 @@ bool LLTextureView::handleMouseUp(S32 x, S32 y, MASK mask) return false; } -BOOL LLTextureView::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLTextureView::handleKey(KEY key, MASK mask, bool called_from_parent) { - return FALSE; + return false; } diff --git a/indra/newview/lltextureview.h b/indra/newview/lltextureview.h index 5428dbd141..dff10d4fbe 100644 --- a/indra/newview/lltextureview.h +++ b/indra/newview/lltextureview.h @@ -45,18 +45,17 @@ protected: public: ~LLTextureView(); - /*virtual*/ void draw(); - /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); + void draw() override; + bool handleMouseDown(S32 x, S32 y, MASK mask) override; + bool handleMouseUp(S32 x, S32 y, MASK mask) override; + bool handleKey(KEY key, MASK mask, bool called_from_parent) override; static void addDebugImage(LLViewerFetchedTexture* image) { sDebugImages.insert(image); } static void removeDebugImage(LLViewerFetchedTexture* image) { sDebugImages.insert(image); } static void clearDebugImages() { sDebugImages.clear(); } private: - BOOL addBar(LLViewerFetchedTexture *image, BOOL hilight = FALSE); - void removeAllBars(); + bool addBar(LLViewerFetchedTexture *image, S32 hilight = 0); private: BOOL mFreezeView; diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp index a75bfcdcdf..3347463c57 100644 --- a/indra/newview/llthumbnailctrl.cpp +++ b/indra/newview/llthumbnailctrl.cpp @@ -176,7 +176,7 @@ void LLThumbnailCtrl::draw() LLUICtrl::draw(); } -void LLThumbnailCtrl::setVisible(BOOL visible) +void LLThumbnailCtrl::setVisible(bool visible) { if (!visible && mInited) { diff --git a/indra/newview/llthumbnailctrl.h b/indra/newview/llthumbnailctrl.h index ceb70ff7be..330dc1d9b9 100644 --- a/indra/newview/llthumbnailctrl.h +++ b/indra/newview/llthumbnailctrl.h @@ -64,7 +64,7 @@ public: virtual ~LLThumbnailCtrl(); virtual void draw() override; - void setVisible(BOOL visible) override; + void setVisible(bool visible) override; virtual void setValue(const LLSD& value ) override; void setInitImmediately(bool val) { mInitImmediately = val; } diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index bd39f5e057..269d30746f 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -151,7 +151,7 @@ LLToast::LLToast(const LLToast::Params& p) } } -void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent) +void LLToast::reshape(S32 width, S32 height, bool called_from_parent) { // We shouldn't use reshape from LLModalDialog since it changes toasts position. // Toasts position should be controlled only by toast screen channel, see LLScreenChannelBase. @@ -160,14 +160,14 @@ void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent) } //-------------------------------------------------------------------------- -BOOL LLToast::postBuild() +bool LLToast::postBuild() { if(!mCanFade) { mTimer->stop(); } - return TRUE; + return true; } //-------------------------------------------------------------------------- @@ -218,7 +218,7 @@ void LLToast::hide() } /*virtual*/ -void LLToast::setFocus(BOOL b) +void LLToast::setFocus(bool b) { if (b && !hasFocus() @@ -226,9 +226,9 @@ void LLToast::setFocus(BOOL b) && mWrapperPanel && !mWrapperPanel->getChildList()->empty()) { - LLModalDialog::setFocus(TRUE); + LLModalDialog::setFocus(true); // mostly for buttons - mPanel->setFocus(TRUE); + mPanel->setFocus(true); } else { @@ -391,7 +391,7 @@ void LLToast::draw() } //-------------------------------------------------------------------------- -void LLToast::setVisible(BOOL show) +void LLToast::setVisible(bool show) { if(mIsHidden) { diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 7164fa471b..11b6ef44bf 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -113,9 +113,9 @@ public: LLToast(const LLToast::Params& p); virtual ~LLToast(); - BOOL postBuild(); + bool postBuild(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); // Toast handlers virtual bool handleMouseDown(S32 x, S32 y, MASK mask); @@ -147,13 +147,13 @@ public: // virtual void draw(); // - virtual void setVisible(BOOL show); + virtual void setVisible(bool show); /*virtual*/ void setBackgroundOpaque(BOOL b); // virtual void hide(); - /*virtual*/ void setFocus(BOOL b); + /*virtual*/ void setFocus(bool b); /*virtual*/ void onFocusLost(); diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 8bf078477a..11a8a517e0 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -395,7 +395,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal LLTransientFloaterMgr::GLOBAL, this); } -void LLToastAlertPanel::setVisible( BOOL visible ) +void LLToastAlertPanel::setVisible( bool visible ) { // only make the "ding" sound if it's newly visible if( visible && !LLToastPanel::getVisible() ) @@ -448,7 +448,7 @@ BOOL LLToastAlertPanel::hasTitleBar() const return false; } -BOOL LLToastAlertPanel::handleKeyHere(KEY key, MASK mask ) +bool LLToastAlertPanel::handleKeyHere(KEY key, MASK mask ) { if( KEY_RETURN == key && mask == MASK_NONE ) { @@ -458,31 +458,31 @@ BOOL LLToastAlertPanel::handleKeyHere(KEY key, MASK mask ) // If we have a default button, click it when return is pressed defaultBtn->onCommit(); } - return TRUE; + return true; } else if (KEY_RIGHT == key) { - LLToastPanel::focusNextItem(FALSE); - return TRUE; + LLToastPanel::focusNextItem(false); + return true; } else if (KEY_LEFT == key) { - LLToastPanel::focusPrevItem(FALSE); - return TRUE; + LLToastPanel::focusPrevItem(false); + return true; } else if (KEY_TAB == key && mask == MASK_NONE) { - LLToastPanel::focusNextItem(FALSE); - return TRUE; + LLToastPanel::focusNextItem(false); + return true; } else if (KEY_TAB == key && mask == MASK_SHIFT) { - LLToastPanel::focusPrevItem(FALSE); - return TRUE; + LLToastPanel::focusPrevItem(false); + return true; } else { - return TRUE; + return true; } } diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h index bd34e40642..200db7208f 100644 --- a/indra/newview/lltoastalertpanel.h +++ b/indra/newview/lltoastalertpanel.h @@ -56,10 +56,10 @@ public: // User's responsibility to call show() after creating these. LLToastAlertPanel( LLNotificationPtr notep, bool is_modal ); - virtual BOOL handleKeyHere(KEY key, MASK mask ); + virtual bool handleKeyHere(KEY key, MASK mask ); virtual void draw(); - virtual void setVisible( BOOL visible ); + virtual void setVisible( bool visible ); void setCaution(BOOL val = TRUE) { mCaution = val; } // If mUnique==TRUE only one copy of this message should exist diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index bf3f4c1e88..2ea26265cd 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -474,7 +474,7 @@ LLIMToastNotifyPanel::~LLIMToastNotifyPanel() { } -void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) +void LLIMToastNotifyPanel::reshape(S32 width, S32 height, bool called_from_parent /* = true */) { LLToastPanel::reshape(width, height, called_from_parent); snapToMessageHeight(); diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index a5a637c6fa..a3bd327681 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -154,7 +154,7 @@ public: ~LLIMToastNotifyPanel(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); protected: LLTextBase* mParentText; diff --git a/indra/newview/lltoastscriptquestion.cpp b/indra/newview/lltoastscriptquestion.cpp index 7a3a1d8fd7..be5bb24b36 100644 --- a/indra/newview/lltoastscriptquestion.cpp +++ b/indra/newview/lltoastscriptquestion.cpp @@ -40,7 +40,7 @@ LLToastPanel(notification) buildFromFile("panel_script_question_toast.xml"); } -BOOL LLToastScriptQuestion::postBuild() +bool LLToastScriptQuestion::postBuild() { createButtons(); @@ -52,11 +52,11 @@ BOOL LLToastScriptQuestion::postBuild() snapToMessageHeight(); - return TRUE; + return true; } // virtual -void LLToastScriptQuestion::setFocus(BOOL b) +void LLToastScriptQuestion::setFocus(bool b) { LLToastPanel::setFocus(b); // toast can fade out and disappear with focus ON, so reset to default anyway diff --git a/indra/newview/lltoastscriptquestion.h b/indra/newview/lltoastscriptquestion.h index a756f88415..34abc14df9 100644 --- a/indra/newview/lltoastscriptquestion.h +++ b/indra/newview/lltoastscriptquestion.h @@ -36,10 +36,10 @@ class LLToastScriptQuestion : public LLToastPanel public: LLToastScriptQuestion(const LLNotificationPtr& notification); - virtual BOOL postBuild(); + bool postBuild() override; virtual ~LLToastScriptQuestion(){}; - /*virtual*/ void setFocus(BOOL b); + void setFocus(bool b) override; private: void snapToMessageHeight(); diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index f6628293ee..e2290b3a04 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -95,7 +95,7 @@ LLToolBarView::~LLToolBarView() saveToolbars(); } -BOOL LLToolBarView::postBuild() +bool LLToolBarView::postBuild() { mToolbars[LLToolBarEnums::TOOLBAR_LEFT] = getChild<LLToolBar>("toolbar_left"); mToolbars[LLToolBarEnums::TOOLBAR_LEFT]->getCenterLayoutPanel()->setLocationId(LLToolBarEnums::TOOLBAR_LEFT); @@ -117,7 +117,7 @@ BOOL LLToolBarView::postBuild() mToolbars[i]->setButtonRemoveCallback(boost::bind(LLToolBarView::onToolBarButtonRemoved,_1)); } - return TRUE; + return true; } S32 LLToolBarView::hasCommand(const LLCommandId& commandId) const diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index a230c2fdee..8669268752 100644 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -67,8 +67,8 @@ public: // Derived methods virtual ~LLToolBarView(); - virtual BOOL postBuild(); - virtual void draw(); + bool postBuild() override; + void draw() override; // Toolbar view interface with the rest of the world // Checks if the commandId is being used somewhere in one of the toolbars, returns LLToolBarEnums::EToolBarLocation diff --git a/indra/newview/lltoolbrush.h b/indra/newview/lltoolbrush.h index dbcb03f598..c006153657 100644 --- a/indra/newview/lltoolbrush.h +++ b/indra/newview/lltoolbrush.h @@ -69,7 +69,7 @@ public: void modifyLandInSelectionGlobal(); virtual void undo(); - virtual BOOL canUndo() const { return TRUE; } + virtual bool canUndo() const { return true; } protected: void brush( void ); diff --git a/indra/newview/lltrackpicker.cpp b/indra/newview/lltrackpicker.cpp index fe6256a8a9..4cdf9516e8 100644 --- a/indra/newview/lltrackpicker.cpp +++ b/indra/newview/lltrackpicker.cpp @@ -57,11 +57,11 @@ LLFloaterTrackPicker::~LLFloaterTrackPicker() { } -BOOL LLFloaterTrackPicker::postBuild() +bool LLFloaterTrackPicker::postBuild() { childSetAction(BTN_CANCEL, [this](LLUICtrl*, const LLSD& param){ onButtonCancel(); }); childSetAction(BTN_SELECT, [this](LLUICtrl*, const LLSD& param){ onButtonSelect(); }); - return TRUE; + return true; } void LLFloaterTrackPicker::onClose(bool app_quitting) diff --git a/indra/newview/lltrackpicker.h b/indra/newview/lltrackpicker.h index dab3b72915..49cc1a5c64 100644 --- a/indra/newview/lltrackpicker.h +++ b/indra/newview/lltrackpicker.h @@ -39,7 +39,7 @@ public: LLFloaterTrackPicker(LLView * owner, const LLSD ¶ms = LLSD()); virtual ~LLFloaterTrackPicker() override; - virtual BOOL postBuild() override; + virtual bool postBuild() override; virtual void onClose(bool app_quitting) override; void showPicker(const LLSD &args); diff --git a/indra/newview/lltransientdockablefloater.cpp b/indra/newview/lltransientdockablefloater.cpp index c108f1dfdc..21c4769a5d 100644 --- a/indra/newview/lltransientdockablefloater.cpp +++ b/indra/newview/lltransientdockablefloater.cpp @@ -52,7 +52,7 @@ LLTransientDockableFloater::~LLTransientDockableFloater() } } -void LLTransientDockableFloater::setVisible(BOOL visible) +void LLTransientDockableFloater::setVisible(bool visible) { LLView* dock = getDockWidget(); if(visible && isDocked()) diff --git a/indra/newview/lltransientdockablefloater.h b/indra/newview/lltransientdockablefloater.h index 5fb79597f4..4d3bf9fa22 100644 --- a/indra/newview/lltransientdockablefloater.h +++ b/indra/newview/lltransientdockablefloater.h @@ -45,8 +45,8 @@ public: const LLSD& key, const Params& params = getDefaultParams()); virtual ~LLTransientDockableFloater(); - /*virtual*/ void setVisible(BOOL visible); - /* virtual */void setDocked(bool docked, bool pop_on_undock = true); + void setVisible(bool visible) override; + void setDocked(bool docked, bool pop_on_undock = true) override; virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::GLOBAL; } }; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index de519a03c2..67dcaaed6e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3498,13 +3498,13 @@ LLViewerMediaImpl::cut() //////////////////////////////////////////////////////////////////////////////// // virtual -BOOL +bool LLViewerMediaImpl::canCut() const { if (mMediaSource) return mMediaSource->canCut(); else - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////// @@ -3518,13 +3518,13 @@ LLViewerMediaImpl::copy() //////////////////////////////////////////////////////////////////////////////// // virtual -BOOL +bool LLViewerMediaImpl::canCopy() const { if (mMediaSource) return mMediaSource->canCopy(); else - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////// @@ -3538,13 +3538,13 @@ LLViewerMediaImpl::paste() //////////////////////////////////////////////////////////////////////////////// // virtual -BOOL +bool LLViewerMediaImpl::canPaste() const { if (mMediaSource) return mMediaSource->canPaste(); else - return FALSE; + return false; } void LLViewerMediaImpl::setUpdated(BOOL updated) diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 56216253d9..d737725ad0 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -342,13 +342,13 @@ public: // LLEditMenuHandler overrides /*virtual*/ void cut(); - /*virtual*/ BOOL canCut() const; + /*virtual*/ bool canCut() const; /*virtual*/ void copy(); - /*virtual*/ BOOL canCopy() const; + /*virtual*/ bool canCopy() const; /*virtual*/ void paste(); - /*virtual*/ BOOL canPaste() const; + /*virtual*/ bool canPaste() const; void addObject(LLVOVolume* obj) ; void removeObject(LLVOVolume* obj) ; diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index f9425a9269..dfd5c1283f 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -321,7 +321,7 @@ void LLViewerMediaFocus::onFocusLost() LLFocusableElement::onFocusLost(); } -BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLViewerMediaFocus::handleKey(KEY key, MASK mask, bool called_from_parent) { LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); if(media_impl) @@ -346,7 +346,7 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) return true; } -BOOL LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) +bool LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, bool called_from_parent) { LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); if (media_impl) @@ -358,7 +358,7 @@ BOOL LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent -BOOL LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) +bool LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, bool called_from_parent) { LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); if(media_impl) diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h index effd08a559..661c9a46be 100644 --- a/indra/newview/llviewermediafocus.h +++ b/indra/newview/llviewermediafocus.h @@ -55,9 +55,9 @@ public: void clearHover(); /*virtual*/ bool getFocus(); - /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); - /*virtual*/ BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent); - /*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); + /*virtual*/ bool handleKey(KEY key, MASK mask, bool called_from_parent); + /*virtual*/ bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); + /*virtual*/ bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); BOOL handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y); BOOL handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f0d5ab43d2..9c1656b7ed 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6153,7 +6153,7 @@ void show_debug_menus() void toggle_debug_menus(void*) { - BOOL visible = ! gSavedSettings.getBOOL("UseDebugMenus"); + bool visible = ! gSavedSettings.getBOOL("UseDebugMenus"); gSavedSettings.setBOOL("UseDebugMenus", visible); show_debug_menus(); } @@ -8489,18 +8489,18 @@ LLViewerMenuHolderGL::LLViewerMenuHolderGL(const LLViewerMenuHolderGL::Params& p : LLMenuHolderGL(p) {} -BOOL LLViewerMenuHolderGL::hideMenus() +bool LLViewerMenuHolderGL::hideMenus() { - BOOL handled = FALSE; + bool handled = false; if (LLMenuHolderGL::hideMenus()) { - handled = TRUE; + handled = true; } // drop pie menu selection - mParcelSelection = NULL; - mObjectSelection = NULL; + mParcelSelection = nullptr; + mObjectSelection = nullptr; if (gMenuBarView) { diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index b1ab7a2688..63044bd057 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -160,7 +160,7 @@ public: LLViewerMenuHolderGL(const Params& p); - virtual BOOL hideMenus(); + virtual bool hideMenus(); void setParcelSelection(LLSafeHandle<LLParcelSelection> selection); void setObjectSelection(LLSafeHandle<LLObjectSelection> selection); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 97c5037053..f46544e1ef 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -622,7 +622,7 @@ public: mItem = item; } - virtual BOOL execute( LLTextBase* editor, S32* delta ) + virtual bool execute( LLTextBase* editor, S32* delta ) { LLViewerTextEditor* viewer_editor = (LLViewerTextEditor*)editor; // Take this opportunity to remove any unused embedded items from this editor @@ -634,7 +634,7 @@ public: *delta = insert(editor, getPosition(), ws ); return (*delta != 0); } - return FALSE; + return false; } virtual S32 undo( LLTextBase* editor ) @@ -650,7 +650,7 @@ public: insert(editor, getPosition(), ws ); return getPosition() + 1; } - virtual BOOL hasExtCharValue( llwchar value ) const + virtual bool hasExtCharValue( llwchar value ) const { return (value == mExtCharValue); } @@ -707,7 +707,7 @@ void LLViewerTextEditor::makePristine() LLTextEditor::makePristine(); } -void LLViewerTextEditor::onVisibilityChange( BOOL new_visibility ) +void LLViewerTextEditor::onVisibilityChange( bool new_visibility ) { LLUICtrl::onVisibilityChange(new_visibility); } @@ -856,19 +856,19 @@ bool LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) // virtual -BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, void *cargo_data, +bool LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg) { - BOOL handled = FALSE; + bool handled = false; LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); if (LLToolDragAndDrop::SOURCE_NOTECARD == source) { // We currently do not handle dragging items from one notecard to another // since items in a notecard must be in Inventory to be verified. See DEV-2891. - return FALSE; + return false; } if (getEnabled() && acceptsTextInput()) @@ -951,7 +951,7 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, *accept = ACCEPT_NO; } - handled = TRUE; + handled = true; LL_DEBUGS("UserInput") << "dragAndDrop handled by LLViewerTextEditor " << getName() << LL_ENDL; return handled; @@ -1355,13 +1355,13 @@ bool LLViewerTextEditor::hasEmbeddedInventory() //////////////////////////////////////////////////////////////////////////// -BOOL LLViewerTextEditor::importBuffer( const char* buffer, S32 length ) +bool LLViewerTextEditor::importBuffer( const char* buffer, S32 length ) { LLMemoryStream str((U8*)buffer, length); return importStream(str); } -BOOL LLViewerTextEditor::exportBuffer( std::string& buffer ) +bool LLViewerTextEditor::exportBuffer( std::string& buffer ) { LLNotecard nc(LLNotecard::MAX_SIZE); @@ -1378,6 +1378,6 @@ BOOL LLViewerTextEditor::exportBuffer( std::string& buffer ) buffer = out_stream.str(); - return TRUE; + return true; } diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h index 51680028db..7bc9a91652 100644 --- a/indra/newview/llviewertexteditor.h +++ b/indra/newview/llviewertexteditor.h @@ -47,7 +47,7 @@ public: virtual void makePristine(); - /*virtual*/ void onVisibilityChange( BOOL new_visibility ); + /*virtual*/ void onVisibilityChange( bool new_visibility ); // mousehandler overrides virtual bool handleMouseDown(S32 x, S32 y, MASK mask); @@ -55,14 +55,14 @@ public: virtual bool handleHover(S32 x, S32 y, MASK mask); virtual bool handleDoubleClick(S32 x, S32 y, MASK mask ); - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, - BOOL drop, EDragAndDropType cargo_type, + virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, + bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); const class LLInventoryItem* getDragItem() const { return mDragItem; } - virtual BOOL importBuffer(const char* buffer, S32 length); + virtual bool importBuffer(const char* buffer, S32 length); virtual bool importStream(std::istream& str); - virtual BOOL exportBuffer(std::string& buffer); + virtual bool exportBuffer(std::string& buffer); virtual void onValueChange(S32 start, S32 end); void setNotecardInfo(const LLUUID& notecard_item_id, const LLUUID& object_id, const LLUUID& preview_id) diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index d93c7128b5..e06b3d1324 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -100,7 +100,7 @@ LLPanelWearableOutfitItem::Params::Params() { } -BOOL LLPanelWearableOutfitItem::postBuild() +bool LLPanelWearableOutfitItem::postBuild() { LLPanelWearableListItem::postBuild(); @@ -115,7 +115,7 @@ BOOL LLPanelWearableOutfitItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); } - return TRUE; + return true; } bool LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask) @@ -293,7 +293,7 @@ LLPanelClothingListItem::~LLPanelClothingListItem() { } -BOOL LLPanelClothingListItem::postBuild() +bool LLPanelClothingListItem::postBuild() { LLPanelDeletableWearableListItem::postBuild(); @@ -305,7 +305,7 @@ BOOL LLPanelClothingListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } ////////////////////////////////////////////////////////////////////////// @@ -370,7 +370,7 @@ LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem() { } -BOOL LLPanelBodyPartsListItem::postBuild() +bool LLPanelBodyPartsListItem::postBuild() { LLPanelInventoryListItemBase::postBuild(); @@ -380,7 +380,7 @@ BOOL LLPanelBodyPartsListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDeletableWearableListItem(&typeid(LLPanelDeletableWearableListItem::Params), "deletable_wearable_list_item"); @@ -413,7 +413,7 @@ LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInven setSeparatorVisible(true); } -BOOL LLPanelDeletableWearableListItem::postBuild() +bool LLPanelDeletableWearableListItem::postBuild() { LLPanelWearableListItem::postBuild(); @@ -426,7 +426,7 @@ BOOL LLPanelDeletableWearableListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } @@ -486,7 +486,7 @@ LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableTyp return list_item; } -BOOL LLPanelDummyClothingListItem::postBuild() +bool LLPanelDummyClothingListItem::postBuild() { addWidgetToRightSide("btn_add_panel"); @@ -499,7 +499,7 @@ BOOL LLPanelDummyClothingListItem::postBuild() setWidgetsVisible(false); reshapeWidgets(); - return TRUE; + return true; } LLWearableType::EType LLPanelDummyClothingListItem::getWearableType() const diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 3e240107e5..e3fa732658 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -83,7 +83,7 @@ public: Params(); }; - BOOL postBuild(); + bool postBuild(); bool handleDoubleClick(S32 x, S32 y, MASK mask); static LLPanelWearableOutfitItem* create(LLViewerInventoryItem* item, @@ -124,7 +124,7 @@ public: virtual ~LLPanelDeletableWearableListItem() {}; - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** * Make button visible during mouse over event. @@ -177,7 +177,7 @@ public: virtual ~LLPanelClothingListItem(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** * Make button visible during mouse over event. @@ -212,7 +212,7 @@ public: virtual ~LLPanelBodyPartsListItem(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /** * Make button visible during mouse over event. @@ -241,7 +241,7 @@ public: }; static LLPanelDummyClothingListItem* create(LLWearableType::EType w_type); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); LLWearableType::EType getWearableType() const; protected: diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 433e882d8f..2a44c7e4aa 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -60,21 +60,21 @@ #include "llglheaders.h" // # Constants -static const F32 MAP_DEFAULT_SCALE = 128.f; -static const F32 MAP_ITERP_TIME_CONSTANT = 0.75f; -static const F32 MAP_ZOOM_ACCELERATION_TIME = 0.3f; -static const F32 MAP_ZOOM_MAX_INTERP = 0.5f; -static const F32 MAP_SCALE_SNAP_THRESHOLD = 0.005f; +static constexpr F32 MAP_DEFAULT_SCALE = 128.f; +static constexpr F32 MAP_ITERP_TIME_CONSTANT = 0.75f; +static constexpr F32 MAP_ZOOM_ACCELERATION_TIME = 0.3f; +static constexpr F32 MAP_ZOOM_MAX_INTERP = 0.5f; +static constexpr F32 MAP_SCALE_SNAP_THRESHOLD = 0.005f; // Basically a C++ implementation of the OCEAN_COLOR defined in mapstitcher.py // Please ensure consistency between those 2 files (TODO: would be better to get that color from an asset source...) // OCEAN_COLOR = "#1D475F" -const F32 OCEAN_RED = (F32)(0x1D)/255.f; -const F32 OCEAN_GREEN = (F32)(0x47)/255.f; -const F32 OCEAN_BLUE = (F32)(0x5F)/255.f; +constexpr F32 OCEAN_RED = (F32)(0x1D)/255.f; +constexpr F32 OCEAN_GREEN = (F32)(0x47)/255.f; +constexpr F32 OCEAN_BLUE = (F32)(0x5F)/255.f; -const F32 GODLY_TELEPORT_HEIGHT = 200.f; -const F32 BIG_DOT_RADIUS = 5.f; +constexpr F32 GODLY_TELEPORT_HEIGHT = 200.f; +constexpr F32 BIG_DOT_RADIUS = 5.f; BOOL LLWorldMapView::sHandledLastClick = FALSE; LLUIImagePtr LLWorldMapView::sAvatarSmallImage = NULL; @@ -194,7 +194,7 @@ LLWorldMapView::LLWorldMapView() : clearLastClick(); } -BOOL LLWorldMapView::postBuild() +bool LLWorldMapView::postBuild() { mTextBoxNorth = getChild<LLTextBox> ("floater_map_north"); mTextBoxEast = getChild<LLTextBox> ("floater_map_east"); @@ -617,7 +617,7 @@ void LLWorldMapView::draw() //virtual -void LLWorldMapView::setVisible(BOOL visible) +void LLWorldMapView::setVisible(bool visible) { LLPanel::setVisible(visible); if (!visible) @@ -1461,7 +1461,7 @@ void LLWorldMapView::updateDirections() } -void LLWorldMapView::reshape( S32 width, S32 height, BOOL called_from_parent ) +void LLWorldMapView::reshape( S32 width, S32 height, bool called_from_parent ) { LLView::reshape( width, height, called_from_parent ); } diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h index c06256f57c..3d982097fc 100644 --- a/indra/newview/llworldmapview.h +++ b/indra/newview/llworldmapview.h @@ -53,10 +53,10 @@ public: LLWorldMapView(); virtual ~LLWorldMapView(); - virtual BOOL postBuild(); + virtual bool postBuild(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE ); - virtual void setVisible(BOOL visible); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true ); + virtual void setVisible(bool visible); virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index e9e9caa9bd..6d3e226011 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -235,7 +235,7 @@ static LLEventPump * gTOSReplyPump = NULL; LLPointer<LLSecAPIHandler> gSecAPIHandler; //static -LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus) +LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, bool focus) { gTOSType = name; gTOSReplyPump = &LLEventPumps::instance().obtain(key["reply_pump"]); |