From 2b31dad40026d8078ea30d0da0656a4078d0f5b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Fri, 9 Feb 2024 22:26:02 +0100 Subject: miscellaneous: BOOL (int) to real bool --- indra/newview/llpanelobjectinventory.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llpanelobjectinventory.cpp') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index f3a41f2e25..18e134e4e4 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -128,7 +128,7 @@ public: virtual void selectItem() {} virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {} virtual BOOL isItemRenameable() const; - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); virtual BOOL isItemMovable() const; virtual BOOL isItemRemovable() const; virtual BOOL removeItem(); @@ -304,7 +304,7 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const return FALSE; } -BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) +bool LLTaskInvFVBridge::renameItem(const std::string& new_name) { LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) @@ -322,7 +322,7 @@ BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) false); } } - return TRUE; + return true; } BOOL LLTaskInvFVBridge::isItemMovable() const @@ -333,7 +333,7 @@ BOOL LLTaskInvFVBridge::isItemMovable() const // return TRUE; //} //return FALSE; - return TRUE; + return true; } BOOL LLTaskInvFVBridge::isItemRemovable() const @@ -587,7 +587,7 @@ public: virtual const std::string& getDisplayName() const; virtual BOOL isItemRenameable() const; // virtual BOOL isItemCopyable() const { return FALSE; } - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); virtual BOOL isItemRemovable() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool hasChildren() const; @@ -643,9 +643,9 @@ BOOL LLTaskCategoryBridge::isItemRenameable() const return FALSE; } -BOOL LLTaskCategoryBridge::renameItem(const std::string& new_name) +bool LLTaskCategoryBridge::renameItem(const std::string& new_name) { - return FALSE; + return false; } BOOL LLTaskCategoryBridge::isItemRemovable() const @@ -906,7 +906,7 @@ public: LLTaskInvFVBridge(panel, uuid, name) {} virtual BOOL isItemRenameable() const; - virtual BOOL renameItem(const std::string& new_name); + virtual bool renameItem(const std::string& new_name); }; BOOL LLTaskCallingCardBridge::isItemRenameable() const @@ -914,9 +914,9 @@ BOOL LLTaskCallingCardBridge::isItemRenameable() const return FALSE; } -BOOL LLTaskCallingCardBridge::renameItem(const std::string& new_name) +bool LLTaskCallingCardBridge::renameItem(const std::string& new_name) { - return FALSE; + return false; } -- cgit v1.2.3 From a5261a5fa8fad810ecb5c260d92c3e771822bf58 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Feb 2024 23:46:23 +0100 Subject: Convert BOOL to bool in llui --- indra/newview/llpanelobjectinventory.cpp | 124 +++++++++++++++---------------- 1 file changed, 62 insertions(+), 62 deletions(-) (limited to 'indra/newview/llpanelobjectinventory.cpp') 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& 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 > panel_two_uuids_list_t; typedef std::pair 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& 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; } -- cgit v1.2.3 From 60d3dd98a44230c21803c1606552ee098ed9fa7c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 21 Feb 2024 21:05:14 +0100 Subject: Convert remaining BOOL to bool --- indra/newview/llpanelobjectinventory.cpp | 124 +++++++++++++++---------------- 1 file changed, 62 insertions(+), 62 deletions(-) (limited to 'indra/newview/llpanelobjectinventory.cpp') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 4af8f9efdc..40f2ecd064 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -123,7 +123,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual void openItem(); - virtual BOOL canOpenItem() const { return FALSE; } + virtual bool canOpenItem() const { return false; } virtual void closeItem() {} virtual void selectItem() {} virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {} @@ -142,8 +142,8 @@ public: virtual void pasteLinkFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual void performAction(LLInventoryModel* model, std::string action); - 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 LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; } virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } virtual LLSettingsType::type_e getSettingsType() const { return LLSettingsType::ST_NONE; } @@ -153,7 +153,7 @@ public: // LLDragAndDropBridge functionality virtual LLToolDragAndDrop::ESource getDragSource() const { return LLToolDragAndDrop::SOURCE_WORLD; } - virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; + virtual bool startDrag(EDragAndDropType* type, LLUUID* id) const; virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, @@ -236,9 +236,9 @@ const std::string& LLTaskInvFVBridge::getDisplayName() const } const LLPermissions& perm(item->getPermissions()); - BOOL copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); - BOOL mod = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE); - BOOL xfer = gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE); + bool copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); + bool mod = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE); + bool xfer = gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE); if(!copy) { @@ -277,7 +277,7 @@ void LLTaskInvFVBridge::setCreationDate(time_t creation_date_utc) LLUIImagePtr LLTaskInvFVBridge::getIcon() const { - const BOOL item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS); + const bool item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS); return LLInventoryIcon::getIcon(mAssetType, mInventoryType, 0, item_is_multi ); } @@ -473,7 +473,7 @@ void LLTaskInvFVBridge::pasteLinkFromClipboard() { } -BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const +bool LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { //LL_INFOS() << "LLTaskInvFVBridge::startDrag()" << LL_ENDL; if(mPanel) @@ -493,7 +493,7 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const // due to a race condition and possible exploit where // attached objects do not update their inventory items // when their contents are manipulated - return FALSE; + return false; } if((can_copy && perm.allowTransferTo(gAgent.getID())) || object->permYouOwner()) @@ -503,12 +503,12 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const *type = LLViewerAssetType::lookupDragAndDropType(inv->getType()); *id = inv->getUUID(); - return TRUE; + return true; } } } } - return FALSE; + return false; } bool LLTaskInvFVBridge::dragOrDrop(MASK mask, bool drop, @@ -586,17 +586,17 @@ public: virtual LLUIImagePtr getIcon() const; virtual const std::string& getDisplayName() const; virtual bool isItemRenameable() const; - // virtual BOOL isItemCopyable() const { return FALSE; } + // virtual bool isItemCopyable() const { return false; } virtual bool renameItem(const std::string& new_name); 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 startDrag(EDragAndDropType* type, LLUUID* id) const; virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual EInventorySortGroup getSortGroup() const { return SG_NORMAL_FOLDER; } }; @@ -662,8 +662,8 @@ void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 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 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; } @@ -671,7 +671,7 @@ void LLTaskCategoryBridge::openItem() { } -BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const +bool LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { //LL_INFOS() << "LLTaskInvFVBridge::startDrag()" << LL_ENDL; if(mPanel && mUUID.notNull()) @@ -680,15 +680,15 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const if(object) { const LLInventoryObject* cat = object->getInventoryObject(mUUID); - if ( (cat) && (move_inv_category_world_to_agent(mUUID, LLUUID::null, FALSE)) ) + if ( (cat) && (move_inv_category_world_to_agent(mUUID, LLUUID::null, false)) ) { *type = LLViewerAssetType::lookupDragAndDropType(cat->getType()); *id = mUUID; - return TRUE; + return true; } } } - return FALSE; + return false; } bool LLTaskCategoryBridge::dragOrDrop(MASK mask, bool drop, @@ -746,7 +746,7 @@ bool LLTaskCategoryBridge::dragOrDrop(MASK mask, bool drop, LLViewerInventoryItem* item = (LLViewerInventoryItem*)cargo_data; // rez in the script active by default, rez in // inactive if the control key is being held down. - BOOL active = ((mask & MASK_CONTROL) == 0); + bool active = ((mask & MASK_CONTROL) == 0); LLToolDragAndDrop::dropScript(object, item, active, LLToolDragAndDrop::getInstance()->getSource(), LLToolDragAndDrop::getInstance()->getSourceID()); @@ -771,7 +771,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); }; @@ -803,7 +803,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); @@ -932,7 +932,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - //static BOOL enableIfCopyable( void* userdata ); + //static bool enableIfCopyable( void* userdata ); }; class LLTaskLSLBridge : public LLTaskScriptBridge @@ -943,7 +943,7 @@ public: const std::string& name) : LLTaskScriptBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual bool removeItem(); //virtual void buildContextMenu(LLMenuGL& menu); @@ -1008,7 +1008,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual bool removeItem(); }; @@ -1023,7 +1023,7 @@ void LLTaskNotecardBridge::openItem() // Note: even if we are not allowed to modify copyable notecard, we should be able to view it LLInventoryItem *item = dynamic_cast(object->getInventoryObject(mUUID)); - BOOL item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); + bool item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); if( item_copy || object->permModify() || gAgent.isGodlike()) @@ -1057,7 +1057,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual bool removeItem(); }; @@ -1091,7 +1091,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual bool removeItem(); }; @@ -1135,7 +1135,7 @@ public: LLUIImagePtr LLTaskWearableBridge::getIcon() const { - return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE ); + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, false ); } ///---------------------------------------------------------------------------- @@ -1157,7 +1157,7 @@ public: LLUIImagePtr LLTaskSettingsBridge::getIcon() const { - return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE); + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, false); } LLSettingsType::type_e LLTaskSettingsBridge::getSettingsType() const @@ -1177,7 +1177,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - BOOL canOpenItem() const override { return TRUE; } + bool canOpenItem() const override { return true; } void openItem() override; bool removeItem() override; }; @@ -1192,7 +1192,7 @@ void LLTaskMaterialBridge::openItem() // Note: even if we are not allowed to modify copyable notecard, we should be able to view it LLInventoryItem *item = dynamic_cast(object->getInventoryObject(mUUID)); - BOOL item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); + bool item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); if( item_copy || object->permModify() || gAgent.isGodlike()) @@ -1205,7 +1205,7 @@ void LLTaskMaterialBridge::openItem() { mat->setObjectID(mPanel->getTaskUUID()); mat->openFloater(floater_key); - mat->setFocus(TRUE); + mat->setFocus(true); } } } @@ -1333,9 +1333,9 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par LLPanel(p), mScroller(NULL), mFolders(NULL), - mHaveInventory(FALSE), - mIsInventoryEmpty(TRUE), - mInventoryNeedsUpdate(FALSE), + mHaveInventory(false), + mIsInventoryEmpty(true), + mInventoryNeedsUpdate(false), mInventoryViewModel(p.name), mShowRootFolder(p.show_root_folder) { @@ -1377,8 +1377,8 @@ void LLPanelObjectInventory::doToSelected(const LLSD& userdata) void LLPanelObjectInventory::clearContents() { - mHaveInventory = FALSE; - mIsInventoryEmpty = TRUE; + mHaveInventory = false; + mIsInventoryEmpty = true; if (LLToolDragAndDrop::getInstance() && LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_WORLD) { LLToolDragAndDrop::getInstance()->endDrag(); @@ -1457,7 +1457,7 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object, // << " task UUID: " << object->mID << LL_ENDL; if(mTaskUUID == object->mID) { - mInventoryNeedsUpdate = TRUE; + mInventoryNeedsUpdate = true; } } @@ -1469,7 +1469,7 @@ void LLPanelObjectInventory::updateInventory() // We're still interested in this task's inventory. std::vector selected_item_ids; std::set selected_items; - BOOL inventory_has_focus = FALSE; + bool inventory_has_focus = false; if (mHaveInventory && mFolders) { selected_items = mFolders->getSelectionList(); @@ -1492,14 +1492,14 @@ void LLPanelObjectInventory::updateInventory() if (inventory_root) { reset(); - mIsInventoryEmpty = FALSE; + mIsInventoryEmpty = false; createFolderViews(inventory_root, contents); - mFolders->setEnabled(TRUE); + mFolders->setEnabled(true); } else { // TODO: create an empty inventory - mIsInventoryEmpty = TRUE; + mIsInventoryEmpty = true; } mHaveInventory = !mIsInventoryEmpty || !objectp->isInventoryDirty(); @@ -1514,8 +1514,8 @@ void LLPanelObjectInventory::updateInventory() else { // TODO: create an empty inventory - mIsInventoryEmpty = TRUE; - mHaveInventory = TRUE; + mIsInventoryEmpty = true; + mHaveInventory = true; } // restore previous selection @@ -1530,12 +1530,12 @@ void LLPanelObjectInventory::updateInventory() //HACK: "set" first item then "change" each other one to get keyboard focus right if (first_item) { - mFolders->setSelection(selected_item, TRUE, inventory_has_focus); - first_item = FALSE; + mFolders->setSelection(selected_item, true, inventory_has_focus); + first_item = false; } else { - mFolders->changeSelection(selected_item, TRUE); + mFolders->changeSelection(selected_item, true); } } } @@ -1544,7 +1544,7 @@ void LLPanelObjectInventory::updateInventory() { mFolders->requestArrange(); } - mInventoryNeedsUpdate = FALSE; + mInventoryNeedsUpdate = false; // Edit menu handler is set in onFocusReceived } @@ -1665,8 +1665,8 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li void LLPanelObjectInventory::refresh() { //LL_INFOS() << "LLPanelObjectInventory::refresh()" << LL_ENDL; - BOOL has_inventory = FALSE; - const BOOL non_root_ok = TRUE; + bool has_inventory = false; + const bool non_root_ok = true; LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); LLSelectNode* node = selection->getFirstRootNode(NULL, non_root_ok); if(node && node->mValid) @@ -1677,7 +1677,7 @@ void LLPanelObjectInventory::refresh() { // determine if we need to make a request. Start with a // default based on if we have inventory at all. - BOOL make_request = !mHaveInventory; + bool make_request = !mHaveInventory; // If the task id is different than what we've stored, // then make the request. @@ -1685,7 +1685,7 @@ void LLPanelObjectInventory::refresh() { mTaskUUID = object->mID; mAttachmentUUID = object->getAttachmentItemID(); - make_request = TRUE; + make_request = true; // This is a new object so pre-emptively clear the contents // Otherwise we show the old stuff until the update comes in @@ -1711,7 +1711,7 @@ void LLPanelObjectInventory::refresh() { if(node->mInventorySerial != object->getInventorySerial() || object->isInventoryDirty()) { - make_request = TRUE; + make_request = true; } } @@ -1720,7 +1720,7 @@ void LLPanelObjectInventory::refresh() { requestVOInventory(); } - has_inventory = TRUE; + has_inventory = true; } } if(!has_inventory) @@ -1901,16 +1901,16 @@ bool LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) return handled; } -BOOL LLPanelObjectInventory::isSelectionRemovable() +bool LLPanelObjectInventory::isSelectionRemovable() { if (!mFolders || !mFolders->getRoot()) { - return FALSE; + return false; } std::set selection_set = mFolders->getRoot()->getSelectionList(); if (selection_set.empty()) { - return FALSE; + return false; } for (std::set::iterator iter = selection_set.begin(); iter != selection_set.end(); @@ -1920,8 +1920,8 @@ BOOL LLPanelObjectInventory::isSelectionRemovable() const LLFolderViewModelItemInventory *listener = dynamic_cast(item->getViewModelItem()); if (!listener || !listener->isItemRemovable() || listener->isItemInTrash()) { - return FALSE; + return false; } } - return TRUE; + return true; } -- cgit v1.2.3