Skip to content

Commit

Permalink
[共通] constexpr 付け忘れを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Reputeless committed Jan 29, 2024
1 parent 6bf32d9 commit 3bd3308
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Siv3D/include/Siv3D/StringView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ namespace s3d
/// @param ch 検索する文字
/// @return 指定した文字で終わる場合 true, それ以外の場合は false
[[nodiscard]]
bool ends_with(value_type ch) const noexcept;
constexpr bool ends_with(value_type ch) const noexcept;

/// @brief 文字列が指定した文字列で終わるかを返します。
/// @param s 検索する文字列
Expand Down
2 changes: 1 addition & 1 deletion Siv3D/include/Siv3D/detail/StringView.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ namespace s3d
&& (std::char_traits<value_type>::compare(m_view.data(), s.data(), s.size()) == 0);
}

inline bool StringView::ends_with(const value_type ch) const noexcept
inline constexpr bool StringView::ends_with(const value_type ch) const noexcept
{
return (not empty()) && (back() == ch);
}
Expand Down

0 comments on commit 3bd3308

Please sign in to comment.