From 936907b2b29c235e344fe068d5eac03333458465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rimas=20Misevi=C4=8Dius?= Date: Tue, 30 Jan 2024 19:44:50 +0200 Subject: [PATCH] Move the `equals` function to the end of url.h Move the `equals` function to the end of url.h at other non-members url functions. --- include/upa/url.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/upa/url.h b/include/upa/url.h index cae8a62..ebdbbc7 100644 --- a/include/upa/url.h +++ b/include/upa/url.h @@ -674,17 +674,6 @@ class url { friend class url_search_params; }; -/// @brief URL equivalence -/// -/// Determines if @a lhs equals to @a rhs, optionally with an @a exclude_fragments flag. -/// More info: https://url.spec.whatwg.org/#concept-url-equals -/// -/// @param[in] lhs,rhs URLs to compare -/// @param[in] exclude_fragments exclude fragments when comparing -inline bool equals(const url& lhs, const url& rhs, bool exclude_fragments = false) { - return lhs.serialize(exclude_fragments) == rhs.serialize(exclude_fragments); -} - namespace detail { @@ -3046,6 +3035,17 @@ inline bool has_dot_dot_segment(const CharT* first, const CharT* last, IsSlash i // URL utilities (non-member functions) +/// @brief URL equivalence +/// +/// Determines if @a lhs equals to @a rhs, optionally with an @a exclude_fragments flag. +/// More info: https://url.spec.whatwg.org/#concept-url-equals +/// +/// @param[in] lhs,rhs URLs to compare +/// @param[in] exclude_fragments exclude fragments when comparing +inline bool equals(const url& lhs, const url& rhs, bool exclude_fragments = false) { + return lhs.serialize(exclude_fragments) == rhs.serialize(exclude_fragments); +} + /// @brief Lexicographically compares two URL's inline bool operator==(const url& lhs, const url& rhs) noexcept { return lhs.norm_url_ == rhs.norm_url_;