update parser (#5)

This commit is contained in:
tompzf
2026-01-16 11:40:02 +01:00
committed by GitHub
parent 5039a37131
commit 234be8917f
115 changed files with 14038 additions and 5380 deletions

View File

@@ -58,7 +58,8 @@ bool CArgumentDefBase::CompareNameAndAssign(CArgumentIterator& rargit, const std
while (nPos < rssArgument.size())
{
char c = rssArgument[nPos];
if (!std::isalnum(c) && c != '_' && c != '?')
// Protect against multi-byte characters (UTF-8).
if (static_cast<uint8_t>(c) > 127u || (!std::isalnum(c) && c != '_' && c != '?'))
break;
ssArgNameCS += c;
ssArgNameCI += static_cast<char>(std::tolower(c));

View File

@@ -1389,7 +1389,7 @@ public:
* @param[in] rtArgument Reference to the argument.
* @param[in] rssValue Reference to the string containing the value to be assigned.
*/
void Parse(TVar& /*rtArgument*/, const std::string& /*rssValue*/) {}
void Parse([[maybe_unused]] TVar& rtArgument, [[maybe_unused]] const std::string& rssValue) {}
/**
* @brief Get the markup string for the argument type. Overload in derived class.