Skip to content

Commit

Permalink
util/StringCompare: add constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Jan 1, 2025
1 parent 19817a5 commit 0e89a7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/StringCompare.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ StringIsEmpty(const char *string) noexcept
}

[[gnu::pure]]
static inline bool
static constexpr bool
StringIsEqual(std::string_view a, std::string_view b) noexcept
{
return a == b;
Expand Down Expand Up @@ -112,7 +112,7 @@ const char *
FindStringSuffix(const char *p, const char *suffix) noexcept;

template<typename T>
bool
constexpr bool
SkipPrefix(std::basic_string_view<T> &haystack,
std::basic_string_view<T> needle) noexcept
{
Expand All @@ -123,7 +123,7 @@ SkipPrefix(std::basic_string_view<T> &haystack,
}

template<typename T>
bool
constexpr bool
RemoveSuffix(std::basic_string_view<T> &haystack,
std::basic_string_view<T> needle) noexcept
{
Expand Down

0 comments on commit 0e89a7f

Please sign in to comment.