mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
AK: Remove global free function comparison operators for timespec
No code was using these, so let's just delete them. They pollute the lookup for every single comparison operator in the project.
This commit is contained in:
parent
a492e2018d
commit
83ad5bfba0
Notes:
sideshowbarker
2024-07-17 01:59:46 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/83ad5bfba0 Pull-request: https://github.com/SerenityOS/serenity/pull/16771 Reviewed-by: https://github.com/kleinesfilmroellchen Reviewed-by: https://github.com/linusg ✅
1 changed files with 0 additions and 43 deletions
43
AK/Time.h
43
AK/Time.h
|
@ -346,43 +346,6 @@ inline void timespec_to_timeval(TimespecType const& ts, TimevalType& tv)
|
|||
tv.tv_usec = ts.tv_nsec / 1000;
|
||||
}
|
||||
|
||||
template<TimeSpecType T>
|
||||
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>(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<(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<=(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==(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!=(T const& a, T const& b)
|
||||
{
|
||||
return a.tv_sec != b.tv_sec || a.tv_nsec != b.tv_nsec;
|
||||
}
|
||||
|
||||
// To use these, add a ``using namespace AK::TimeLiterals`` at block or file scope
|
||||
namespace TimeLiterals {
|
||||
|
||||
|
@ -412,10 +375,4 @@ using AK::timeval_add;
|
|||
using AK::timeval_sub;
|
||||
using AK::timeval_to_timespec;
|
||||
using AK::years_to_days_since_epoch;
|
||||
using AK::operator<=;
|
||||
using AK::operator<;
|
||||
using AK::operator>;
|
||||
using AK::operator>=;
|
||||
using AK::operator==;
|
||||
using AK::operator!=;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue