mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Everywhere: Remove unnecessary AK and Detail namespace scoping
This commit is contained in:
parent
ae2abcebbb
commit
b8f1e1bed2
Notes:
sideshowbarker
2024-07-17 03:36:18 +09:00
Author: https://github.com/moustafaraafat Commit: https://github.com/SerenityOS/serenity/commit/b8f1e1bed2 Pull-request: https://github.com/SerenityOS/serenity/pull/16067 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/linusg
10 changed files with 13 additions and 13 deletions
|
@ -19,7 +19,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
requires(AK::Detail::IsTriviallyConstructible<T>) T& append_structure()
|
requires(IsTriviallyConstructible<T>) T& append_structure()
|
||||||
{
|
{
|
||||||
VERIFY((reinterpret_cast<FlatPtr>(m_target.data()) + m_offset) % alignof(T) == 0);
|
VERIFY((reinterpret_cast<FlatPtr>(m_target.data()) + m_offset) % alignof(T) == 0);
|
||||||
VERIFY(m_offset + sizeof(T) <= m_target.size());
|
VERIFY(m_offset + sizeof(T) <= m_target.size());
|
||||||
|
|
|
@ -46,7 +46,7 @@ template<typename T, template<typename...> typename S>
|
||||||
concept SpecializationOf = IsSpecializationOf<T, S>;
|
concept SpecializationOf = IsSpecializationOf<T, S>;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
concept AnyString = Detail::IsConstructible<StringView, T>;
|
concept AnyString = IsConstructible<StringView, T>;
|
||||||
|
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
concept HashCompatible = IsHashCompatible<Detail::Decay<T>, Detail::Decay<U>>;
|
concept HashCompatible = IsHashCompatible<Detail::Decay<T>, Detail::Decay<U>>;
|
||||||
|
|
|
@ -16,7 +16,7 @@ class ByteBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Bitmap;
|
class Bitmap;
|
||||||
using ByteBuffer = AK::Detail::ByteBuffer<32>;
|
using ByteBuffer = Detail::ByteBuffer<32>;
|
||||||
class Error;
|
class Error;
|
||||||
class GenericLexer;
|
class GenericLexer;
|
||||||
class IPv4Address;
|
class IPv4Address;
|
||||||
|
|
|
@ -293,7 +293,7 @@ public:
|
||||||
{
|
{
|
||||||
if (m_capacity == 0)
|
if (m_capacity == 0)
|
||||||
return;
|
return;
|
||||||
if constexpr (!Detail::IsTriviallyDestructible<T>) {
|
if constexpr (!IsTriviallyDestructible<T>) {
|
||||||
for (auto* bucket : *this)
|
for (auto* bucket : *this)
|
||||||
bucket->~T();
|
bucket->~T();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ struct ExtractIntrusiveRedBlackTreeTypes {
|
||||||
};
|
};
|
||||||
|
|
||||||
template<Integral K, typename V, typename Container = RawPtr<V>>
|
template<Integral K, typename V, typename Container = RawPtr<V>>
|
||||||
using SubstitutedIntrusiveRedBlackTreeNode = IntrusiveRedBlackTreeNode<K, V, typename Detail::SubstituteIntrusiveContainerType<V, Container>::Type>;
|
using SubstitutedIntrusiveRedBlackTreeNode = IntrusiveRedBlackTreeNode<K, V, typename SubstituteIntrusiveContainerType<V, Container>::Type>;
|
||||||
|
|
||||||
template<Integral K, typename V, typename Container, SubstitutedIntrusiveRedBlackTreeNode<K, V, Container> V::*member>
|
template<Integral K, typename V, typename Container, SubstitutedIntrusiveRedBlackTreeNode<K, V, Container> V::*member>
|
||||||
class IntrusiveRedBlackTree : public BaseRedBlackTree<K> {
|
class IntrusiveRedBlackTree : public BaseRedBlackTree<K> {
|
||||||
|
|
|
@ -582,7 +582,7 @@ inline constexpr bool IsSpecializationOf<U<Us...>, U> = true;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct __Decay {
|
struct __Decay {
|
||||||
typedef Detail::RemoveCVReference<T> type;
|
typedef RemoveCVReference<T> type;
|
||||||
};
|
};
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct __Decay<T[]> {
|
struct __Decay<T[]> {
|
||||||
|
|
|
@ -36,13 +36,13 @@ namespace std { // NOLINT(cert-dcl58-cpp) Names in std to aid tools
|
||||||
// NOTE: These are in the "std" namespace since some compilers and static analyzers rely on it.
|
// NOTE: These are in the "std" namespace since some compilers and static analyzers rely on it.
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
constexpr T&& forward(AK::Detail::RemoveReference<T>& param)
|
constexpr T&& forward(RemoveReference<T>& param)
|
||||||
{
|
{
|
||||||
return static_cast<T&&>(param);
|
return static_cast<T&&>(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
constexpr T&& forward(AK::Detail::RemoveReference<T>&& param) noexcept
|
constexpr T&& forward(RemoveReference<T>&& param) noexcept
|
||||||
{
|
{
|
||||||
static_assert(!IsLvalueReference<T>, "Can't forward an rvalue as an lvalue.");
|
static_assert(!IsLvalueReference<T>, "Can't forward an rvalue as an lvalue.");
|
||||||
return static_cast<T&&>(param);
|
return static_cast<T&&>(param);
|
||||||
|
|
|
@ -60,7 +60,7 @@ private:
|
||||||
|
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
class InputStream : public virtual AK::Detail::Stream {
|
class InputStream : public virtual Detail::Stream {
|
||||||
public:
|
public:
|
||||||
// Reads at least one byte unless none are requested or none are available. Does nothing
|
// Reads at least one byte unless none are requested or none are available. Does nothing
|
||||||
// and returns zero if there is already an error.
|
// and returns zero if there is already an error.
|
||||||
|
@ -81,7 +81,7 @@ public:
|
||||||
virtual bool discard_or_error(size_t count) = 0;
|
virtual bool discard_or_error(size_t count) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OutputStream : public virtual AK::Detail::Stream {
|
class OutputStream : public virtual Detail::Stream {
|
||||||
public:
|
public:
|
||||||
virtual size_t write(ReadonlyBytes) = 0;
|
virtual size_t write(ReadonlyBytes) = 0;
|
||||||
virtual bool write_or_error(ReadonlyBytes) = 0;
|
virtual bool write_or_error(ReadonlyBytes) = 0;
|
||||||
|
|
|
@ -93,7 +93,7 @@ private:
|
||||||
u8 const* data() const { return m_buffer.data(); }
|
u8 const* data() const { return m_buffer.data(); }
|
||||||
|
|
||||||
static constexpr size_t inline_capacity = 256;
|
static constexpr size_t inline_capacity = 256;
|
||||||
AK::Detail::ByteBuffer<inline_capacity> m_buffer;
|
Detail::ByteBuffer<inline_capacity> m_buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,9 @@ requires(sizeof(T) >= sizeof(u64) && IsUnsigned<T>) class UFixedBigInt;
|
||||||
// constexpr inline bool Detail::IsIntegral<UFixedBigInt<T>> = true;
|
// constexpr inline bool Detail::IsIntegral<UFixedBigInt<T>> = true;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
constexpr inline bool Detail::IsUnsigned<UFixedBigInt<T>> = true;
|
constexpr inline bool IsUnsigned<UFixedBigInt<T>> = true;
|
||||||
template<typename T>
|
template<typename T>
|
||||||
constexpr inline bool Detail::IsSigned<UFixedBigInt<T>> = false;
|
constexpr inline bool IsSigned<UFixedBigInt<T>> = false;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct NumericLimits<UFixedBigInt<T>> {
|
struct NumericLimits<UFixedBigInt<T>> {
|
||||||
|
|
Loading…
Reference in a new issue