...
This commit is contained in:
@@ -16,15 +16,15 @@
|
||||
|
||||
#include "mcc_traits.h"
|
||||
|
||||
namespace mcc
|
||||
namespace mcc::network
|
||||
{
|
||||
|
||||
namespace utils
|
||||
{
|
||||
|
||||
static constexpr bool mcc_char_subrange_compare(const traits::mcc_char_view auto& what,
|
||||
const traits::mcc_char_view auto& where,
|
||||
bool case_insensitive = false)
|
||||
static constexpr bool mcc_char_range_compare(const traits::mcc_char_view auto& what,
|
||||
const traits::mcc_char_view auto& where,
|
||||
bool case_insensitive = false)
|
||||
{
|
||||
if (std::ranges::size(what) == std::ranges::size(where)) {
|
||||
if (case_insensitive) {
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
if (isLocal()) { // check for special values
|
||||
idx = 0;
|
||||
if (std::ranges::any_of(validLocalProtoTypes, [&idx, this](const auto& el) {
|
||||
bool ok = utils::mcc_char_subrange_compare(_host, el, true);
|
||||
bool ok = utils::mcc_char_range_compare(_host, el, true);
|
||||
if (!ok) {
|
||||
++idx;
|
||||
}
|
||||
@@ -398,7 +398,7 @@ protected:
|
||||
|
||||
// case-insensitive look-up
|
||||
bool found = std::ranges::any_of(MccServerEndpoint::validProtoMarks, [&idx, &proto_mark](const auto& el) {
|
||||
bool ok = utils::mcc_char_subrange_compare(proto_mark, el, true);
|
||||
bool ok = utils::mcc_char_range_compare(proto_mark, el, true);
|
||||
|
||||
if (!ok) {
|
||||
++idx;
|
||||
@@ -509,4 +509,4 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace mcc
|
||||
} // namespace mcc::network
|
||||
|
||||
Reference in New Issue
Block a user