From 5547f8723a9be83a23e2cf5b56d95af6b13d0918 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Tue, 26 Dec 2023 21:59:30 -0500 Subject: [PATCH] Trivial cleanup --- indra/newview/llnavigationbar.h | 3 --- indra/newview/llvoicevisualizer.h | 2 +- indra/newview/llwind.h | 4 ++-- indra/newview/llworldmapview.cpp | 20 ++++++++++---------- indra/newview/llworldmipmap.h | 4 ++-- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 4b1a6ec720e..bafb962903a 100755 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -109,9 +109,6 @@ class LLNavigationBar final void refreshLocationCtrl(); // [/RLVa:KB] private: - // the distance between navigation panel and favorites panel in pixels - const static S32 FAVBAR_TOP_PADDING = 10; - void rebuildTeleportHistoryMenu(); void showTeleportHistoryMenu(LLUICtrl* btn_ctrl); void invokeSearch(std::string search_text); diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h index 87ba1dbc3ea..dfd4a19f9b1 100644 --- a/indra/newview/llvoicevisualizer.h +++ b/indra/newview/llvoicevisualizer.h @@ -60,7 +60,7 @@ enum VoiceGesticulationLevel NUM_VOICE_GESTICULATION_LEVELS }; -const static int NUM_VOICE_SYMBOL_WAVES = 7; +constexpr int NUM_VOICE_SYMBOL_WAVES = 7; //---------------------------------------------------- // LLVoiceVisualizer class diff --git a/indra/newview/llwind.h b/indra/newview/llwind.h index 9a9e08515f9..e79407ad7ec 100644 --- a/indra/newview/llwind.h +++ b/indra/newview/llwind.h @@ -39,8 +39,8 @@ class LLGroupHeader; class LLWind { - static const size_t WIND_SIZE = 16; - static const size_t ARRAY_SIZE = WIND_SIZE * WIND_SIZE; + static constexpr size_t WIND_SIZE = 16; + static constexpr size_t ARRAY_SIZE = WIND_SIZE * WIND_SIZE; public: static constexpr F32 WIND_SCALE_HACK = 2.0f; // hack to make wind speeds more realistic diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index cd0c2244ef3..a88426926e4 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -64,21 +64,21 @@ #include "llglheaders.h" // # Constants -static const F32 MAP_DEFAULT_SCALE = 128.f; -static const F32 MAP_ITERP_TIME_CONSTANT = 0.75f; -static const F32 MAP_ZOOM_ACCELERATION_TIME = 0.3f; -static const F32 MAP_ZOOM_MAX_INTERP = 0.5f; -static const F32 MAP_SCALE_SNAP_THRESHOLD = 0.005f; +static constexpr F32 MAP_DEFAULT_SCALE = 128.f; +static constexpr F32 MAP_ITERP_TIME_CONSTANT = 0.75f; +static constexpr F32 MAP_ZOOM_ACCELERATION_TIME = 0.3f; +static constexpr F32 MAP_ZOOM_MAX_INTERP = 0.5f; +static constexpr F32 MAP_SCALE_SNAP_THRESHOLD = 0.005f; // Basically a C++ implementation of the OCEAN_COLOR defined in mapstitcher.py // Please ensure consistency between those 2 files (TODO: would be better to get that color from an asset source...) // OCEAN_COLOR = "#1D475F" -const F32 OCEAN_RED = (F32)(0x1D)/255.f; -const F32 OCEAN_GREEN = (F32)(0x47)/255.f; -const F32 OCEAN_BLUE = (F32)(0x5F)/255.f; +constexpr F32 OCEAN_RED = (F32)(0x1D)/255.f; +constexpr F32 OCEAN_GREEN = (F32)(0x47)/255.f; +constexpr F32 OCEAN_BLUE = (F32)(0x5F)/255.f; -const F32 GODLY_TELEPORT_HEIGHT = 200.f; -const F32 BIG_DOT_RADIUS = 5.f; +constexpr F32 GODLY_TELEPORT_HEIGHT = 200.f; +constexpr F32 BIG_DOT_RADIUS = 5.f; BOOL LLWorldMapView::sHandledLastClick = FALSE; LLUIImagePtr LLWorldMapView::sAvatarSmallImage = NULL; diff --git a/indra/newview/llworldmipmap.h b/indra/newview/llworldmipmap.h index 0b8b132713a..426b8276435 100644 --- a/indra/newview/llworldmipmap.h +++ b/indra/newview/llworldmipmap.h @@ -55,8 +55,8 @@ class LLWorldMipmap { public: // Parameters of the mipmap - static const S32 MAP_LEVELS = 8; // Number of subresolution levels computed by the mapserver - static const S32 MAP_TILE_SIZE = 256; // Width in pixels of the tiles computed by the mapserver + static constexpr S32 MAP_LEVELS = 8; // Number of subresolution levels computed by the mapserver + static constexpr S32 MAP_TILE_SIZE = 256; // Width in pixels of the tiles computed by the mapserver LLWorldMipmap(); ~LLWorldMipmap(); -- GitLab