Remove clamp macro

Doesn't really need to exist since  all it's doing is inlining std::clamp.
This commit is contained in:
sukibaby
2024-09-03 20:50:48 -07:00
committed by teejusb
parent 51dbbeac1c
commit 21088502b9
36 changed files with 61 additions and 64 deletions
+2 -2
View File
@@ -585,7 +585,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
if( cd != Difficulty_Medium && !e->bNoDifficult )
{
Difficulty new_dc = ( Difficulty )( dc + cd - Difficulty_Medium );
new_dc = clamp( new_dc, ( Difficulty )0, ( Difficulty )( Difficulty_Edit - 1 ) );
new_dc = std::clamp( new_dc, ( Difficulty )0, ( Difficulty )( Difficulty_Edit - 1 ) );
/*
// re-edit this code to work using the metric.
Difficulty new_dc;
@@ -817,7 +817,7 @@ void Course::GetTrailUnsortedEndless( const std::vector<CourseEntry> &entries, T
{
new_dc = cd;
}
new_dc = clamp( new_dc, ( Difficulty )0, ( Difficulty )( Difficulty_Edit - 1 ) );
new_dc = std::clamp( new_dc, ( Difficulty )0, ( Difficulty )( Difficulty_Edit - 1 ) );
/*
// re-edit this code to work using the metric.
Difficulty new_dc;