diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp
index 684aca476c..bc9f578660 100644
--- a/indra/llcharacter/llmotion.cpp
+++ b/indra/llcharacter/llmotion.cpp
@@ -32,12 +32,6 @@
#include "llmotion.h"
#include "llcriticaldamp.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// LLMotion class
diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp
index 3d497a52b2..bcaac1e848 100644
--- a/indra/llcommon/llfasttimer.cpp
+++ b/indra/llcommon/llfasttimer.cpp
@@ -325,37 +325,14 @@ void BlockTimer::processTimes()
#endif
}
-// Define a static empty vector that will be used for the root's children.
-static std::vector sEmptyChildren;
-
std::vector::iterator BlockTimerStatHandle::beginChildren()
-{
- // If this is the root node, return an iterator over an empty container.
- if (this == &BlockTimer::getRootTimeBlock())
- {
- return sEmptyChildren.begin();
- }
- auto it = getTreeNode().mChildren.begin();
- while (it != getTreeNode().mChildren.end() && *it == nullptr)
- {
- ++it;
- }
- return it;
-}
+ {
+ return getTreeNode().mChildren.begin();
+ }
std::vector::iterator BlockTimerStatHandle::endChildren()
-{
- // For the root node, return the end iterator of the empty container.
- if (this == &BlockTimer::getRootTimeBlock())
- {
- return sEmptyChildren.end();
- }
- auto it = getTreeNode().mChildren.end();
- while (it != getTreeNode().mChildren.begin() && *(it - 1) == nullptr)
- {
- --it;
- }
- return it;
+ {
+ return getTreeNode().mChildren.end();
}
std::vector& BlockTimerStatHandle::getChildren()
@@ -421,13 +398,6 @@ void BlockTimer::dumpCurTimes()
LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording();
LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording();
- // If the root timer's children container is empty,
- // there's nothing to traverse so we simply return.
- if ( BlockTimer::getRootTimeBlock().getTreeNode().mChildren.empty() )
- {
- return;
- }
-
// walk over timers in depth order and output timings
for(block_timer_tree_df_iterator_t it = begin_timer_tree(BlockTimer::getRootTimeBlock());
it != end_timer_tree();
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index 74e393794e..2143ae54a0 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -33,12 +33,6 @@
#include "llsdserialize.h"
#include
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
//=========================================================================
namespace
{
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 8cebca74d8..efcbc06e18 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -32,11 +32,8 @@
#include "llfasttimer.h"
#include "v3colorutil.h"
#include
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
+
+
//=========================================================================
namespace
{
diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp
index 5c3219de33..b5d59dc497 100644
--- a/indra/llinventory/llsettingswater.cpp
+++ b/indra/llinventory/llsettingswater.cpp
@@ -33,12 +33,6 @@
#include "indra_constants.h"
#include
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
const std::string LLSettingsWater::SETTING_BLUR_MULTIPLIER("blur_multiplier");
const std::string LLSettingsWater::SETTING_FOG_COLOR("water_fog_color");
const std::string LLSettingsWater::SETTING_FOG_DENSITY("water_fog_density");
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index 19cd1d5de2..f5e9cdc7e4 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -358,12 +358,10 @@ inline F32 snap_to_sig_figs(F32 foo, S32 sig_figs)
return new_foo;
}
-#if __cplusplus < 202002L
inline F32 lerp(F32 a, F32 b, F32 u)
{
return a + ((b - a) * u);
}
-#endif
inline F32 lerp2d(F32 x00, F32 x01, F32 x10, F32 x11, F32 u, F32 v)
{
@@ -380,7 +378,7 @@ inline F32 ramp(F32 x, F32 a, F32 b)
inline F32 rescale(F32 x, F32 x1, F32 x2, F32 y1, F32 y2)
{
- return std::lerp(y1, y2, ramp(x, x1, x2));
+ return lerp(y1, y2, ramp(x, x1, x2));
}
inline F32 clamp_rescale(F32 x, F32 x1, F32 x2, F32 y1, F32 y2)
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index e7bb8cc915..884d90158b 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -57,12 +57,6 @@
#include "meshoptimizer/meshoptimizer.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
#define DEBUG_SILHOUETTE_BINORMALS 0
#define DEBUG_SILHOUETTE_NORMALS 0 // TomY: Use this to display normals using the silhouette
#define DEBUG_SILHOUETTE_EDGE_MAP 0 // DaveP: Use this to display edge map using the silhouette
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index 0dd6941867..8ef5a47a8d 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -41,11 +41,6 @@
#include "llrender2dutils.h"
#include "lluiimage.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
//
// Globals
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 4d55b3d16f..cbce9a87d5 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -56,12 +56,6 @@
#include "llcheckboxctrl.h" // Add checkbox control toggle
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
static LLDefaultChildRegistry::Register r("button");
// Compiler optimization, generate extern template
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 9c530821db..5d29177f53 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -60,11 +60,6 @@
#include "llsdutil.h"
#include "lluiusage.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
// use this to control "jumping" behavior when Ctrl-Tabbing
const S32 TABBED_FLOATER_OFFSET = 0;
diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h
index 3e0c6ea3d1..1fa0ac137e 100644
--- a/indra/llui/llfocusmgr.h
+++ b/indra/llui/llfocusmgr.h
@@ -101,7 +101,7 @@ public:
void setKeystrokesOnly(bool keystrokes_only) { mKeystrokesOnly = keystrokes_only; }
F32 getFocusFlashAmt() const;
- S32 getFocusFlashWidth() const { return ll_round(std::lerp(1.f, 3.f, getFocusFlashAmt())); }
+ S32 getFocusFlashWidth() const { return ll_round(lerp(1.f, 3.f, getFocusFlashAmt())); }
LLColor4 getFocusColor() const;
void triggerFocusFlash();
bool getAppHasFocus() const { return mAppHasFocus; }
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index aac4a2ca0f..6097f91f09 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -41,12 +41,6 @@
#include "lltrans.h"
#include "llwindow.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
///----------------------------------------------------------------------------
/// Class LLFolderViewItem
///----------------------------------------------------------------------------
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 598ae2f8f5..6ea0d683a3 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -36,12 +36,6 @@
#include "lliconctrl.h"
#include "boost/foreach.hpp"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
static const F32 MIN_FRACTIONAL_SIZE = 0.00001f;
static const F32 MAX_FRACTIONAL_SIZE = 1.f;
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 4fed3d698b..6fffea386f 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -62,13 +62,6 @@
#include
#include "llclipboard.h" // use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
// static
LLMenuHolderGL *LLMenuGL::sMenuContainer = NULL;
view_listener_t::listener_map_t view_listener_t::sListeners;
diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp
index cc439231bb..d0eec387bd 100644
--- a/indra/llui/llscrollbar.cpp
+++ b/indra/llui/llscrollbar.cpp
@@ -42,12 +42,6 @@
#include "llrender.h"
#include "lluictrlfactory.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
static LLDefaultChildRegistry::Register register_scrollbar("scroll_bar");
LLScrollbar::Params::Params()
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
index 8e5fea710d..46b4071675 100644
--- a/indra/llui/llstatbar.cpp
+++ b/indra/llui/llstatbar.cpp
@@ -42,12 +42,6 @@
#include
#include "lltrans.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
// rate at which to update display of value that is rapidly changing
const F32 MEAN_VALUE_UPDATE_TIME = 1.f / 4.f;
// time between value changes that qualifies as a "rapid change"
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index df03cac253..51d0694dc8 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -40,11 +40,6 @@
#include "lltrans.h"
#include "lluiusage.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
//----------------------------------------------------------------------------
// Implementation Notes:
diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp
index fd28ea47dd..d53fd6eb91 100644
--- a/indra/llui/llviewborder.cpp
+++ b/indra/llui/llviewborder.cpp
@@ -30,12 +30,6 @@
#include "lluictrlfactory.h"
#include "lluiimage.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
static LLDefaultChildRegistry::Register r("view_border");
void LLViewBorder::BevelValues::declareValues()
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index a289875a90..cea5800c36 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -58,12 +58,6 @@
#include "fscommon.h"
#include "lltrans.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
using namespace LLAvatarAppearanceDefines;
extern LLMenuBarGL* gMenuBarView;
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp
index dda10c8242..0b5198bbd3 100644
--- a/indra/newview/llagentpilot.cpp
+++ b/indra/newview/llagentpilot.cpp
@@ -38,12 +38,6 @@
#include "llsdserialize.h"
#include "llsdutil_math.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
LLAgentPilot gAgentPilot;
LLAgentPilot::LLAgentPilot() :
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 641f817ef5..bb73db96ef 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -70,12 +70,6 @@
#include "fscommon.h"
#include "llviewernetwork.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
//=========================================================================
namespace
{
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 67ae2caa10..43b9f6f692 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -55,13 +55,6 @@
#include "llmetricperformancetester.h"
#include "llviewerstats.h"
-
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
//////////////////////////////////////////////////////////////////////////////
using namespace LLTrace;
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 4c1961d29b..7d098b2676 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -43,12 +43,6 @@
#include "llworld.h"
#include "llvoavatar.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
static const F32 SEC_PER_FLEXI_FRAME = 1.f / 60.f; // 60 flexi updates per second
/*static*/ F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f;
std::vector LLVolumeImplFlexible::sInstanceList;
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 84a2354080..fa1f800952 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -51,13 +51,6 @@
#include "rlvcommon.h"
// [/RLVa:KB]
#include
-
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
const F32 HORIZONTAL_PADDING = 15.f;
const F32 VERTICAL_PADDING = 12.f;
const F32 BUFFER_SIZE = 2.f;
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index b35e27f1e4..10ae85baf9 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -47,13 +47,6 @@
#include "llviewermenu.h"
#include "llviewernetwork.h"
-
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
// History (may be apocryphal)
//
// Around V2, an HTTP inventory download mechanism was added
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 4aaf25075b..3ebae4649b 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -62,13 +62,6 @@
#include "llmeshrepository.h"
#include "lltrans.h"
-
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
const F32 MAX_MANIP_SELECT_DISTANCE_SQUARED = 11.f * 11.f;
const F32 SNAP_GUIDE_SCREEN_OFFSET = 0.05f;
const F32 SNAP_GUIDE_SCREEN_LENGTH = 0.7f;
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 17e6331881..4b93d946ec 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -66,14 +66,6 @@
#include "rlvhandler.h"
// [/RLVa:KB]
-
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
-
const S32 NUM_AXES = 3;
const S32 MOUSE_DRAG_SLOP = 2; // pixels
const F32 SELECTED_ARROW_SCALE = 1.3f;
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 2396f6369a..4de1b06cbd 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -65,13 +65,6 @@
#include
-
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
// Functions pulled from llviewerdisplay.cpp
bool get_hud_matrices(glm::mat4 &proj, glm::mat4 &model);
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index e99d85c0e3..c9826a9775 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -57,13 +57,6 @@
#include "llworld.h"
#include
-
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
constexpr F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
constexpr F32 SHINE_TIME = 0.5f;
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 49835c8bd0..3d762c5928 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -104,13 +104,6 @@
#include
#include
-
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
extern LLPointer gStartTexture;
extern bool gShiftFrame;
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index ea0f6cb027..dda38667ec 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -43,13 +43,6 @@
#include "llvoavatarself.h"
#include "llvovolume.h"
-
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
const F32 PART_SIM_BOX_SIDE = 16.f;
//static
diff --git a/indra/newview/llvisualeffect.cpp b/indra/newview/llvisualeffect.cpp
index 161218c2a3..ffa8164e49 100644
--- a/indra/newview/llvisualeffect.cpp
+++ b/indra/newview/llvisualeffect.cpp
@@ -21,13 +21,6 @@
#include
#include
-
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
// ============================================================================
// LLTweenableValue class
//
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index a46d9faa28..4e100da0fc 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -69,12 +69,6 @@
#include "llglheaders.h"
-// use std::lerp for C++20
-#if __cplusplus >= 202002L
-using std::lerp;
-#endif
-//
-
// # Constants
static constexpr F32 MAP_DEFAULT_SCALE = 128.f;
static constexpr F32 MAP_ITERP_TIME_CONSTANT = 0.75f;