1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:47:44 +00:00

Everywhere: Run clang-format

This commit is contained in:
Linus Groh 2022-10-17 00:06:11 +02:00
parent 8639d8bc21
commit d26aabff04
140 changed files with 1202 additions and 723 deletions

View file

@ -24,11 +24,10 @@ namespace AK {
// Concept to detect types which look like timespec without requiring the type.
template<typename T>
concept TimeSpecType = requires(T t)
{
t.tv_sec;
t.tv_nsec;
};
concept TimeSpecType = requires(T t) {
t.tv_sec;
t.tv_nsec;
};
constexpr bool is_leap_year(int year)
{
@ -315,38 +314,38 @@ inline void timespec_to_timeval(TimespecType const& ts, TimevalType& tv)
}
template<TimeSpecType T>
inline bool operator>=(const T& a, const T& b)
inline bool operator>=(T const& a, T const& b)
{
return a.tv_sec > b.tv_sec || (a.tv_sec == b.tv_sec && a.tv_nsec >= b.tv_nsec);
}
template<TimeSpecType T>
inline bool operator>(const T& a, const T& b)
inline bool operator>(T const& a, T const& b)
{
return a.tv_sec > b.tv_sec || (a.tv_sec == b.tv_sec && a.tv_nsec > b.tv_nsec);
}
template<TimeSpecType T>
inline bool operator<(const T& a, const T& b)
inline bool operator<(T const& a, T const& b)
{
return a.tv_sec < b.tv_sec || (a.tv_sec == b.tv_sec && a.tv_nsec < b.tv_nsec);
}
template<TimeSpecType T>
inline bool operator<=(const T& a, const T& b)
inline bool operator<=(T const& a, T const& b)
{
return a.tv_sec < b.tv_sec || (a.tv_sec == b.tv_sec && a.tv_nsec <= b.tv_nsec);
}
template<TimeSpecType T>
inline bool operator==(const T& a, const T& b)
inline bool operator==(T const& a, T const& b)
{
return a.tv_sec == b.tv_sec && a.tv_nsec == b.tv_nsec;
}
template<TimeSpecType T>
inline bool operator!=(const T& a, const T& b)
inline bool operator!=(T const& a, T const& b)
{
return a.tv_sec != b.tv_sec || a.tv_nsec != b.tv_nsec;
}