diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-02-21 21:05:14 +0100 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-02-21 23:14:31 +0200 |
commit | 60d3dd98a44230c21803c1606552ee098ed9fa7c (patch) | |
tree | af0aa11c458ca86f786560e0875f7e018e1a16b9 /indra/newview/llviewermenu.cpp | |
parent | 855eea7ddf9e1de9226036ca94ccb03ac0e311b9 (diff) |
Convert remaining BOOL to bool
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 330 |
1 files changed, 165 insertions, 165 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9c1656b7ed..591e60da44 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -147,8 +147,8 @@ typedef LLPointer<LLViewerObject> LLViewerObjectPtr; static boost::unordered_map<std::string, LLStringExplicit> sDefaultItemLabels; -BOOL enable_land_build(void*); -BOOL enable_object_build(void*); +bool enable_land_build(void*); +bool enable_object_build(void*); LLVOAvatar* find_avatar_from_object( LLViewerObject* object ); LLVOAvatar* find_avatar_from_object( const LLUUID& object_id ); @@ -158,15 +158,15 @@ void handle_test_load_url(void*); // // Evil hackish imported globals -//extern BOOL gHideSelectedObjects; -//extern BOOL gAllowSelectAvatar; -//extern BOOL gDebugAvatarRotation; +//extern bool gHideSelectedObjects; +//extern bool gAllowSelectAvatar; +//extern bool gDebugAvatarRotation; extern bool gDebugClicks; extern bool gDebugWindowProc; -extern BOOL gShaderProfileFrame; +extern bool gShaderProfileFrame; -//extern BOOL gDebugTextEditorTips; -//extern BOOL gDebugSelectMgr; +//extern bool gDebugTextEditorTips; +//extern bool gDebugSelectMgr; // // Globals @@ -221,15 +221,15 @@ void handle_region_dump_temp_asset_data(void*); void handle_region_clear_temp_asset_data(void*); // Object pie menu -BOOL sitting_on_selection(); +bool sitting_on_selection(); void near_sit_object(); //void label_sit_or_stand(std::string& label, void*); // buy and take alias into the same UI positions, so these // declarations handle this mess. -BOOL is_selection_buy_not_take(); +bool is_selection_buy_not_take(); S32 selection_price(); -BOOL enable_take(); +bool enable_take(); void handle_object_show_inspector(); void handle_avatar_show_inspector(); bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle); @@ -239,7 +239,7 @@ void handle_buy_object(LLSaleInfo sale_info); void handle_buy_contents(LLSaleInfo sale_info); // Land pie menu -void near_sit_down_point(BOOL success, void *); +void near_sit_down_point(bool success, void *); // Avatar pie menu @@ -249,16 +249,16 @@ void near_sit_down_point(BOOL success, void *); void velocity_interpolate( void* ); void handle_visual_leak_detector_toggle(void*); void handle_rebake_textures(void*); -BOOL check_admin_override(void*); +bool check_admin_override(void*); void handle_admin_override_toggle(void*); #ifdef TOGGLE_HACKED_GODLIKE_VIEWER void handle_toggle_hacked_godmode(void*); -BOOL check_toggle_hacked_godmode(void*); +bool check_toggle_hacked_godmode(void*); bool enable_toggle_hacked_godmode(void*); #endif void toggle_show_xui_names(void *); -BOOL check_show_xui_names(void *); +bool check_show_xui_names(void *); // Debug UI @@ -306,7 +306,7 @@ void dump_select_mgr(void*); void dump_inventory(void*); void toggle_visibility(void*); -BOOL get_visibility(void*); +bool get_visibility(void*); // Avatar Pie menu void request_friendship(const LLUUID& agent_id); @@ -319,7 +319,7 @@ void handle_dump_followcam(void*); void handle_viewer_enable_message_log(void*); void handle_viewer_disable_message_log(void*); -BOOL enable_buy_land(void*); +bool enable_buy_land(void*); // Help menu @@ -329,13 +329,13 @@ void handle_dump_attachments(void *); void handle_dump_avatar_local_textures(void*); void handle_debug_avatar_textures(void*); void handle_grab_baked_texture(void*); -BOOL enable_grab_baked_texture(void*); +bool enable_grab_baked_texture(void*); void handle_dump_region_object_cache(void*); void handle_reset_interest_lists(void *); -BOOL enable_save_into_task_inventory(void*); +bool enable_save_into_task_inventory(void*); -BOOL enable_detach(const LLSD& = LLSD()); +bool enable_detach(const LLSD& = LLSD()); void menu_toggle_attached_lights(void* user_data); void menu_toggle_attached_particles(void* user_data); @@ -375,7 +375,7 @@ void LLMenuParcelObserver::changed() child = gMenuLand->findChild<LLView>("Land Buy"); if (child) { - BOOL buyable = enable_buy_land(NULL); + bool buyable = enable_buy_land(NULL); child->setEnabled(buyable); } } @@ -399,7 +399,7 @@ void initialize_menus(); void set_merchant_SLM_menu() { // All other cases (new merchant, not merchant, migrated merchant): show the new Marketplace Listings menu and enable the tool - gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(TRUE); + gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(true); LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings"); gToolBarView->enableCommand(command->id(), true); @@ -424,7 +424,7 @@ void check_merchant_status(bool force) LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED); } // Hide SLM related menu item - gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(FALSE); + gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(false); // Also disable the toolbar button for Marketplace Listings LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings"); @@ -533,17 +533,17 @@ void init_menus() gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str); gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str); - gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE); - gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE); + gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", true); + gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", true); gDetachAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach", true); gDetachHUDAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach HUD", true); // Don't display the Memory console menu if the feature is turned off - LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild<LLMenuItemCheckGL>("Memory", TRUE); + LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild<LLMenuItemCheckGL>("Memory", true); if (memoryMenu) { - memoryMenu->setVisible(FALSE); + memoryMenu->setVisible(false); } gMenuBarView->createJumpKeys(); @@ -638,7 +638,7 @@ class LLAdvancedDumpInfoToConsole : public view_listener_t { bool handleEvent(const LLSD& userdata) { - gDebugView->mDebugConsolep->setVisible(TRUE); + gDebugView->mDebugConsolep->setVisible(true); std::string info_type = userdata.asString(); if ("region" == info_type) { @@ -935,7 +935,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t std::string mode = userdata.asString(); if (mode == "none") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == TRUE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == true) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -943,7 +943,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t } else if (mode == "current") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -951,7 +951,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t } else if (mode == "desired") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -960,7 +960,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t } else if (mode == "full") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -2914,7 +2914,7 @@ class LLObjectBuild : public view_listener_t if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gAgentCamera.cameraZoomIn(0.666f); gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); @@ -2949,11 +2949,11 @@ void update_camera() // always freeze camera in space, even if camera doesn't move // so, for example, follow cam scripts can't affect you when in build mode gAgentCamera.setFocusGlobal(gAgentCamera.calcFocusPositionTargetGlobal(), LLUUID::null); - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); } else { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); LLViewerObject* selected_objectp = selection->getFirstRootObject(); if (selected_objectp) { @@ -3030,7 +3030,7 @@ void handle_attachment_touch(const LLUUID& inv_item_id) { bool apply(LLSelectNode* node) { - node->setTransient(TRUE); + node->setTransient(true); return true; } } f; @@ -3079,7 +3079,7 @@ class LLLandBuild : public view_listener_t if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gAgentCamera.cameraZoomIn(0.666f); gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); @@ -3106,7 +3106,7 @@ class LLLandBuyPass : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLPanelLandGeneral::onClickBuyPass((void *)FALSE); + LLPanelLandGeneral::onClickBuyPass((void *)false); return true; } }; @@ -3121,12 +3121,12 @@ class LLLandEnableBuyPass : public view_listener_t }; // BUG: Should really check if CLICK POINT is in a parcel where you can build. -BOOL enable_land_build(void*) +bool enable_land_build(void*) { - if (gAgent.isGodlike()) return TRUE; - if (gAgent.inPrelude()) return FALSE; + if (gAgent.isGodlike()) return true; + if (gAgent.inPrelude()) return false; - BOOL can_build = FALSE; + bool can_build = false; LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (agent_parcel) { @@ -3136,12 +3136,12 @@ BOOL enable_land_build(void*) } // BUG: Should really check if OBJECT is in a parcel where you can build. -BOOL enable_object_build(void*) +bool enable_object_build(void*) { - if (gAgent.isGodlike()) return TRUE; - if (gAgent.inPrelude()) return FALSE; + if (gAgent.isGodlike()) return true; + if (gAgent.inPrelude()) return false; - BOOL can_build = FALSE; + bool can_build = false; LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (agent_parcel) { @@ -3233,10 +3233,10 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t } }; -BOOL enable_has_attachments(void*) +bool enable_has_attachments(void*) { - return FALSE; + return false; } //--------------------------------------------------------------------------- @@ -3373,7 +3373,7 @@ class LLObjectMute : public view_listener_t LLVOAvatar* avatar = find_avatar_from_object(object); if (avatar) { - avatar->mNeedsImpostorUpdate = TRUE; + avatar->mNeedsImpostorUpdate = true; avatar->mLastImpostorUpdateReason = 9; id = avatar->getID(); @@ -3440,7 +3440,7 @@ bool handle_go_to() else { // Snap camera back to behind avatar - gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(true, ANIMATE); } // Could be first use @@ -3815,7 +3815,7 @@ void handle_buy_object(LLSaleInfo sale_info) LLUUID owner_id; std::string owner_name; - BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); + bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); if (!owners_identical) { LLNotificationsUtil::add("CannotBuyObjectsFromDifferentOwners"); @@ -3823,7 +3823,7 @@ void handle_buy_object(LLSaleInfo sale_info) } LLPermissions perm; - BOOL valid = LLSelectMgr::getInstance()->selectGetPermissions(perm); + bool valid = LLSelectMgr::getInstance()->selectGetPermissions(perm); LLAggregatePermissions ag_perm; valid &= LLSelectMgr::getInstance()->selectGetAggregatePermissions(ag_perm); if(!valid || !sale_info.isForSale() || !perm.allowTransferTo(gAgent.getID())) @@ -4039,7 +4039,7 @@ class LLTogglePanelPeopleTab : public view_listener_t } }; -BOOL check_admin_override(void*) +bool check_admin_override(void*) { return gAgent.getAdminOverride(); } @@ -4139,7 +4139,7 @@ void handle_toggle_hacked_godmode(void*) set_god_level(gHackGodmode ? GOD_MAINTENANCE : GOD_NOT); } -BOOL check_toggle_hacked_godmode(void*) +bool check_toggle_hacked_godmode(void*) { return gHackGodmode; } @@ -4176,15 +4176,15 @@ public: virtual ~LLHaveCallingcard() {} virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); - BOOL isThere() const { return mIsThere;} + bool isThere() const { return mIsThere;} protected: LLUUID mID; - BOOL mIsThere; + bool mIsThere; }; LLHaveCallingcard::LLHaveCallingcard(const LLUUID& agent_id) : mID(agent_id), - mIsThere(FALSE) + mIsThere(false) { } @@ -4196,14 +4196,14 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat, if((item->getType() == LLAssetType::AT_CALLINGCARD) && (item->getCreatorUUID() == mID)) { - mIsThere = TRUE; + mIsThere = true; } } - return FALSE; + return false; } */ -BOOL is_agent_mappable(const LLUUID& agent_id) +bool is_agent_mappable(const LLUUID& agent_id) { const LLRelationship* buddy_info = NULL; bool is_friend = LLAvatarActions::isFriend(agent_id); @@ -4284,7 +4284,7 @@ class LLEnableEditPhysics : public view_listener_t bool handleEvent(const LLSD& userdata) { //return gAgentWearables.isWearableModifiable(LLWearableType::WT_SHAPE, 0); - return TRUE; + return true; } }; @@ -4352,11 +4352,11 @@ void handle_object_sit(const LLUUID& object_id) handle_object_sit(obj, offset); } -void near_sit_down_point(BOOL success, void *) +void near_sit_down_point(bool success, void *) { if (success) { - gAgent.setFlying(FALSE); + gAgent.setFlying(false); gAgent.clearControlFlags(AGENT_CONTROL_STAND_UP); // might have been set by autopilot gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); } @@ -4402,7 +4402,7 @@ class LLLandCanSit : public view_listener_t // // Major mode switching // -void reset_view_final( BOOL proceed ); +void reset_view_final( bool proceed ); void handle_reset_view() { @@ -4411,8 +4411,8 @@ void handle_reset_view() // switching to outfit selector should automagically save any currently edited wearable LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits")); } - gAgentCamera.setFocusOnAvatar(TRUE, FALSE, FALSE); - reset_view_final( TRUE ); + gAgentCamera.setFocusOnAvatar(true, false, false); + reset_view_final( true ); LLFloaterCamera::resetCameraMode(); } @@ -4426,14 +4426,14 @@ class LLViewResetView : public view_listener_t }; // Note: extra parameters allow this function to be called from dialog. -void reset_view_final( BOOL proceed ) +void reset_view_final( bool proceed ) { if( !proceed ) { return; } - gAgentCamera.resetView(TRUE, TRUE); + gAgentCamera.resetView(true, true); gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); } @@ -4519,7 +4519,7 @@ void handle_duplicate_in_place(void*) LL_INFOS() << "handle_duplicate_in_place" << LL_ENDL; LLVector3 offset(0.f, 0.f, 0.f); - LLSelectMgr::getInstance()->selectDuplicate(offset, TRUE); + LLSelectMgr::getInstance()->selectDuplicate(offset, true); } @@ -4567,8 +4567,8 @@ void handle_object_owner_permissive(void*) if(gAgent.isGodlike()) { // do the objects. - LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_BASE, TRUE, PERM_ALL, TRUE); - LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, TRUE, PERM_ALL, TRUE); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_BASE, true, PERM_ALL, true); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, true, PERM_ALL, true); } } @@ -4577,14 +4577,14 @@ void handle_object_owner_self(void*) // only send this if they're a god. if(gAgent.isGodlike()) { - LLSelectMgr::getInstance()->sendOwner(gAgent.getID(), gAgent.getGroupID(), TRUE); + LLSelectMgr::getInstance()->sendOwner(gAgent.getID(), gAgent.getGroupID(), true); } } // Shortcut to set owner permissions to not editable. void handle_object_lock(void*) { - LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, FALSE, PERM_MODIFY); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, false, PERM_MODIFY); } void handle_object_asset_ids(void*) @@ -4709,11 +4709,11 @@ static bool get_derezzable_objects( LL_WARNS() << "Attempt to derez deprecated AssetContainer object type not supported." << LL_ENDL; /* object->requestInventory(container_inventory_arrived, - (void *)(BOOL)(DRD_TAKE_INTO_AGENT_INVENTORY == dest)); + (void *)(bool)(DRD_TAKE_INTO_AGENT_INVENTORY == dest)); */ continue; } - BOOL can_derez_current = FALSE; + bool can_derez_current = false; switch(dest) { case DRD_TAKE_INTO_AGENT_INVENTORY: @@ -4722,14 +4722,14 @@ static bool get_derezzable_objects( ((node->mPermissions->allowTransferTo(gAgent.getID()) && object->permModify()) || (node->allowOperationOnNode(PERM_OWNER, GP_OBJECT_MANIPULATE)))) { - can_derez_current = TRUE; + can_derez_current = true; } break; case DRD_RETURN_TO_OWNER: if(!object->isAttachment()) { - can_derez_current = TRUE; + can_derez_current = true; } break; @@ -4738,7 +4738,7 @@ static bool get_derezzable_objects( && object->permCopy()) || gAgent.isGodlike()) { - can_derez_current = TRUE; + can_derez_current = true; } break; } @@ -4839,7 +4839,7 @@ static void derez_objects( msg->nextBlockFast(_PREHASH_ObjectData); msg->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID()); // VEFFECT: DerezObject - LLHUDEffectSpiral* effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); + LLHUDEffectSpiral* effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true); effectp->setPositionGlobal(object->getPositionGlobal()); effectp->setColor(LLColor4U(gAgent.getEffectColor())); } @@ -5004,8 +5004,8 @@ void handle_take(bool take_separate) return; } - BOOL you_own_everything = TRUE; - BOOL locked_but_takeable_object = FALSE; + bool you_own_everything = true; + bool locked_but_takeable_object = false; LLUUID category_id; for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); @@ -5017,12 +5017,12 @@ void handle_take(bool take_separate) { if(!object->permYouOwner()) { - you_own_everything = FALSE; + you_own_everything = false; } if(!object->permMove()) { - locked_but_takeable_object = TRUE; + locked_but_takeable_object = true; } } if(node->mFolderID.notNull()) @@ -5123,7 +5123,7 @@ void handle_take(bool take_separate) void handle_object_show_inspector() { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - LLViewerObject* objectp = selection->getFirstRootObject(TRUE); + LLViewerObject* objectp = selection->getFirstRootObject(true); if (!objectp) { return; @@ -5170,11 +5170,11 @@ bool confirm_take_separate(const LLSD ¬ification, const LLSD &response, LLObj // You can take an item when it is public and transferrable, or when // you own it. We err on the side of enabling the item when at least // one item selected can be copied to inventory. -BOOL enable_take() +bool enable_take() { if (sitting_on_selection()) { - return FALSE; + return false; } for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); @@ -5189,13 +5189,13 @@ BOOL enable_take() } #ifdef HACKED_GODLIKE_VIEWER - return TRUE; + return true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER if (!LLGridManager::getInstance()->isInProductionGrid() && gAgent.isGodlike()) { - return TRUE; + return true; } # endif if(!object->isPermanentEnforced() && @@ -5207,7 +5207,7 @@ BOOL enable_take() } #endif } - return FALSE; + return false; } @@ -5298,9 +5298,9 @@ class LLToolsEnableBuyOrTake : public view_listener_t // exception is if you own everything in the selection that is for // sale, in this case, you can't buy stuff from yourself, so you can // take it. -// return value = TRUE if selection is a 'buy'. -// FALSE if selection is a 'take' -BOOL is_selection_buy_not_take() +// return value = true if selection is a 'buy'. +// false if selection is a 'take' +bool is_selection_buy_not_take() { for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++) @@ -5311,10 +5311,10 @@ BOOL is_selection_buy_not_take() { // you do not own the object and it is for sale, thus, // it's a buy - return TRUE; + return true; } } - return FALSE; + return false; } S32 selection_price() @@ -5372,7 +5372,7 @@ void handle_buy() if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return; LLSaleInfo sale_info; - BOOL valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); + bool valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); if (!valid) return; S32 price = sale_info.getSalePrice(); @@ -5410,27 +5410,27 @@ bool for_sale_selection(LLSelectNode* nodep) || nodep->mSaleInfo.getSaleType() != LLSaleInfo::FS_COPY); } -BOOL sitting_on_selection() +bool sitting_on_selection() { LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); if (!node) { - return FALSE; + return false; } if (!node->mValid) { - return FALSE; + return false; } LLViewerObject* root_object = node->getObject(); if (!root_object) { - return FALSE; + return false; } // Need to determine if avatar is sitting on this object - if (!isAgentAvatarValid()) return FALSE; + if (!isAgentAvatarValid()) return false; return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object); } @@ -5533,7 +5533,7 @@ class LLToolsSnapObjectXY : public view_listener_t pos_global.mdV[VY] += snap_size; } - obj->setPositionGlobal(pos_global, FALSE); + obj->setPositionGlobal(pos_global, false); } } LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION); @@ -5914,7 +5914,7 @@ bool enable_object_delete() { bool new_value = #ifdef HACKED_GODLIKE_VIEWER - TRUE; + true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER (!LLGridManager::getInstance()->isInProductionGrid() @@ -6126,8 +6126,8 @@ void show_debug_menus() // this might get called at login screen where there is no menu so only toggle it if one exists if ( gMenuBarView ) { - BOOL debug = gSavedSettings.getBOOL("UseDebugMenus"); - BOOL qamode = gSavedSettings.getBOOL("QAMode"); + bool debug = gSavedSettings.getBOOL("UseDebugMenus"); + bool qamode = gSavedSettings.getBOOL("QAMode"); gMenuBarView->setItemVisible("Advanced", debug); // gMenuBarView->setItemEnabled("Advanced", debug); // Don't disable Advanced keyboard shortcuts when hidden @@ -6145,7 +6145,7 @@ void show_debug_menus() } if (gLoginMenuBarView) { - BOOL debug = gSavedSettings.getBOOL("UseDebugMenus"); + bool debug = gSavedSettings.getBOOL("UseDebugMenus"); gLoginMenuBarView->setItemVisible("Debug", debug); gLoginMenuBarView->setItemEnabled("Debug", debug); } @@ -6339,10 +6339,10 @@ class LLWorldPlaceProfile : public view_listener_t void handle_look_at_selection(const LLSD& param) { const F32 PADDING_FACTOR = 1.75f; - BOOL zoom = (param.asString() == "zoom"); + bool zoom = (param.asString() == "zoom"); if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); LLBBox selection_bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); @@ -6382,7 +6382,7 @@ void handle_zoom_to_object(LLUUID object_id) if (object) { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); LLBBox bbox = object->getBoundingBoxAgent() ; F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); @@ -6434,8 +6434,8 @@ class LLAvatarToggleMyProfile : public view_listener_t LLFloater* instance = LLAvatarActions::getProfileFloater(gAgent.getID()); if (LLFloater::isMinimized(instance)) { - instance->setMinimized(FALSE); - instance->setFocus(TRUE); + instance->setMinimized(false); + instance->setFocus(true); } else if (!LLFloater::isShown(instance)) { @@ -6443,7 +6443,7 @@ class LLAvatarToggleMyProfile : public view_listener_t } else if (!instance->hasFocus() && !instance->getIsChrome()) { - instance->setFocus(TRUE); + instance->setFocus(true); } else { @@ -6460,8 +6460,8 @@ class LLAvatarTogglePicks : public view_listener_t LLFloater * instance = LLAvatarActions::getProfileFloater(gAgent.getID()); if (LLFloater::isMinimized(instance) || (instance && !instance->hasFocus() && !instance->getIsChrome())) { - instance->setMinimized(FALSE); - instance->setFocus(TRUE); + instance->setMinimized(false); + instance->setFocus(true); LLAvatarActions::showPicks(gAgent.getID()); } else if (picks_tab_visible()) @@ -6483,8 +6483,8 @@ class LLAvatarToggleSearch : public view_listener_t LLFloater* instance = LLFloaterReg::findInstance("search"); if (LLFloater::isMinimized(instance)) { - instance->setMinimized(FALSE); - instance->setFocus(TRUE); + instance->setMinimized(false); + instance->setFocus(true); } else if (!LLFloater::isShown(instance)) { @@ -6492,7 +6492,7 @@ class LLAvatarToggleSearch : public view_listener_t } else if (!instance->hasFocus() && !instance->getIsChrome()) { - instance->setFocus(TRUE); + instance->setFocus(true); } else { @@ -6998,7 +6998,7 @@ class LLLandEdit : public view_listener_t if (gAgentCamera.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gAgentCamera.cameraOrbitOver( F_PI * 0.25f ); @@ -7061,7 +7061,7 @@ class LLWorldEnableBuyLand : public view_listener_t } }; -BOOL enable_buy_land(void*) +bool enable_buy_land(void*) { return LLViewerParcelMgr::getInstance()->canAgentBuyParcel( LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(), false); @@ -7099,7 +7099,7 @@ private: return true; } - static void onNearAttachObject(BOOL success, void *user_data); + static void onNearAttachObject(bool success, void *user_data); void confirmReplaceAttachment(S32 option, LLViewerJointAttachment* attachment_point); class CallbackData : public LLSelectionCallbackData { @@ -7118,7 +7118,7 @@ protected: LLObjectSelectionHandle LLObjectAttachToAvatar::sObjectSelection; // static -void LLObjectAttachToAvatar::onNearAttachObject(BOOL success, void *user_data) +void LLObjectAttachToAvatar::onNearAttachObject(bool success, void *user_data) { if (!user_data) return; CallbackData* cb_data = static_cast<CallbackData*>(user_data); @@ -7378,7 +7378,7 @@ class LLAttachmentEnableDrop : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->allowAgentBuild()); + bool can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->allowAgentBuild()); //Add an inventory observer to only allow dropping the newly attached item //once it exists in your inventory. Look at Jira 2422. @@ -7430,7 +7430,7 @@ class LLAttachmentEnableDrop : public view_listener_t } }; -BOOL enable_detach(const LLSD&) +bool enable_detach(const LLSD&) { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -7439,7 +7439,7 @@ BOOL enable_detach(const LLSD&) !object->isAttachment() || !LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) { - return FALSE; + return false; } // Find the avatar who owns this attachment @@ -7449,13 +7449,13 @@ BOOL enable_detach(const LLSD&) // ...if it's you, good to detach if (avatar->getID() == gAgent.getID()) { - return TRUE; + return true; } avatar = (LLViewerObject*)avatar->getParent(); } - return FALSE; + return false; } class LLAttachmentEnableDetach : public view_listener_t @@ -7468,7 +7468,7 @@ class LLAttachmentEnableDetach : public view_listener_t }; // Used to tell if the selected object can be attached to your avatar. -BOOL object_selected_and_point_valid() +bool object_selected_and_point_valid() { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); for (LLObjectSelection::root_iterator iter = selection->root_begin(); @@ -7483,7 +7483,7 @@ BOOL object_selected_and_point_valid() LLViewerObject* child = *iter; if (child->isAvatar()) { - return FALSE; + return false; } } } @@ -7498,23 +7498,23 @@ BOOL object_selected_and_point_valid() } -BOOL object_is_wearable() +bool object_is_wearable() { if (!isAgentAvatarValid()) { - return FALSE; + return false; } if (!object_selected_and_point_valid()) { - return FALSE; + return false; } if (sitting_on_selection()) { - return FALSE; + return false; } if (!gAgentAvatarp->canAttachMoreObjects()) { - return FALSE; + return false; } LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); @@ -7523,10 +7523,10 @@ BOOL object_is_wearable() LLSelectNode* node = *iter; if (node->mPermissions->getOwner() == gAgent.getID()) { - return TRUE; + return true; } } - return FALSE; + return false; } @@ -7574,10 +7574,10 @@ namespace { struct QueueObjects : public LLSelectedNodeFunctor { - BOOL scripted; - BOOL modifiable; + bool scripted; + bool modifiable; LLFloaterScriptQueue* mQueue; - QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(FALSE), modifiable(FALSE) {} + QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(false), modifiable(false) {} virtual bool apply(LLSelectNode* node) { LLViewerObject* obj = node->getObject(); @@ -7784,13 +7784,13 @@ void handle_selected_material_info() void handle_test_male(void*) { LLAppearanceMgr::instance().wearOutfitByName("Male Shape & Outfit"); - //gGestureList.requestResetFromServer( TRUE ); + //gGestureList.requestResetFromServer( true ); } void handle_test_female(void*) { LLAppearanceMgr::instance().wearOutfitByName("Female Shape & Outfit"); - //gGestureList.requestResetFromServer( FALSE ); + //gGestureList.requestResetFromServer( false ); } void handle_dump_attachments(void*) @@ -7808,7 +7808,7 @@ void handle_dump_attachments(void*) ++attachment_iter) { LLViewerObject *attached_object = attachment_iter->get(); - BOOL visible = (attached_object != NULL && + bool visible = (attached_object != NULL && attached_object->mDrawable.notNull() && !attached_object->mDrawable->isRenderType(0)); LLVector3 pos; @@ -7832,7 +7832,7 @@ protected: bool handleEvent(const LLSD& userdata) { std::string control_name = userdata.asString(); - BOOL checked = gSavedSettings.getBOOL( control_name ); + bool checked = gSavedSettings.getBOOL( control_name ); gSavedSettings.setBOOL( control_name, !checked ); return true; } @@ -7889,7 +7889,7 @@ class LLAdvancedClickRenderProfile: public view_listener_t { bool handleEvent(const LLSD& userdata) { - gShaderProfileFrame = TRUE; + gShaderProfileFrame = true; return true; } }; @@ -7911,7 +7911,7 @@ class LLToggleShaderControl : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string control_name = userdata.asString(); - BOOL checked = gSavedSettings.getBOOL( control_name ); + bool checked = gSavedSettings.getBOOL( control_name ); gSavedSettings.setBOOL( control_name, !checked ); LLPipeline::refreshCachedSettings(); LLViewerShaderMgr::instance()->setShaders(); @@ -8039,15 +8039,15 @@ bool enable_take_copy_objects() class LLHasAsset : public LLInventoryCollectFunctor { public: - LLHasAsset(const LLUUID& id) : mAssetID(id), mHasAsset(FALSE) {} + LLHasAsset(const LLUUID& id) : mAssetID(id), mHasAsset(false) {} virtual ~LLHasAsset() {} virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); - BOOL hasAsset() const { return mHasAsset; } + bool hasAsset() const { return mHasAsset; } protected: LLUUID mAssetID; - BOOL mHasAsset; + bool mHasAsset; }; bool LLHasAsset::operator()(LLInventoryCategory* cat, @@ -8055,13 +8055,13 @@ bool LLHasAsset::operator()(LLInventoryCategory* cat, { if(item && item->getAssetUUID() == mAssetID) { - mHasAsset = TRUE; + mHasAsset = true; } - return FALSE; + return false; } -BOOL enable_save_into_task_inventory(void*) +bool enable_save_into_task_inventory(void*) { LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); if(node && (node->mValid) && (!node->mFromTaskID.isNull())) @@ -8070,10 +8070,10 @@ BOOL enable_save_into_task_inventory(void*) LLViewerObject* obj = node->getObject(); if( obj && !obj->isAttachment() ) { - return TRUE; + return true; } } - return FALSE; + return false; } class LLToolsEnableSaveToObjectInventory : public view_listener_t @@ -8143,12 +8143,12 @@ class LLWorldEnableTeleportHome : public view_listener_t } }; -BOOL enable_god_full(void*) +bool enable_god_full(void*) { return gAgent.getGodLevel() >= GOD_FULL; } -BOOL enable_god_liaison(void*) +bool enable_god_liaison(void*) { return gAgent.getGodLevel() >= GOD_LIAISON; } @@ -8158,7 +8158,7 @@ bool is_god_customer_service() return gAgent.getGodLevel() >= GOD_CUSTOMER_SERVICE; } -BOOL enable_god_basic(void*) +bool enable_god_basic(void*) { return gAgent.getGodLevel() > GOD_NOT; } @@ -8169,7 +8169,7 @@ void toggle_show_xui_names(void *) gSavedSettings.setBOOL("DebugShowXUINames", !gSavedSettings.getBOOL("DebugShowXUINames")); } -BOOL check_show_xui_names(void *) +bool check_show_xui_names(void *) { return gSavedSettings.getBOOL("DebugShowXUINames"); } @@ -8178,7 +8178,7 @@ class LLToolsSelectOnlyMyObjects : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectOwnedOnly"); + bool cur_val = gSavedSettings.getBOOL("SelectOwnedOnly"); gSavedSettings.setBOOL("SelectOwnedOnly", ! cur_val ); @@ -8190,7 +8190,7 @@ class LLToolsSelectOnlyMovableObjects : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectMovableOnly"); + bool cur_val = gSavedSettings.getBOOL("SelectMovableOnly"); gSavedSettings.setBOOL("SelectMovableOnly", ! cur_val ); @@ -8202,7 +8202,7 @@ class LLToolsSelectInvisibleObjects : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectInvisibleObjects"); + bool cur_val = gSavedSettings.getBOOL("SelectInvisibleObjects"); gSavedSettings.setBOOL("SelectInvisibleObjects", !cur_val); @@ -8214,7 +8214,7 @@ class LLToolsSelectReflectionProbes: public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectReflectionProbes"); + bool cur_val = gSavedSettings.getBOOL("SelectReflectionProbes"); gSavedSettings.setBOOL("SelectReflectionProbes", !cur_val); @@ -8261,7 +8261,7 @@ class LLToolsEditLinkedParts : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL select_individuals = !gSavedSettings.getBOOL("EditLinkedParts"); + bool select_individuals = !gSavedSettings.getBOOL("EditLinkedParts"); gSavedSettings.setBOOL( "EditLinkedParts", select_individuals ); if (select_individuals) { @@ -8365,7 +8365,7 @@ void handle_grab_baked_texture(void* data) } } -BOOL enable_grab_baked_texture(void* data) +bool enable_grab_baked_texture(void* data) { EBakedTextureIndex index = (EBakedTextureIndex)((intptr_t)data); if (isAgentAvatarValid()) @@ -8631,7 +8631,7 @@ void toggle_visibility(void* user_data) viewp->setVisible(!viewp->getVisible()); } -BOOL get_visibility(void* user_data) +bool get_visibility(void* user_data) { LLView* viewp = (LLView*)user_data; return viewp->getVisible(); @@ -8963,9 +8963,9 @@ class LLToolsSelectTool : public view_listener_t // attempt to open it, but it won't bring it to front or de-minimize. if (gFloaterTools && (gFloaterTools->isMinimized() || !gFloaterTools->isShown() || !gFloaterTools->isFrontmost())) { - gFloaterTools->setMinimized(FALSE); + gFloaterTools->setMinimized(false); gFloaterTools->openFloater(); - gFloaterTools->setVisibleAndFrontmost(TRUE); + gFloaterTools->setVisibleAndFrontmost(true); } return true; } @@ -8983,7 +8983,7 @@ class LLWorldEnvSettings : public view_listener_t LLFloater* env_floater = LLFloaterReg::findTypedInstance<LLFloater>(*it); if (env_floater) { - env_floater->setFocus(FALSE); + env_floater->setFocus(false); } } } |