From 7e098d4bff1844b06091212d3fe8dccbe7c6b936 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sun, 15 Mar 2020 02:03:46 -0400 Subject: [PATCH] Kill LLMenuButton dynamic_cast and smol cleanup to handle usage --- indra/llui/llfolderview.cpp | 3 ++- indra/llui/llmenubutton.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 894b4129ee8..f71bfa4837a 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -275,6 +275,7 @@ LLFolderView::~LLFolderView( void ) mStatusTextBox = NULL; if (mPopupMenuHandle.get()) mPopupMenuHandle.get()->die(); + mPopupMenuHandle.markDead(); mAutoOpenItems.removeAllNodes(); clearSelection(); @@ -1534,7 +1535,7 @@ void LLFolderView::deleteAllChildren() { closeRenamer(); if (mPopupMenuHandle.get()) mPopupMenuHandle.get()->die(); - mPopupMenuHandle = LLHandle<LLView>(); + mPopupMenuHandle.markDead(); mScrollContainer = NULL; mRenameItem = NULL; mRenamer = NULL; diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp index 303afcda151..0f1ffbd4c1a 100644 --- a/indra/llui/llmenubutton.cpp +++ b/indra/llui/llmenubutton.cpp @@ -83,7 +83,7 @@ void LLMenuButton::hideMenu() LLToggleableMenu* LLMenuButton::getMenu() { - return dynamic_cast<LLToggleableMenu*>(mMenuHandle.get()); + return static_cast<LLToggleableMenu*>(mMenuHandle.get()); } void LLMenuButton::setMenu(const std::string& menu_filename, EMenuPosition position /*MP_TOP_LEFT*/) -- GitLab