1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

AK: Fix build with !USING_AK_GLOBALLY

A couple headers expected names to be in the global namespace, qualify
those names to make sure they're resolved even when the names are not
exported.
One header placed its functions in the global namespace, move those to
the AK namespace to make the concepts resolve.
This commit is contained in:
Ali Mohammad Pur 2022-12-13 00:06:11 +03:30 committed by Ali Mohammad Pur
parent 483c18437b
commit ad120606fd
3 changed files with 32 additions and 4 deletions

View file

@ -264,7 +264,6 @@ inline NonnullRefPtr<T> make_ref_counted(Args&&... args)
{
return NonnullRefPtr<T>(NonnullRefPtr<T>::Adopt, *new T { forward<Args>(args)... });
}
}
template<typename T>
struct Traits<NonnullRefPtr<T>> : public GenericTraits<NonnullRefPtr<T>> {
@ -274,6 +273,8 @@ struct Traits<NonnullRefPtr<T>> : public GenericTraits<NonnullRefPtr<T>> {
static bool equals(NonnullRefPtr<T> const& a, NonnullRefPtr<T> const& b) { return a.ptr() == b.ptr(); }
};
}
#if USING_AK_GLOBALLY
using AK::adopt_ref;
using AK::make_ref_counted;