mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 23:54:35 +00:00
update openal-soft to 1.24.3
keeping the alt 87514151c4 (diff-73a8dc1ce58605f6c5ea53548454c3bae516ec5132a29c9d7ff7edf9730c75be)
This commit is contained in:
parent
12db0500e8
commit
ba32094b7b
276 changed files with 49304 additions and 8712 deletions
|
|
@ -10,11 +10,17 @@
|
|||
|
||||
namespace al {
|
||||
|
||||
template<typename T, typename Traits>
|
||||
template<typename ...Ts>
|
||||
[[nodiscard]] constexpr
|
||||
auto sizei(const std::basic_string_view<T,Traits> str) noexcept -> int
|
||||
auto sizei(const std::basic_string_view<Ts...> str) noexcept -> int
|
||||
{ return static_cast<int>(std::min<std::size_t>(str.size(), std::numeric_limits<int>::max())); }
|
||||
|
||||
template<typename ...Ts>
|
||||
[[nodiscard]] constexpr
|
||||
auto sizei(const std::basic_string<Ts...> &str) noexcept -> int
|
||||
{ return static_cast<int>(std::min<std::size_t>(str.size(), std::numeric_limits<int>::max())); }
|
||||
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool contains(const std::string_view str0, const std::string_view str1) noexcept
|
||||
{ return str0.find(str1) != std::string_view::npos; }
|
||||
|
|
@ -33,10 +39,20 @@ int case_compare(const std::string_view str0, const std::string_view str1) noexc
|
|||
[[nodiscard]]
|
||||
int case_compare(const std::wstring_view str0, const std::wstring_view str1) noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
int strcasecmp(const char *str0, const char *str1) noexcept;
|
||||
[[nodiscard]]
|
||||
int strncasecmp(const char *str0, const char *str1, std::size_t len) noexcept;
|
||||
/* C++20 changes path::u8string() to return a string using a new/distinct
|
||||
* char8_t type for UTF-8 strings. However, support for this with standard
|
||||
* string functions is totally inadequate, and we already hold UTF-8 with plain
|
||||
* char strings. So this function is used to reinterpret a char8_t string as a
|
||||
* char string_view.
|
||||
*/
|
||||
#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201907L
|
||||
inline auto u8_as_char(const std::u8string_view str) -> std::string_view
|
||||
#else
|
||||
inline auto u8_as_char(const std::string_view str) -> std::string_view
|
||||
#endif
|
||||
{
|
||||
return std::string_view{reinterpret_cast<const char*>(str.data()), str.size()};
|
||||
}
|
||||
|
||||
} // namespace al
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue