diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2023-04-28 04:31:15 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-28 05:56:04 +0200 |
commit | d06057f88b6c6d8f629f93b097773b54bbc6ebd8 (patch) | |
tree | 00b30d42077e7a0a15ef19853e2e8b36ed57e795 | |
parent | 482f7f977573799dbbd7e88fb5f2df1eb19b8fae (diff) | |
download | serenity-d06057f88b6c6d8f629f93b097773b54bbc6ebd8.zip |
AK: Don't refer to AK::swap() as ::swap()
While swap() is available in the global namespace in normal conditions,
!USING_AK_GLOBALLY will make this name unavailable in the global
namespace, making these calls fail to compile.
-rw-r--r-- | AK/FixedArray.h | 2 | ||||
-rw-r--r-- | AK/NonnullOwnPtr.h | 4 | ||||
-rw-r--r-- | AK/OwnPtr.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/AK/FixedArray.h b/AK/FixedArray.h index 0eb8a22c74..ac60f4052c 100644 --- a/AK/FixedArray.h +++ b/AK/FixedArray.h @@ -142,7 +142,7 @@ public: void swap(FixedArray<T>& other) { - ::swap(m_storage, other.m_storage); + AK::swap(m_storage, other.m_storage); } void fill_with(T const& value) diff --git a/AK/NonnullOwnPtr.h b/AK/NonnullOwnPtr.h index 4c73a246eb..8dd798c22d 100644 --- a/AK/NonnullOwnPtr.h +++ b/AK/NonnullOwnPtr.h @@ -110,13 +110,13 @@ public: void swap(NonnullOwnPtr& other) { - ::swap(m_ptr, other.m_ptr); + AK::swap(m_ptr, other.m_ptr); } template<typename U> void swap(NonnullOwnPtr<U>& other) { - ::swap(m_ptr, other.m_ptr); + AK::swap(m_ptr, other.m_ptr); } template<typename U> diff --git a/AK/OwnPtr.h b/AK/OwnPtr.h index e1c3e40d97..2ccb0c3f9a 100644 --- a/AK/OwnPtr.h +++ b/AK/OwnPtr.h @@ -152,13 +152,13 @@ public: void swap(OwnPtr& other) { - ::swap(m_ptr, other.m_ptr); + AK::swap(m_ptr, other.m_ptr); } template<typename U> void swap(OwnPtr<U>& other) { - ::swap(m_ptr, other.m_ptr); + AK::swap(m_ptr, other.m_ptr); } static OwnPtr lift(T* ptr) |