This commit is contained in:
2025-10-21 17:48:21 +03:00
parent fc64642bd6
commit 49a2e2f9c1
6 changed files with 69 additions and 778 deletions

View File

@@ -474,7 +474,7 @@ struct MccNetMessageValidKeywords {
constexpr static const size_t* isKeywordValid(std::string_view key)
{
const auto hash = utils::FNV1aHash(key);
const auto hash = mcc::utils::FNV1aHash(key);
for (auto const& h : NETMSG_VALID_KEYWORD_HASHES) {
if (h == hash) {
@@ -506,10 +506,10 @@ public:
};
protected:
class DefaultDeserializer : protected utils::MccSimpleDeserializer
class DefaultDeserializer : protected mcc::utils::MccSimpleDeserializer
{
protected:
using base_t = utils::MccSimpleDeserializer;
using base_t = mcc::utils::MccSimpleDeserializer;
public:
DefaultDeserializer() : base_t(MCC_COMMPROTO_RANGEPARAM_DELIM_SEQ) {}
@@ -713,7 +713,7 @@ public:
return withKey(std::string_view{key});
}
return utils::FNV1aHash(key) == _keywordHash;
return mcc::utils::FNV1aHash(key) == _keywordHash;
}
@@ -921,9 +921,9 @@ public:
auto found = std::ranges::search(_msgBuffer, MCC_COMMPROTO_KEYPARAM_DELIM_SEQ);
if (found.empty()) { // only keyword
key = utils::trimSpaces(std::string_view{_msgBuffer.begin(), _msgBuffer.end()});
key = mcc::utils::trimSpaces(std::string_view{_msgBuffer.begin(), _msgBuffer.end()});
} else {
key = utils::trimSpaces(std::string_view{_msgBuffer.begin(), found.begin()});
key = mcc::utils::trimSpaces(std::string_view{_msgBuffer.begin(), found.begin()});
}
auto kv = valid_keys_t::isKeywordValid(key);