فهرست منبع

AK: Fully qualify some usages of AK features outside of the AK namespace

Tim Schumacher 2 سال پیش
والد
کامیت
a8c73998f1
3فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 2 2
      AK/StdLibExtras.h
  2. 1 1
      AK/Types.h
  3. 2 2
      AK/kmalloc.h

+ 2 - 2
AK/StdLibExtras.h

@@ -17,13 +17,13 @@
 #include <AK/Assertions.h>
 
 template<typename T, typename U>
-constexpr auto round_up_to_power_of_two(T value, U power_of_two) requires(IsIntegral<T>&& IsIntegral<U>)
+constexpr auto round_up_to_power_of_two(T value, U power_of_two) requires(AK::Detail::IsIntegral<T>&& AK::Detail::IsIntegral<U>)
 {
     return ((value - 1) & ~(power_of_two - 1)) + power_of_two;
 }
 
 template<typename T>
-constexpr bool is_power_of_two(T value) requires(IsIntegral<T>)
+constexpr bool is_power_of_two(T value) requires(AK::Detail::IsIntegral<T>)
 {
     return value && !((value) & (value - 1));
 }

+ 1 - 1
AK/Types.h

@@ -72,7 +72,7 @@ using mode_t = unsigned short;
 #    endif
 #endif
 
-using FlatPtr = Conditional<sizeof(void*) == 8, u64, u32>;
+using FlatPtr = AK::Detail::Conditional<sizeof(void*) == 8, u64, u32>;
 
 constexpr u64 KiB = 1024;
 constexpr u64 MiB = KiB * KiB;

+ 2 - 2
AK/kmalloc.h

@@ -40,14 +40,14 @@ inline size_t malloc_good_size(size_t size) { return size; }
 
 using std::nothrow;
 
-inline void* kmalloc_array(Checked<size_t> a, Checked<size_t> b)
+inline void* kmalloc_array(AK::Checked<size_t> a, AK::Checked<size_t> b)
 {
     auto size = a * b;
     VERIFY(!size.has_overflow());
     return kmalloc(size.value());
 }
 
-inline void* kmalloc_array(Checked<size_t> a, Checked<size_t> b, Checked<size_t> c)
+inline void* kmalloc_array(AK::Checked<size_t> a, AK::Checked<size_t> b, AK::Checked<size_t> c)
 {
     auto size = a * b * c;
     VERIFY(!size.has_overflow());