From 0c75a14b4fe0c432e25ae797d5722ab3729660f7 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 5 Jan 2022 11:49:17 -0500 Subject: [PATCH] AK: Move TimeSpecType concept inside the AK namespace This is just to allow removing the 'clang-format off' directive. This concept is only used within this header, so it doesn't need to be in the global namespace. --- AK/Time.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/AK/Time.h b/AK/Time.h index 806bc160af..64f13230ed 100644 --- a/AK/Time.h +++ b/AK/Time.h @@ -15,6 +15,8 @@ struct timeval; struct timespec; +namespace AK { + // Concept to detect types which look like timespec without requiring the type. template concept TimeSpecType = requires(T t) @@ -23,10 +25,6 @@ concept TimeSpecType = requires(T t) t.tv_nsec; }; -// FIXME: remove once Clang formats these properly. -// clang-format off -namespace AK { - // Month and day start at 1. Month must be >= 1 and <= 12. // The return value is 0-indexed, that is 0 is Sunday, 1 is Monday, etc. // Day may be negative or larger than the number of days @@ -298,7 +296,6 @@ inline bool operator!=(const T& a, const T& b) } } -// clang-format on using AK::day_of_week; using AK::day_of_year;