From f1a67347a6cf4b6d397fe1220b999ed7161c7097 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 25 Aug 2023 14:52:09 -0700 Subject: Use string_view in a couple more places --- al/eax/utils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'al/eax/utils.h') diff --git a/al/eax/utils.h b/al/eax/utils.h index 8ff75a18..e5581bd6 100644 --- a/al/eax/utils.h +++ b/al/eax/utils.h @@ -4,6 +4,7 @@ #include #include #include +#include #include using EaxDirtyFlags = unsigned int; @@ -13,7 +14,7 @@ struct EaxAlLowPassParam { float gain_hf; }; -void eax_log_exception(const char *message) noexcept; +void eax_log_exception(std::string_view message) noexcept; template void eax_validate_range( -- cgit v1.2.3 From 8a94d286a585d84e57bdc8ca99a081a8a572e629 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 26 Aug 2023 00:57:11 -0700 Subject: Replace another C string with string_view --- al/eax/utils.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'al/eax/utils.h') diff --git a/al/eax/utils.h b/al/eax/utils.h index e5581bd6..8e0f975f 100644 --- a/al/eax/utils.h +++ b/al/eax/utils.h @@ -7,6 +7,8 @@ #include #include +#include "opthelpers.h" + using EaxDirtyFlags = unsigned int; struct EaxAlLowPassParam { @@ -17,13 +19,10 @@ struct EaxAlLowPassParam { void eax_log_exception(std::string_view message) noexcept; template -void eax_validate_range( - const char* value_name, - const TValue& value, - const TValue& min_value, +void eax_validate_range(std::string_view value_name, const TValue& value, const TValue& min_value, const TValue& max_value) { - if (value >= min_value && value <= max_value) + if(value >= min_value && value <= max_value) LIKELY return; const auto message = -- cgit v1.2.3