mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-02-05 15:18:45 +00:00
update parser (#5)
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user