Codechange: Use std::swap() instead of Swap() (#13883)

This commit is contained in:
Peter Nelson
2025-03-24 23:47:34 +00:00
committed by GitHub
parent 8a53ccf8f1
commit 79ef4e98fe
17 changed files with 37 additions and 50 deletions

View File

@@ -271,19 +271,6 @@ constexpr bool IsInsideMM(const size_t x, const size_t min, const size_t max) no
constexpr bool IsInsideMM(const ConvertibleThroughBase auto x, const size_t min, const size_t max) noexcept { return IsInsideMM(x.base(), min, max); }
/**
* Type safe swap operation
* @param a variable to swap with b
* @param b variable to swap with a
*/
template <typename T>
constexpr void Swap(T &a, T &b)
{
T t = a;
a = b;
b = t;
}
/**
* Converts a "fract" value 0..255 to "percent" value 0..100
* @param i value to convert, range 0..255