summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-09-10 13:54:38 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-09-10 13:54:38 +0200
commit761a4fa4291b4cbef0b2056c6a0b1f449c0cb4bf (patch)
treeb6a2310f48efa9f396e96de83c93fa15829599ec
parent100fab22f56969a6abe15b0dd58881002db02ab3 (diff)
Clean up llviewermenu
-rw-r--r--indra/newview/llselectmgr.cpp16
-rw-r--r--indra/newview/lltoolselect.cpp7
-rw-r--r--indra/newview/llviewermenu.cpp695
-rw-r--r--indra/newview/llviewermenu.h53
-rw-r--r--indra/newview/llviewermenufile.cpp4
-rw-r--r--indra/newview/pipeline.cpp1
6 files changed, 274 insertions, 502 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 342048252f..51da051340 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -103,20 +103,12 @@ LLViewerObject* getSelectedParentObject(LLViewerObject *object) ;
// Consts
//
-const F32 SILHOUETTE_UPDATE_THRESHOLD_SQUARED = 0.02f;
-const S32 MAX_SILS_PER_FRAME = 50;
-const S32 MAX_OBJECTS_PER_PACKET = 254;
+constexpr F32 SILHOUETTE_UPDATE_THRESHOLD_SQUARED = 0.02f;
+constexpr S32 MAX_SILS_PER_FRAME = 50;
+constexpr S32 MAX_OBJECTS_PER_PACKET = 254;
// For linked sets
-const S32 MAX_CHILDREN_PER_TASK = 255;
+constexpr S32 MAX_CHILDREN_PER_TASK = 255;
-//
-// Globals
-//
-
-//bool gDebugSelectMgr = false;
-
-//bool gHideSelectedObjects = false;
-//bool gAllowSelectAvatar = false;
bool LLSelectMgr::sRectSelectInclusive = true;
bool LLSelectMgr::sRenderHiddenSelections = true;
diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp
index cc04f9e3fc..5ccda7d4eb 100644
--- a/indra/newview/lltoolselect.cpp
+++ b/indra/newview/lltoolselect.cpp
@@ -48,11 +48,8 @@
#include "llvoavatarself.h"
#include "llworld.h"
-// Globals
-//extern bool gAllowSelectAvatar;
-
-const F32 SELECTION_ROTATION_TRESHOLD = 0.1f;
-const F32 SELECTION_SITTING_ROTATION_TRESHOLD = 3.2f; //radian
+constexpr F32 SELECTION_ROTATION_TRESHOLD = 0.1f;
+constexpr F32 SELECTION_SITTING_ROTATION_TRESHOLD = 3.2f; //radian
LLToolSelect::LLToolSelect( LLToolComposite* composite )
: LLTool( std::string("Select"), composite ),
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index d8c4e03d93..df60130c9f 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -154,27 +154,18 @@ typedef LLPointer<LLViewerObject> LLViewerObjectPtr;
static boost::unordered_map<std::string, LLStringExplicit> sDefaultItemLabels;
-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);
-LLVOAvatar* find_avatar_from_object( LLViewerObject* object );
-LLVOAvatar* find_avatar_from_object( const LLUUID& object_id );
-
-void handle_test_load_url(void*);
+void handle_test_load_url();
//
// Evil hackish imported globals
-//extern bool gHideSelectedObjects;
-//extern bool gAllowSelectAvatar;
-//extern bool gDebugAvatarRotation;
extern bool gDebugClicks;
extern bool gDebugWindowProc;
extern bool gShaderProfileFrame;
-//extern bool gDebugTextEditorTips;
-//extern bool gDebugSelectMgr;
-
//
// Globals
//
@@ -214,24 +205,22 @@ LLContextMenu* gDetachBodyPartPieMenus[9];
// Local prototypes
// File Menu
-void handle_compress_image(void*);
-void handle_compress_file_test(void*);
+void handle_compress_image();
+void handle_compress_file_test();
// Edit menu
-void handle_dump_group_info(void *);
-void handle_dump_capabilities_info(void *);
+void handle_dump_group_info();
+void handle_dump_capabilities_info();
// Advanced->Consoles menu
-void handle_region_dump_settings(void*);
-void handle_region_dump_temp_asset_data(void*);
-void handle_region_clear_temp_asset_data(void*);
+void handle_region_dump_settings();
+void handle_region_dump_temp_asset_data();
+void handle_region_clear_temp_asset_data();
// Object pie menu
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();
@@ -246,107 +235,99 @@ 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 *);
-
-// Avatar pie menu
+void near_sit_down_point(bool success, void*);
// Debug menu
-
-
-void velocity_interpolate( void* );
-void handle_visual_leak_detector_toggle(void*);
-void handle_rebake_textures(void*);
-bool check_admin_override(void*);
-void handle_admin_override_toggle(void*);
+void handle_visual_leak_detector_toggle();
+void handle_rebake_textures();
+bool check_admin_override();
+void handle_admin_override_toggle();
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-void handle_toggle_hacked_godmode(void*);
-bool check_toggle_hacked_godmode(void*);
-bool enable_toggle_hacked_godmode(void*);
+void handle_toggle_hacked_godmode();
+bool check_toggle_hacked_godmode();
+bool enable_toggle_hacked_godmode();
#endif
-void toggle_show_xui_names(void *);
-bool check_show_xui_names(void *);
+void toggle_show_xui_names();
+bool check_show_xui_names();
// Debug UI
-void handle_buy_currency_test(void*);
+void handle_buy_currency_test();
-void handle_god_mode(void*);
+void handle_god_mode();
// God menu
-void handle_leave_god_mode(void*);
+void handle_leave_god_mode();
void handle_reset_view();
-void handle_duplicate_in_place(void*);
-
-void handle_object_owner_self(void*);
-void handle_object_owner_permissive(void*);
-void handle_object_lock(void*);
-void handle_object_asset_ids(void*);
-void force_take_copy(void*);
-
-void handle_force_parcel_owner_to_me(void*);
-void handle_force_parcel_to_content(void*);
-void handle_claim_public_land(void*);
-
-void handle_god_request_avatar_geometry(void *); // Hack for easy testing of new avatar geometry
-void reload_vertex_shader(void *);
-void handle_disconnect_viewer(void *);
-
-void force_error_breakpoint(void *);
-void force_error_llerror(void *);
-void force_error_llerror_msg(void*);
-void force_error_bad_memory_access(void *);
-void force_error_infinite_loop(void *);
-void force_error_software_exception(void *);
-void force_error_os_exception(void*);
-void force_error_driver_crash(void *);
-void force_error_coroutine_crash(void *);
-void force_error_thread_crash(void *);
-
-void handle_force_delete(void*);
-void print_object_info(void*);
-void print_agent_nvpairs(void*);
-void toggle_debug_menus(void*);
+void handle_object_owner_self();
+void handle_object_owner_permissive();
+void handle_object_lock();
+void handle_object_asset_ids();
+void force_take_copy();
+
+void handle_force_parcel_owner_to_me();
+void handle_force_parcel_to_content();
+void handle_claim_public_land();
+
+void handle_god_request_avatar_geometry(); // Hack for easy testing of new avatar geometry
+void reload_vertex_shader();
+void handle_disconnect_viewer();
+
+void force_error_breakpoint();
+void force_error_llerror();
+void force_error_llerror_msg();
+void force_error_bad_memory_access();
+void force_error_infinite_loop();
+void force_error_software_exception();
+void force_error_os_exception();
+void force_error_driver_crash();
+void force_error_coroutine_crash();
+void force_error_thread_crash();
+
+void handle_force_delete();
+void print_object_info();
+void print_agent_nvpairs();
void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status);
-void dump_select_mgr(void*);
+void dump_select_mgr();
-void dump_inventory(void*);
-void toggle_visibility(void*);
-bool get_visibility(void*);
+void dump_inventory();
+void toggle_visibility(LLView* viewp);
+bool get_visibility(LLView* viewp);
// Avatar Pie menu
void request_friendship(const LLUUID& agent_id);
// Tools menu
-void handle_selected_texture_info(void*);
+void handle_selected_texture_info();
void handle_selected_material_info();
-void handle_dump_followcam(void*);
-void handle_viewer_enable_message_log(void*);
-void handle_viewer_disable_message_log(void*);
+void handle_dump_followcam();
+void handle_viewer_enable_message_log();
+void handle_viewer_disable_message_log();
-bool enable_buy_land(void*);
+bool enable_buy_land();
// Help menu
-void handle_test_male(void *);
-void handle_test_female(void *);
-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*);
-void handle_dump_region_object_cache(void*);
-void handle_reset_interest_lists(void *);
+void handle_test_male();
+void handle_test_female();
+void handle_dump_attachments();
+void handle_dump_avatar_local_textures();
+void handle_debug_avatar_textures();
+void handle_grab_baked_texture(EBakedTextureIndex baked_tex_index);
+bool enable_grab_baked_texture(EBakedTextureIndex baked_tex_index);
+void handle_dump_region_object_cache();
+void handle_reset_interest_lists();
-bool enable_save_into_task_inventory(void*);
+bool enable_save_into_task_inventory();
bool enable_detach(const LLSD& = LLSD());
-void menu_toggle_attached_lights(void* user_data);
-void menu_toggle_attached_particles(void* user_data);
+void menu_toggle_attached_lights();
+void menu_toggle_attached_particles();
class LLMenuParcelObserver : public LLParcelObserver
{
@@ -383,12 +364,12 @@ void LLMenuParcelObserver::changed()
if (!mLandBuyPassHandle.isDead())
{
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel();
- static_cast<LLMenuItemCallGL*>(mLandBuyPassHandle.get())->setEnabled(LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID()));
+ static_cast<LLMenuItemCallGL*>(mLandBuyPassHandle.get())->setEnabled(LLPanelLandGeneral::enableBuyPass(nullptr) && parcel->getOwnerID() != gAgentID);
}
if (!mLandBuyHandle.isDead())
{
- bool buyable = enable_buy_land(NULL);
+ bool buyable = enable_buy_land();
static_cast<LLMenuItemCallGL*>(mLandBuyHandle.get())->setEnabled(buyable);
}
}
@@ -444,7 +425,7 @@ void LLSLMMenuUpdater::setMerchantMenu()
if (marketplacelistings_id.isNull())
{
U32 mkt_status = LLMarketplaceData::instance().getSLMStatus();
- bool is_merchant = (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT) || (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MIGRATED_MERCHANT);
+ bool is_merchant = mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT || mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MIGRATED_MERCHANT;
if (is_merchant)
{
gInventory.ensureCategoryForTypeExists(LLFolderType::FT_MARKETPLACE_LISTINGS);
@@ -476,12 +457,14 @@ void LLSLMMenuUpdater::checkMerchantStatus(bool force)
void set_merchant_SLM_menu()
{
- if(gSLMMenuUpdater) gSLMMenuUpdater->setMerchantMenu();
+ if (gSLMMenuUpdater)
+ gSLMMenuUpdater->setMerchantMenu();
}
void check_merchant_status(bool force)
{
- if(gSLMMenuUpdater) gSLMMenuUpdater->checkMerchantStatus(force);
+ if (gSLMMenuUpdater)
+ gSLMMenuUpdater->checkMerchantStatus(force);
}
void init_menus()
@@ -623,11 +606,11 @@ class LLAdvancedToggleConsole : public view_listener_t
std::string console_type = userdata.asString();
if ("texture" == console_type)
{
- toggle_visibility( (void*)gTextureView );
+ toggle_visibility(gTextureView);
}
else if ("debug" == console_type)
{
- toggle_visibility( (void*)static_cast<LLUICtrl*>(gDebugView->mDebugConsolep));
+ toggle_visibility(gDebugView->mDebugConsolep);
}
else if ("fast timers" == console_type)
{
@@ -635,11 +618,11 @@ class LLAdvancedToggleConsole : public view_listener_t
}
else if ("scene view" == console_type)
{
- toggle_visibility( (void*)gSceneView);
+ toggle_visibility(gSceneView);
}
else if ("scene monitor" == console_type)
{
- toggle_visibility( (void*)gSceneMonitorView);
+ toggle_visibility(gSceneMonitorView);
}
return true;
@@ -653,11 +636,11 @@ class LLAdvancedCheckConsole : public view_listener_t
bool new_value = false;
if ("texture" == console_type)
{
- new_value = get_visibility( (void*)gTextureView );
+ new_value = get_visibility(gTextureView);
}
else if ("debug" == console_type)
{
- new_value = get_visibility( (void*)((LLView*)gDebugView->mDebugConsolep) );
+ new_value = get_visibility(gDebugView->mDebugConsolep);
}
else if ("fast timers" == console_type)
{
@@ -665,11 +648,11 @@ class LLAdvancedCheckConsole : public view_listener_t
}
else if ("scene view" == console_type)
{
- new_value = get_visibility( (void*) gSceneView);
+ new_value = get_visibility(gSceneView);
}
else if ("scene monitor" == console_type)
{
- new_value = get_visibility( (void*) gSceneMonitorView);
+ new_value = get_visibility(gSceneMonitorView);
}
return new_value;
@@ -690,15 +673,15 @@ class LLAdvancedDumpInfoToConsole : public view_listener_t
std::string info_type = userdata.asString();
if ("region" == info_type)
{
- handle_region_dump_settings(NULL);
+ handle_region_dump_settings();
}
else if ("group" == info_type)
{
- handle_dump_group_info(NULL);
+ handle_dump_group_info();
}
else if ("capabilities" == info_type)
{
- handle_dump_capabilities_info(NULL);
+ handle_dump_capabilities_info();
}
return true;
}
@@ -771,7 +754,7 @@ class LLAdvancedClearGroupCache : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLGroupMgr::debugClearAllGroups(NULL);
+ LLGroupMgr::debugClearAllGroups(nullptr);
return true;
}
};
@@ -782,7 +765,7 @@ class LLAdvancedClearGroupCache : public view_listener_t
/////////////////
// RENDER TYPE //
/////////////////
-U32 render_type_from_string(std::string render_type)
+U32 render_type_from_string(std::string_view render_type)
{
if ("simple" == render_type)
{
@@ -901,7 +884,7 @@ class LLAdvancedCheckRenderType : public view_listener_t
/////////////
// FEATURE //
/////////////
-U32 feature_from_string(std::string feature)
+U32 feature_from_string(std::string_view feature)
{
if ("ui" == feature)
{
@@ -1042,7 +1025,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
//////////////////
// INFO DISPLAY //
//////////////////
-U64 info_display_from_string(std::string info_display)
+U64 info_display_from_string(std::string_view info_display)
{
if ("verify" == info_display)
{
@@ -1271,7 +1254,7 @@ class LLAdvancedSelectedTextureInfo : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_selected_texture_info(NULL);
+ handle_selected_texture_info();
return true;
}
};
@@ -1307,7 +1290,7 @@ class LLAdvancedDumpScriptedCamera : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_dump_followcam(NULL);
+ handle_dump_followcam();
return true;
}
};
@@ -1323,7 +1306,7 @@ class LLAdvancedDumpRegionObjectCache : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_dump_region_object_cache(NULL);
+ handle_dump_region_object_cache();
return true;
}
};
@@ -1382,7 +1365,7 @@ class LLAdvancedResetInterestLists : public view_listener_t
{
bool handleEvent(const LLSD &userdata)
{ // Reset all region interest lists
- handle_reset_interest_lists(NULL);
+ handle_reset_interest_lists();
return true;
}
};
@@ -1451,7 +1434,7 @@ class LLAdvancedBuyCurrencyTest : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_buy_currency_test(NULL);
+ handle_buy_currency_test();
return true;
}
};
@@ -1466,7 +1449,7 @@ class LLAdvancedDumpSelectMgr : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- dump_select_mgr(NULL);
+ dump_select_mgr();
return true;
}
};
@@ -1482,7 +1465,7 @@ class LLAdvancedDumpInventory : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- dump_inventory(NULL);
+ dump_inventory();
return true;
}
};
@@ -1498,7 +1481,7 @@ class LLAdvancedPrintSelectedObjectInfo : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- print_object_info(NULL);
+ print_object_info();
return true;
}
};
@@ -1514,7 +1497,7 @@ class LLAdvancedPrintAgentInfo : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- print_agent_nvpairs(NULL);
+ print_agent_nvpairs();
return true;
}
};
@@ -1627,7 +1610,7 @@ class LLAdvancedToggleXUINameTooltips : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- toggle_show_xui_names(NULL);
+ toggle_show_xui_names();
return true;
}
};
@@ -1636,7 +1619,7 @@ class LLAdvancedCheckXUINameTooltips : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = check_show_xui_names(NULL);
+ bool new_value = check_show_xui_names();
return new_value;
}
};
@@ -1737,7 +1720,7 @@ class LLAdvancedToggleXUINames : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- toggle_show_xui_names(NULL);
+ toggle_show_xui_names();
return true;
}
};
@@ -1746,7 +1729,7 @@ class LLAdvancedCheckXUINames : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = check_show_xui_names(NULL);
+ bool new_value = check_show_xui_names();
return new_value;
}
};
@@ -1764,27 +1747,27 @@ class LLAdvancedGrabBakedTexture : public view_listener_t
std::string texture_type = userdata.asString();
if ("iris" == texture_type)
{
- handle_grab_baked_texture( (void*)BAKED_EYES );
+ handle_grab_baked_texture(BAKED_EYES);
}
else if ("head" == texture_type)
{
- handle_grab_baked_texture( (void*)BAKED_HEAD );
+ handle_grab_baked_texture(BAKED_HEAD);
}
else if ("upper" == texture_type)
{
- handle_grab_baked_texture( (void*)BAKED_UPPER );
+ handle_grab_baked_texture(BAKED_UPPER);
}
else if ("lower" == texture_type)
{
- handle_grab_baked_texture( (void*)BAKED_LOWER );
+ handle_grab_baked_texture(BAKED_LOWER);
}
else if ("skirt" == texture_type)
{
- handle_grab_baked_texture( (void*)BAKED_SKIRT );
+ handle_grab_baked_texture(BAKED_SKIRT);
}
else if ("hair" == texture_type)
{
- handle_grab_baked_texture( (void*)BAKED_HAIR );
+ handle_grab_baked_texture(BAKED_HAIR);
}
return true;
@@ -1800,27 +1783,27 @@ class LLAdvancedEnableGrabBakedTexture : public view_listener_t
if ("iris" == texture_type)
{
- new_value = enable_grab_baked_texture( (void*)BAKED_EYES );
+ new_value = enable_grab_baked_texture(BAKED_EYES);
}
else if ("head" == texture_type)
{
- new_value = enable_grab_baked_texture( (void*)BAKED_HEAD );
+ new_value = enable_grab_baked_texture(BAKED_HEAD);
}
else if ("upper" == texture_type)
{
- new_value = enable_grab_baked_texture( (void*)BAKED_UPPER );
+ new_value = enable_grab_baked_texture(BAKED_UPPER);
}
else if ("lower" == texture_type)
{
- new_value = enable_grab_baked_texture( (void*)BAKED_LOWER );
+ new_value = enable_grab_baked_texture(BAKED_LOWER);
}
else if ("skirt" == texture_type)
{
- new_value = enable_grab_baked_texture( (void*)BAKED_SKIRT );
+ new_value = enable_grab_baked_texture(BAKED_SKIRT);
}
else if ("hair" == texture_type)
{
- new_value = enable_grab_baked_texture( (void*)BAKED_HAIR );
+ new_value = enable_grab_baked_texture(BAKED_HAIR);
}
return new_value;
@@ -1905,7 +1888,7 @@ class LLAdvancedToggleCharacterGeometry : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_god_request_avatar_geometry(NULL);
+ handle_god_request_avatar_geometry();
return true;
}
};
@@ -1919,7 +1902,7 @@ class LLAdvancedTestMale : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_test_male(NULL);
+ handle_test_male();
return true;
}
};
@@ -1929,7 +1912,7 @@ class LLAdvancedTestFemale : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_test_female(NULL);
+ handle_test_female();
return true;
}
};
@@ -1938,7 +1921,7 @@ class LLAdvancedForceParamsToDefault : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLAgent::clearVisualParams(NULL);
+ LLAgent::clearVisualParams(nullptr);
return true;
}
};
@@ -2001,7 +1984,7 @@ class LLAdvancedReloadVertexShader : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- reload_vertex_shader(NULL);
+ reload_vertex_shader();
return true;
}
};
@@ -2165,7 +2148,7 @@ class LLAdvancedDumpAttachments : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_dump_attachments(NULL);
+ handle_dump_attachments();
return true;
}
};
@@ -2181,7 +2164,7 @@ class LLAdvancedRebakeTextures : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_rebake_textures(NULL);
+ handle_rebake_textures();
return true;
}
};
@@ -2199,7 +2182,7 @@ class LLAdvancedDebugAvatarTextures : public view_listener_t
{
if (gAgent.isGodlike())
{
- handle_debug_avatar_textures(NULL);
+ handle_debug_avatar_textures();
}
return true;
}
@@ -2215,7 +2198,7 @@ class LLAdvancedDumpAvatarLocalTextures : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
#ifndef LL_RELEASE_FOR_DOWNLOAD
- handle_dump_avatar_local_textures(NULL);
+ handle_dump_avatar_local_textures();
#endif
return true;
}
@@ -2232,7 +2215,7 @@ class LLAdvancedEnableMessageLog : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_viewer_enable_message_log(NULL);
+ handle_viewer_enable_message_log();
return true;
}
};
@@ -2241,7 +2224,7 @@ class LLAdvancedDisableMessageLog : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_viewer_disable_message_log(NULL);
+ handle_viewer_disable_message_log();
return true;
}
};
@@ -2432,7 +2415,7 @@ class LLAdvancedCompressImage : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_compress_image(NULL);
+ handle_compress_image();
return true;
}
};
@@ -2447,7 +2430,7 @@ class LLAdvancedCompressFileTest : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_compress_file_test(NULL);
+ handle_compress_file_test();
return true;
}
};
@@ -2488,7 +2471,7 @@ class LLAdvancedToggleViewAdminOptions : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_admin_override_toggle(NULL);
+ handle_admin_override_toggle();
return true;
}
};
@@ -2497,7 +2480,7 @@ class LLAdvancedToggleVisualLeakDetector : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_visual_leak_detector_toggle(NULL);
+ handle_visual_leak_detector_toggle();
return true;
}
};
@@ -2506,7 +2489,7 @@ class LLAdvancedCheckViewAdminOptions : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = check_admin_override(NULL) || gAgent.isGodlike();
+ bool new_value = check_admin_override() || gAgent.isGodlike();
return new_value;
}
};
@@ -2520,7 +2503,7 @@ class LLAdvancedRequestAdminStatus : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_god_mode(NULL);
+ handle_god_mode();
return true;
}
};
@@ -2529,7 +2512,7 @@ class LLAdvancedLeaveAdminStatus : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_leave_god_mode(NULL);
+ handle_leave_god_mode();
return true;
}
};
@@ -2542,7 +2525,7 @@ class LLAdvancedForceErrorBreakpoint : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_error_breakpoint(NULL);
+ force_error_breakpoint();
return true;
}
};
@@ -2551,7 +2534,7 @@ class LLAdvancedForceErrorLlerror : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_error_llerror(NULL);
+ force_error_llerror();
return true;
}
};
@@ -2560,7 +2543,7 @@ class LLAdvancedForceErrorLlerrorMsg: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_error_llerror_msg(NULL);
+ force_error_llerror_msg();
return true;
}
};
@@ -2569,7 +2552,7 @@ class LLAdvancedForceErrorBadMemoryAccess : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_error_bad_memory_access(NULL);
+ force_error_bad_memory_access();
return true;
}
};
@@ -2584,7 +2567,7 @@ class LLAdvancedForceErrorBadMemoryAccessCoro : public view_listener_t
// Wait for one mainloop() iteration, letting the enclosing
// handleEvent() method return.
llcoro::suspend();
- force_error_bad_memory_access(NULL);
+ force_error_bad_memory_access();
});
return true;
}
@@ -2594,7 +2577,7 @@ class LLAdvancedForceErrorInfiniteLoop : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_error_infinite_loop(NULL);
+ force_error_infinite_loop();
return true;
}
};
@@ -2603,7 +2586,7 @@ class LLAdvancedForceErrorSoftwareException : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_error_software_exception(NULL);
+ force_error_software_exception();
return true;
}
};
@@ -2612,7 +2595,7 @@ class LLAdvancedForceOSException: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_error_os_exception(NULL);
+ force_error_os_exception();
return true;
}
};
@@ -2627,7 +2610,7 @@ class LLAdvancedForceErrorSoftwareExceptionCoro : public view_listener_t
// Wait for one mainloop() iteration, letting the enclosing
// handleEvent() method return.
llcoro::suspend();
- force_error_software_exception(NULL);
+ force_error_software_exception();
});
return true;
}
@@ -2637,7 +2620,7 @@ class LLAdvancedForceErrorDriverCrash : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_error_driver_crash(NULL);
+ force_error_driver_crash();
return true;
}
};
@@ -2646,7 +2629,7 @@ class LLAdvancedForceErrorCoroutineCrash : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_error_coroutine_crash(NULL);
+ force_error_coroutine_crash();
return true;
}
};
@@ -2655,7 +2638,7 @@ class LLAdvancedForceErrorThreadCrash : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_error_thread_crash(NULL);
+ force_error_thread_crash();
return true;
}
};
@@ -2664,7 +2647,7 @@ class LLAdvancedForceErrorDisconnectViewer : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_disconnect_viewer(NULL);
+ handle_disconnect_viewer();
return true;
}
};
@@ -2676,7 +2659,7 @@ class LLAdvancedHandleToggleHackedGodmode : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_toggle_hacked_godmode(NULL);
+ handle_toggle_hacked_godmode();
return true;
}
};
@@ -2685,7 +2668,7 @@ class LLAdvancedCheckToggleHackedGodmode : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- check_toggle_hacked_godmode(NULL);
+ check_toggle_hacked_godmode();
return true;
}
};
@@ -2694,7 +2677,7 @@ class LLAdvancedEnableToggleHackedGodmode : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = enable_toggle_hacked_godmode(NULL);
+ bool new_value = enable_toggle_hacked_godmode();
return new_value;
}
};
@@ -2739,7 +2722,7 @@ class LLAdminForceTakeCopy : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- force_take_copy(NULL);
+ force_take_copy();
return true;
}
};
@@ -2748,7 +2731,7 @@ class LLAdminHandleObjectOwnerSelf : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_object_owner_self(NULL);
+ handle_object_owner_self();
return true;
}
};
@@ -2756,7 +2739,7 @@ class LLAdminHandleObjectOwnerPermissive : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_object_owner_permissive(NULL);
+ handle_object_owner_permissive();
return true;
}
};
@@ -2765,7 +2748,7 @@ class LLAdminHandleForceDelete : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_force_delete(NULL);
+ handle_force_delete();
return true;
}
};
@@ -2774,7 +2757,7 @@ class LLAdminHandleObjectLock : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_object_lock(NULL);
+ handle_object_lock();
return true;
}
};
@@ -2783,7 +2766,7 @@ class LLAdminHandleObjectAssetIDs: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_object_asset_ids(NULL);
+ handle_object_asset_ids();
return true;
}
};
@@ -2793,7 +2776,7 @@ class LLAdminHandleForceParcelOwnerToMe: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_force_parcel_owner_to_me(NULL);
+ handle_force_parcel_owner_to_me();
return true;
}
};
@@ -2801,7 +2784,7 @@ class LLAdminHandleForceParcelToContent: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_force_parcel_to_content(NULL);
+ handle_force_parcel_to_content();
return true;
}
};
@@ -2809,7 +2792,7 @@ class LLAdminHandleClaimPublicLand: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_claim_public_land(NULL);
+ handle_claim_public_land();
return true;
}
};
@@ -2819,7 +2802,7 @@ class LLAdminHandleRegionDumpTempAssetData: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- handle_region_dump_temp_asset_data(NULL);
+ handle_region_dump_temp_asset_data();
return true;
}
};
@@ -2829,7 +2812,7 @@ class LLAdminOnSaveState: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLPanelRegionTools::onSaveState(NULL);
+ LLPanelRegionTools::onSaveState(nullptr);
return true;
}
};
@@ -3315,41 +3298,11 @@ class LLLandEnableBuyPass : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = LLPanelLandGeneral::enableBuyPass(NULL);
+ bool new_value = LLPanelLandGeneral::enableBuyPass(nullptr);
return new_value;
}
};
-// BUG: Should really check if CLICK POINT is in a parcel where you can build.
-bool enable_land_build(void*)
-{
- if (gAgent.isGodlike()) return true;
- if (gAgent.inPrelude()) return false;
-
- bool can_build = false;
- LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (agent_parcel)
- {
- can_build = agent_parcel->getAllowModify();
- }
- return can_build;
-}
-
-// BUG: Should really check if OBJECT is in a parcel where you can build.
-bool enable_object_build(void*)
-{
- if (gAgent.isGodlike()) return true;
- if (gAgent.inPrelude()) return false;
-
- bool can_build = false;
- LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (agent_parcel)
- {
- can_build = agent_parcel->getAllowModify();
- }
- return can_build;
-}
-
bool enable_object_edit()
{
if (!isAgentAvatarValid()) return false;
@@ -3380,12 +3333,6 @@ bool enable_mute_particle()
return pick.mParticleOwnerID != LLUUID::null && pick.mParticleOwnerID != gAgent.getID();
}
-// mutually exclusive - show either edit option or build in menu
-bool enable_object_build()
-{
- return !enable_object_edit();
-}
-
bool enable_object_select_in_pathfinding_linksets()
{
return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetEditableLinksets();
@@ -3484,9 +3431,8 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t
}
};
-bool enable_has_attachments(void*)
+bool enable_has_attachments()
{
-
return false;
}
@@ -4092,7 +4038,7 @@ void handle_buy_contents(LLSaleInfo sale_info)
LLFloaterBuyContents::show(sale_info);
}
-void handle_region_dump_temp_asset_data(void*)
+void handle_region_dump_temp_asset_data()
{
LL_INFOS() << "Dumping temporary asset data to simulator logs" << LL_ENDL;
std::vector<std::string> strings;
@@ -4100,7 +4046,7 @@ void handle_region_dump_temp_asset_data(void*)
send_generic_message("dumptempassetdata", strings, invoice);
}
-void handle_region_clear_temp_asset_data(void*)
+void handle_region_clear_temp_asset_data()
{
LL_INFOS() << "Clearing temporary asset data" << LL_ENDL;
std::vector<std::string> strings;
@@ -4108,7 +4054,7 @@ void handle_region_clear_temp_asset_data(void*)
send_generic_message("cleartempassetdata", strings, invoice);
}
-void handle_region_dump_settings(void*)
+void handle_region_dump_settings()
{
LLViewerRegion* regionp = gAgent.getRegion();
if (regionp)
@@ -4124,12 +4070,12 @@ void handle_region_dump_settings(void*)
}
}
-void handle_dump_group_info(void *)
+void handle_dump_group_info()
{
gAgent.dumpGroupInfo();
}
-void handle_dump_capabilities_info(void *)
+void handle_dump_capabilities_info()
{
LLViewerRegion* regionp = gAgent.getRegion();
if (regionp)
@@ -4138,7 +4084,7 @@ void handle_dump_capabilities_info(void *)
}
}
-void handle_dump_region_object_cache(void*)
+void handle_dump_region_object_cache()
{
LLViewerRegion* regionp = gAgent.getRegion();
if (regionp)
@@ -4147,7 +4093,7 @@ void handle_dump_region_object_cache(void*)
}
}
-void handle_reset_interest_lists(void *)
+void handle_reset_interest_lists()
{
// Check all regions and reset their interest list
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
@@ -4290,12 +4236,12 @@ class LLTogglePanelPeopleTab : public view_listener_t
}
};
-bool check_admin_override(void*)
+bool check_admin_override()
{
return gAgent.getAdminOverride();
}
-void handle_admin_override_toggle(void*)
+void handle_admin_override_toggle()
{
gAgent.setAdminOverride(!gAgent.getAdminOverride());
@@ -4303,7 +4249,7 @@ void handle_admin_override_toggle(void*)
show_debug_menus();
}
-void handle_visual_leak_detector_toggle(void*)
+void handle_visual_leak_detector_toggle()
{
static bool vld_enabled = false;
@@ -4332,12 +4278,12 @@ void handle_visual_leak_detector_toggle(void*)
};
}
-void handle_god_mode(void*)
+void handle_god_mode()
{
gAgent.requestEnterGodMode();
}
-void handle_leave_god_mode(void*)
+void handle_leave_god_mode()
{
gAgent.requestLeaveGodMode();
}
@@ -4384,18 +4330,18 @@ void set_god_level(U8 god_level)
}
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
-void handle_toggle_hacked_godmode(void*)
+void handle_toggle_hacked_godmode()
{
gHackGodmode = !gHackGodmode;
set_god_level(gHackGodmode ? GOD_MAINTENANCE : GOD_NOT);
}
-bool check_toggle_hacked_godmode(void*)
+bool check_toggle_hacked_godmode()
{
return gHackGodmode;
}
-bool enable_toggle_hacked_godmode(void*)
+bool enable_toggle_hacked_godmode()
{
return !LLGridManager::getInstance()->isInProductionGrid();
}
@@ -4419,41 +4365,6 @@ void process_grant_godlike_powers(LLMessageSystem* msg, void**)
}
}
-/*
-class LLHaveCallingcard : public LLInventoryCollectFunctor
-{
-public:
- LLHaveCallingcard(const LLUUID& agent_id);
- virtual ~LLHaveCallingcard() {}
- virtual bool operator()(LLInventoryCategory* cat,
- LLInventoryItem* item);
- bool isThere() const { return mIsThere;}
-protected:
- LLUUID mID;
- bool mIsThere;
-};
-
-LLHaveCallingcard::LLHaveCallingcard(const LLUUID& agent_id) :
- mID(agent_id),
- mIsThere(false)
-{
-}
-
-bool LLHaveCallingcard::operator()(LLInventoryCategory* cat,
- LLInventoryItem* item)
-{
- if(item)
- {
- if((item->getType() == LLAssetType::AT_CALLINGCARD)
- && (item->getCreatorUUID() == mID))
- {
- mIsThere = true;
- }
- }
- return false;
-}
-*/
-
bool is_agent_mappable(const LLUUID& agent_id)
{
const LLRelationship* buddy_info = NULL;
@@ -4554,7 +4465,7 @@ bool is_object_sittable()
}
// only works on pie menu
-void handle_object_sit(LLViewerObject *object, const LLVector3 &offset)
+void handle_object_sit(LLViewerObject* object, const LLVector3& offset)
{
// get object selection offset
@@ -4603,7 +4514,7 @@ 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)
{
@@ -4653,7 +4564,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()
{
@@ -4663,7 +4574,7 @@ void handle_reset_view()
LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits"));
}
gAgentCamera.setFocusOnAvatar(true, false, false);
- reset_view_final( true );
+ reset_view_final(true);
LLFloaterCamera::resetCameraMode();
}
@@ -4677,7 +4588,7 @@ 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 )
{
@@ -4765,54 +4676,7 @@ class LLViewToggleUI : public view_listener_t
}
};
-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);
-}
-
-
-
-/*
- * No longer able to support viewer side manipulations in this way
- *
-void god_force_inv_owner_permissive(LLViewerObject* object,
- LLInventoryObject::object_list_t* inventory,
- S32 serial_num,
- void*)
-{
- typedef std::vector<LLPointer<LLViewerInventoryItem> > item_array_t;
- item_array_t items;
-
- LLInventoryObject::object_list_t::const_iterator inv_it = inventory->begin();
- LLInventoryObject::object_list_t::const_iterator inv_end = inventory->end();
- for ( ; inv_it != inv_end; ++inv_it)
- {
- if(((*inv_it)->getType() != LLAssetType::AT_CATEGORY))
- {
- LLInventoryObject* obj = *inv_it;
- LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem((LLViewerInventoryItem*)obj);
- LLPermissions perm(new_item->getPermissions());
- perm.setMaskBase(PERM_ALL);
- perm.setMaskOwner(PERM_ALL);
- new_item->setPermissions(perm);
- items.push_back(new_item);
- }
- }
- item_array_t::iterator end = items.end();
- item_array_t::iterator it;
- for(it = items.begin(); it != end; ++it)
- {
- // since we have the inventory item in the callback, it should not
- // invalidate iteration through the selection manager.
- object->updateInventory((*it), TASK_INVENTORY_ITEM_KEY, false);
- }
-}
-*/
-
-void handle_object_owner_permissive(void*)
+void handle_object_owner_permissive()
{
// only send this if they're a god.
if(gAgent.isGodlike())
@@ -4823,7 +4687,7 @@ void handle_object_owner_permissive(void*)
}
}
-void handle_object_owner_self(void*)
+void handle_object_owner_self()
{
// only send this if they're a god.
if(gAgent.isGodlike())
@@ -4833,12 +4697,12 @@ void handle_object_owner_self(void*)
}
// Shortcut to set owner permissions to not editable.
-void handle_object_lock(void*)
+void handle_object_lock()
{
LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, false, PERM_MODIFY);
}
-void handle_object_asset_ids(void*)
+void handle_object_asset_ids()
{
// only send this if they're a god.
if (gAgent.isGodlike())
@@ -4847,17 +4711,17 @@ void handle_object_asset_ids(void*)
}
}
-void handle_force_parcel_owner_to_me(void*)
+void handle_force_parcel_owner_to_me()
{
LLViewerParcelMgr::getInstance()->sendParcelGodForceOwner( gAgent.getID() );
}
-void handle_force_parcel_to_content(void*)
+void handle_force_parcel_to_content()
{
LLViewerParcelMgr::getInstance()->sendParcelGodForceToContent();
}
-void handle_claim_public_land(void*)
+void handle_claim_public_land()
{
if (LLViewerParcelMgr::getInstance()->getSelectionRegion() != gAgent.getRegion())
{
@@ -4899,7 +4763,7 @@ void handle_claim_public_land(void*)
// HACK for easily testing new avatar geometry
-void handle_god_request_avatar_geometry(void *)
+void handle_god_request_avatar_geometry()
{
if (gAgent.isGodlike())
{
@@ -5169,7 +5033,7 @@ void handle_link_objects()
class LLObjectReturn : public view_listener_t
{
public:
- LLObjectReturn() : mFirstRegion(NULL) {}
+ LLObjectReturn() : mFirstRegion() {}
private:
bool handleEvent(const LLSD& userdata)
@@ -5239,7 +5103,7 @@ class LLObjectEnableReturn : public view_listener_t
}
};
-void force_take_copy(void*)
+void force_take_copy()
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return;
const LLUUID category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT);
@@ -5347,7 +5211,7 @@ void handle_take(bool take_separate)
}
});
- if(locked_but_takeable_object ||
+ if (locked_but_takeable_object ||
!you_own_everything)
{
if(locked_but_takeable_object && you_own_everything)
@@ -5930,7 +5794,7 @@ class LLToolsSelectNextPartFace : public view_listener_t
{
if (gFocusMgr.childHasKeyboardFocus(gFloaterTools))
{
- gFocusMgr.setKeyboardFocus(NULL); // force edit toolbox to commit any changes
+ gFocusMgr.setKeyboardFocus(nullptr); // force edit toolbox to commit any changes
}
if (fwd || prev)
{
@@ -6003,7 +5867,7 @@ class LLEditCut : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- if( LLEditMenuHandler::gEditMenuHandler )
+ if (LLEditMenuHandler::gEditMenuHandler)
{
LLEditMenuHandler::gEditMenuHandler->cut();
}
@@ -6024,7 +5888,7 @@ class LLEditCopy : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- if( LLEditMenuHandler::gEditMenuHandler )
+ if (LLEditMenuHandler::gEditMenuHandler)
{
LLEditMenuHandler::gEditMenuHandler->copy();
}
@@ -6045,7 +5909,7 @@ class LLEditPaste : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- if( LLEditMenuHandler::gEditMenuHandler )
+ if (LLEditMenuHandler::gEditMenuHandler)
{
LLEditMenuHandler::gEditMenuHandler->paste();
}
@@ -6068,7 +5932,7 @@ class LLEditDelete : public view_listener_t
{
// If a text field can do a deletion, it gets precedence over deleting
// an object in the world.
- if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete())
+ if (LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete())
{
LLEditMenuHandler::gEditMenuHandler->doDelete();
}
@@ -6179,7 +6043,7 @@ bool enable_object_delete()
class LLObjectsReturnPackage
{
public:
- LLObjectsReturnPackage() : mObjectSelection(), mReturnableObjects(), mError(), mFirstRegion(NULL) {};
+ LLObjectsReturnPackage() : mObjectSelection(), mReturnableObjects(), mError(), mFirstRegion(nullptr) {};
~LLObjectsReturnPackage()
{
mObjectSelection.clear();
@@ -6236,7 +6100,7 @@ void handle_object_delete()
return;
}
-void handle_force_delete(void*)
+void handle_force_delete()
{
LLSelectMgr::getInstance()->selectForceDelete();
}
@@ -6348,12 +6212,12 @@ class LLEditRedo : public view_listener_t
-void print_object_info(void*)
+void print_object_info()
{
LLSelectMgr::getInstance()->selectionDump();
}
-void print_agent_nvpairs(void*)
+void print_agent_nvpairs()
{
LLViewerObject *objectp;
@@ -6402,53 +6266,13 @@ void show_debug_menus()
}
}
-void toggle_debug_menus(void*)
+void toggle_debug_menus()
{
bool visible = ! gSavedSettings.getBOOL("UseDebugMenus");
gSavedSettings.setBOOL("UseDebugMenus", visible);
show_debug_menus();
}
-
-// LLUUID gExporterRequestID;
-// std::string gExportDirectory;
-
-// LLUploadDialog *gExportDialog = NULL;
-
-// void handle_export_selected( void * )
-// {
-// LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
-// if (selection->isEmpty())
-// {
-// return;
-// }
-// LL_INFOS() << "Exporting selected objects:" << LL_ENDL;
-
-// gExporterRequestID.generate();
-// gExportDirectory = "";
-
-// LLMessageSystem* msg = gMessageSystem;
-// msg->newMessageFast(_PREHASH_ObjectExportSelected);
-// msg->nextBlockFast(_PREHASH_AgentData);
-// msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
-// msg->addUUIDFast(_PREHASH_RequestID, gExporterRequestID);
-// msg->addS16Fast(_PREHASH_VolumeDetail, 4);
-
-// for (LLObjectSelection::root_iterator iter = selection->root_begin();
-// iter != selection->root_end(); iter++)
-// {
-// LLSelectNode* node = *iter;
-// LLViewerObject* object = node->getObject();
-// msg->nextBlockFast(_PREHASH_ObjectData);
-// msg->addUUIDFast(_PREHASH_ObjectID, object->getID());
-// LL_INFOS() << "Object: " << object->getID() << LL_ENDL;
-// }
-// msg->sendReliable(gAgent.getRegion()->getHost());
-
-// gExportDialog = LLUploadDialog::modalUploadDialog("Exporting selected objects...");
-// }
-//
-
class LLCommunicateNearbyChat : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -6626,7 +6450,7 @@ void handle_look_at_selection(const LLSD& param)
}
}
-void handle_zoom_to_object(LLUUID object_id)
+void handle_zoom_to_object(const LLUUID& object_id)
{
const F32 PADDING_FACTOR = 2.f;
@@ -6937,28 +6761,28 @@ bool enable_object_sit(LLUICtrl* ctrl)
return !sitting_on_sel && is_object_sittable();
}
-void dump_select_mgr(void*)
+void dump_select_mgr()
{
LLSelectMgr::getInstance()->dump();
}
-void dump_inventory(void*)
+void dump_inventory()
{
gInventory.dumpInventory();
}
-void handle_dump_followcam(void*)
+void handle_dump_followcam()
{
LLFollowCamMgr::getInstance()->dump();
}
-void handle_viewer_enable_message_log(void*)
+void handle_viewer_enable_message_log()
{
gMessageSystem->startLogging();
}
-void handle_viewer_disable_message_log(void*)
+void handle_viewer_disable_message_log()
{
gMessageSystem->stopLogging();
}
@@ -7325,7 +7149,7 @@ class LLWorldEnableBuyLand : public view_listener_t
}
};
-bool enable_buy_land(void*)
+bool enable_buy_land()
{
return LLViewerParcelMgr::getInstance()->canAgentBuyParcel(
LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(), false);
@@ -7411,7 +7235,7 @@ void LLObjectAttachToAvatar::onNearAttachObject(bool success, void *user_data)
}
LLSelectMgr::getInstance()->sendAttach(cb_data->getSelection(), attachment_id, cb_data->mReplace);
}
- LLObjectAttachToAvatar::setObjectSelection(NULL);
+ LLObjectAttachToAvatar::setObjectSelection(nullptr);
delete cb_data;
}
@@ -7990,7 +7814,7 @@ class LLToolsSelectedScriptAction : public view_listener_t
}
};
-void handle_selected_texture_info(void*)
+void handle_selected_texture_info()
{
for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin();
iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++)
@@ -8078,21 +7902,22 @@ void handle_selected_material_info()
}
}
-void handle_test_male(void*)
+void handle_test_male()
{
LLAppearanceMgr::instance().wearOutfitByName("Male Shape & Outfit");
//gGestureList.requestResetFromServer( true );
}
-void handle_test_female(void*)
+void handle_test_female()
{
LLAppearanceMgr::instance().wearOutfitByName("Female Shape & Outfit");
//gGestureList.requestResetFromServer( false );
}
-void handle_dump_attachments(void*)
+void handle_dump_attachments()
{
- if(!isAgentAvatarValid()) return;
+ if (!isAgentAvatarValid())
+ return;
for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
iter != gAgentAvatarp->mAttachmentPoints.end(); )
@@ -8294,12 +8119,12 @@ class LLToggleShaderControl : public view_listener_t
}
};
-void menu_toggle_attached_lights(void* user_data)
+void menu_toggle_attached_lights()
{
LLPipeline::sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");
}
-void menu_toggle_attached_particles(void* user_data)
+void menu_toggle_attached_particles()
{
LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
}
@@ -8317,11 +8142,11 @@ class LLAdvancedHandleAttachedLightParticles: public view_listener_t
// update internal flags
if (control_name == "RenderAttachedLights")
{
- menu_toggle_attached_lights(NULL);
+ menu_toggle_attached_lights();
}
else if (control_name == "RenderAttachedParticles")
{
- menu_toggle_attached_particles(NULL);
+ menu_toggle_attached_particles();
}
return true;
}
@@ -8436,7 +8261,7 @@ bool LLHasAsset::operator()(LLInventoryCategory* cat,
}
-bool enable_save_into_task_inventory(void*)
+bool enable_save_into_task_inventory()
{
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
if(node && (node->mValid) && (!node->mFromTaskID.isNull()))
@@ -8455,7 +8280,7 @@ class LLToolsEnableSaveToObjectInventory : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = enable_save_into_task_inventory(NULL);
+ bool new_value = enable_save_into_task_inventory();
return new_value;
}
};
@@ -8518,12 +8343,12 @@ class LLWorldEnableTeleportHome : public view_listener_t
}
};
-bool enable_god_full(void*)
+bool enable_god_full()
{
return gAgent.getGodLevel() >= GOD_FULL;
}
-bool enable_god_liaison(void*)
+bool enable_god_liaison()
{
return gAgent.getGodLevel() >= GOD_LIAISON;
}
@@ -8533,18 +8358,18 @@ bool is_god_customer_service()
return gAgent.getGodLevel() >= GOD_CUSTOMER_SERVICE;
}
-bool enable_god_basic(void*)
+bool enable_god_basic()
{
return gAgent.getGodLevel() > GOD_NOT;
}
-void toggle_show_xui_names(void *)
+void toggle_show_xui_names()
{
gSavedSettings.setBOOL("DebugShowXUINames", !gSavedSettings.getBOOL("DebugShowXUINames"));
}
-bool check_show_xui_names(void *)
+bool check_show_xui_names()
{
return gSavedSettings.getBOOL("DebugShowXUINames");
}
@@ -8650,12 +8475,12 @@ class LLToolsEditLinkedParts : public view_listener_t
}
};
-void reload_vertex_shader(void *)
+void reload_vertex_shader()
{
//THIS WOULD BE AN AWESOME PLACE TO RELOAD SHADERS... just a thought - DaveP
}
-void handle_dump_avatar_local_textures(void*)
+void handle_dump_avatar_local_textures()
{
gAgentAvatarp->dumpLocalTextures();
}
@@ -8665,7 +8490,7 @@ void handle_dump_timers()
LLTrace::BlockTimer::dumpCurTimes();
}
-void handle_debug_avatar_textures(void*)
+void handle_debug_avatar_textures()
{
LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
if (objectp)
@@ -8674,10 +8499,10 @@ void handle_debug_avatar_textures(void*)
}
}
-void handle_grab_baked_texture(void* data)
+void handle_grab_baked_texture(EBakedTextureIndex baked_tex_index)
{
- EBakedTextureIndex baked_tex_index = (EBakedTextureIndex)((intptr_t)data);
- if (!isAgentAvatarValid()) return;
+ if (!isAgentAvatarValid())
+ return;
const LLUUID& asset_id = gAgentAvatarp->grabBakedTexture(baked_tex_index);
LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << LL_ENDL;
@@ -8740,19 +8565,18 @@ void handle_grab_baked_texture(void* data)
}
}
-bool enable_grab_baked_texture(void* data)
+bool enable_grab_baked_texture(EBakedTextureIndex baked_tex_index)
{
- EBakedTextureIndex index = (EBakedTextureIndex)((intptr_t)data);
if (isAgentAvatarValid())
{
- return gAgentAvatarp->canGrabBakedTexture(index);
+ return gAgentAvatarp->canGrabBakedTexture(baked_tex_index);
}
return false;
}
// Returns a pointer to the avatar give the UUID of the avatar OR of an attachment the avatar is wearing.
// Returns NULL on failure.
-LLVOAvatar* find_avatar_from_object( LLViewerObject* object )
+LLVOAvatar* find_avatar_from_object(LLViewerObject* object)
{
if (object)
{
@@ -8776,63 +8600,63 @@ LLVOAvatar* find_avatar_from_object( LLViewerObject* object )
// Returns a pointer to the avatar give the UUID of the avatar OR of an attachment the avatar is wearing.
// Returns NULL on failure.
-LLVOAvatar* find_avatar_from_object( const LLUUID& object_id )
+LLVOAvatar* find_avatar_from_object(const LLUUID& object_id)
{
return find_avatar_from_object( gObjectList.findObject(object_id) );
}
-void handle_disconnect_viewer(void *)
+void handle_disconnect_viewer()
{
LLAppViewer::instance()->forceDisconnect(LLTrans::getString("TestingDisconnect"));
}
-void force_error_breakpoint(void *)
+void force_error_breakpoint()
{
LLAppViewer::instance()->forceErrorBreakpoint();
}
-void force_error_llerror(void *)
+void force_error_llerror()
{
LLAppViewer::instance()->forceErrorLLError();
}
-void force_error_llerror_msg(void*)
+void force_error_llerror_msg()
{
LLAppViewer::instance()->forceErrorLLErrorMsg();
}
-void force_error_bad_memory_access(void *)
+void force_error_bad_memory_access()
{
LLAppViewer::instance()->forceErrorBadMemoryAccess();
}
-void force_error_infinite_loop(void *)
+void force_error_infinite_loop()
{
LLAppViewer::instance()->forceErrorInfiniteLoop();
}
-void force_error_software_exception(void *)
+void force_error_software_exception()
{
LLAppViewer::instance()->forceErrorSoftwareException();
}
-void force_error_os_exception(void*)
+void force_error_os_exception()
{
LLAppViewer::instance()->forceErrorOSSpecificException();
}
-void force_error_driver_crash(void *)
+void force_error_driver_crash()
{
LLAppViewer::instance()->forceErrorDriverCrash();
}
-void force_error_coroutine_crash(void *)
+void force_error_coroutine_crash()
{
LLAppViewer::instance()->forceErrorCoroutineCrash();
}
-void force_error_thread_crash(void *)
+void force_error_thread_crash()
{
LLAppViewer::instance()->forceErrorThreadCrash();
}
@@ -8857,7 +8681,7 @@ class LLToolsUseSelectionForGrid : public view_listener_t
}
};
-void handle_test_load_url(void*)
+void handle_test_load_url()
{
LLWeb::loadURL("");
LLWeb::loadURL("hacker://www.google.com/");
@@ -8965,7 +8789,7 @@ void handle_report_bug(const LLSD& param)
LLWeb::loadURLExternal(url);
}
-void handle_buy_currency_test(void*)
+void handle_buy_currency_test()
{
std::string url =
"http://sarahd-sl-13041.webdev.lindenlab.com/app/lindex/index.php?agent_id=[AGENT_ID]&secure_session_id=[SESSION_ID]&lang=[LANGUAGE]";
@@ -8982,7 +8806,7 @@ void handle_buy_currency_test(void*)
}
// SUNSHINE CLEANUP - is only the request update at the end needed now?
-void handle_rebake_textures(void*)
+void handle_rebake_textures()
{
if (!isAgentAvatarValid()) return;
@@ -8995,15 +8819,13 @@ void handle_rebake_textures(void*)
}
}
-void toggle_visibility(void* user_data)
+void toggle_visibility(LLView* viewp)
{
- LLView* viewp = (LLView*)user_data;
viewp->setVisible(!viewp->getVisible());
}
-bool get_visibility(void* user_data)
+bool get_visibility(LLView* viewp)
{
- LLView* viewp = (LLView*)user_data;
return viewp->getVisible();
}
@@ -10221,7 +10043,6 @@ void initialize_menus()
enable.add("EnablePayAvatar", boost::bind(&enable_pay_avatar));
enable.add("EnableEdit", boost::bind(&enable_object_edit));
enable.add("EnableMuteParticle", boost::bind(&enable_mute_particle));
- enable.add("VisibleBuild", boost::bind(&enable_object_build));
commit.add("Pathfinding.Linksets.Select", boost::bind(&LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects));
enable.add("EnableSelectInPathfindingLinksets", boost::bind(&enable_object_select_in_pathfinding_linksets));
enable.add("VisibleSelectInPathfindingLinksets", boost::bind(&visible_object_select_in_pathfinding_linksets));
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 8c5e0705d0..68c3dbc126 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -44,54 +44,21 @@ void init_menus();
void cleanup_menus();
void show_debug_menus(); // checks for if menus should be shown first.
-void toggle_debug_menus(void*);
-void show_context_menu( S32 x, S32 y, MASK mask );
-void show_build_mode_context_menu(S32 x, S32 y, MASK mask);
+void toggle_debug_menus();
void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y);
void show_topinfobar_context_menu(LLView* ctrl, S32 x, S32 y);
void handle_reset_view();
-void handle_cut(void*);
-void handle_copy(void*);
-void handle_paste(void*);
-void handle_delete(void*);
-void handle_redo(void*);
-void handle_undo(void*);
-void handle_select_all(void*);
-void handle_deselect(void*);
-void handle_delete_object();
-void handle_duplicate(void*);
-void handle_duplicate_in_place(void*);
-bool enable_not_have_card(void *userdata);
void process_grant_godlike_powers(LLMessageSystem* msg, void**);
-bool enable_cut(void*);
-bool enable_copy(void*);
-bool enable_paste(void*);
-bool enable_select_all(void*);
-bool enable_deselect(void*);
-bool enable_undo(void*);
-bool enable_redo(void*);
-
bool is_agent_mappable(const LLUUID& agent_id);
-void confirm_replace_attachment(S32 option, void* user_data);
-void handle_detach_from_avatar(const LLSD& user_data);
-void attach_label(std::string& label, const LLSD&);
-void detach_label(std::string& label, const LLSD&);
-void handle_detach(void*);
-bool enable_god_full(void* user_data);
-bool enable_god_liaison(void* user_data);
-bool enable_god_basic(void* user_data);
+bool enable_god_full();
+bool enable_god_liaison();
+bool enable_god_basic();
void check_merchant_status(bool force = false);
-void exchange_callingcard(const LLUUID& dest_id);
-
-void handle_gestures(void*);
-void handle_sit_down(void*);
-void handle_object_build(void*);
void handle_object_touch();
bool enable_object_edit_gltf_material();
-bool enable_object_save_gltf_material();
bool enable_object_open();
void handle_object_open();
@@ -106,12 +73,11 @@ void handle_buy();
void handle_take(bool take_separate = false);
void handle_take_copy();
void handle_look_at_selection(const LLSD& param);
-void handle_zoom_to_object(LLUUID object_id);
+void handle_zoom_to_object(const LLUUID& object_id);
void handle_object_return();
void handle_object_delete();
void handle_object_edit();
void handle_object_edit_gltf_material();
-void handle_object_save_gltf_material();
void handle_attachment_edit(const LLUUID& inv_item_id);
void handle_attachment_touch(const LLUUID& inv_item_id);
@@ -144,13 +110,10 @@ bool enable_pay_object();
bool enable_buy_object();
bool handle_go_to();
-// Export to XML or Collada
-void handle_export_selected( void * );
-
// Convert strings to internal types
-U32 render_type_from_string(std::string render_type);
-U32 feature_from_string(std::string feature);
-U64 info_display_from_string(std::string info_display);
+U32 render_type_from_string(std::string_view render_type);
+U32 feature_from_string(std::string_view feature);
+U64 info_display_from_string(std::string_view info_display);
class LLViewerMenuHolderGL : public LLMenuHolderGL
{
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 83f8e96f9a..ce66dbc03f 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -990,7 +990,7 @@ class LLFileQuit : public view_listener_t
};
-void handle_compress_image(void*)
+void handle_compress_image()
{
LLFilePicker& picker = LLFilePicker::instance();
if (picker.getMultipleOpenFiles(LLFilePicker::FFLOAD_IMAGE))
@@ -1040,7 +1040,7 @@ size_t get_file_size(std::string &filename)
return file_length;
}
-void handle_compress_file_test(void*)
+void handle_compress_file_test()
{
LLFilePicker& picker = LLFilePicker::instance();
if (picker.getOpenFile())
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 7b8739c7df..9b7e0e8839 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -228,7 +228,6 @@ const F32 DEFERRED_LIGHT_FALLOFF = 0.5f;
const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1;
extern S32 gBoxFrame;
-//extern bool gHideSelectedObjects;
extern bool gDisplaySwapBuffers;
extern bool gDebugGL;
extern bool gCubeSnapshot;